From 0d5c31804076886db9e31052175808df8b40e4e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Tue, 7 Dec 2021 15:40:35 +0100 Subject: [PATCH 01/33] Adding a test case to test exitSceneUrl property this test case reproduces error #1631 --- maps/tests/Properties/exitSceneUrl1.json | 167 +++++++++++++++++++++++ maps/tests/Properties/exitSceneUrl2.json | 149 ++++++++++++++++++++ maps/tests/index.html | 8 ++ 3 files changed, 324 insertions(+) create mode 100644 maps/tests/Properties/exitSceneUrl1.json create mode 100644 maps/tests/Properties/exitSceneUrl2.json diff --git a/maps/tests/Properties/exitSceneUrl1.json b/maps/tests/Properties/exitSceneUrl1.json new file mode 100644 index 00000000..463bf686 --- /dev/null +++ b/maps/tests/Properties/exitSceneUrl1.json @@ -0,0 +1,167 @@ +{ "compressionlevel":-1, + "height":10, + "infinite":false, + "layers":[ + { + "data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], + "height":10, + "id":1, + "name":"floor", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":10, + "x":0, + "y":0 + }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":10, + "id":2, + "name":"start", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":10, + "x":0, + "y":0 + }, + { + "data":[17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 17, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17], + "height":10, + "id":7, + "name":"walls", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":10, + "x":0, + "y":0 + }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":10, + "id":8, + "name":"exit", + "opacity":1, + "properties":[ + { + "name":"exitSceneUrl", + "type":"string", + "value":"exitSceneUrl2.json" + }], + "type":"tilelayer", + "visible":true, + "width":10, + "x":0, + "y":0 + }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":10, + "id":9, + "name":"from_exit2", + "opacity":1, + "properties":[ + { + "name":"startLayer", + "type":"bool", + "value":true + }], + "type":"tilelayer", + "visible":true, + "width":10, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "id":3, + "name":"floorLayer", + "objects":[ + { + "height":263.008397229317, + "id":1, + "name":"", + "rotation":0, + "text": + { + "fontfamily":"Sans Serif", + "pixelsize":13, + "text":"You are on Map 1\n\nTest:\nWalk through the exit.\n\nResult:\nYou should arrive to Map 2\n", + "wrap":true + }, + "type":"", + "visible":true, + "width":249.954975648686, + "x":35.2740564642832, + "y":34.4372323693377 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextlayerid":10, + "nextobjectid":2, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"2021.03.23", + "tileheight":32, + "tilesets":[ + { + "columns":11, + "firstgid":1, + "image":"../tileset1.png", + "imageheight":352, + "imagewidth":352, + "margin":0, + "name":"tileset1", + "spacing":0, + "tilecount":121, + "tileheight":32, + "tiles":[ + { + "id":16, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":17, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":18, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":19, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }], + "tilewidth":32 + }], + "tilewidth":32, + "type":"map", + "version":1.5, + "width":10 +} diff --git a/maps/tests/Properties/exitSceneUrl2.json b/maps/tests/Properties/exitSceneUrl2.json new file mode 100644 index 00000000..bc2aa4d3 --- /dev/null +++ b/maps/tests/Properties/exitSceneUrl2.json @@ -0,0 +1,149 @@ +{ "compressionlevel":-1, + "height":10, + "infinite":false, + "layers":[ + { + "data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], + "height":10, + "id":1, + "name":"floor", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":10, + "x":0, + "y":0 + }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":10, + "id":2, + "name":"start", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":10, + "x":0, + "y":0 + }, + { + "data":[17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17], + "height":10, + "id":7, + "name":"walls", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":10, + "x":0, + "y":0 + }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":10, + "id":8, + "name":"exit", + "opacity":1, + "properties":[ + { + "name":"exitSceneUrl", + "type":"string", + "value":"exitSceneUrl1.json#from_exit2" + }], + "type":"tilelayer", + "visible":true, + "width":10, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "id":3, + "name":"floorLayer", + "objects":[ + { + "height":263.008397229317, + "id":1, + "name":"", + "rotation":0, + "text": + { + "fontfamily":"Sans Serif", + "pixelsize":13, + "text":"You are on Map 2\n\nTest:\nWalk back through the exit.\n\nResult:\nYou should arrive back to Map 1\n", + "wrap":true + }, + "type":"", + "visible":true, + "width":249.954975648686, + "x":35.2740564642832, + "y":34.4372323693377 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextlayerid":9, + "nextobjectid":2, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"2021.03.23", + "tileheight":32, + "tilesets":[ + { + "columns":11, + "firstgid":1, + "image":"../tileset1.png", + "imageheight":352, + "imagewidth":352, + "margin":0, + "name":"tileset1", + "spacing":0, + "tilecount":121, + "tileheight":32, + "tiles":[ + { + "id":16, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":17, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":18, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }, + { + "id":19, + "properties":[ + { + "name":"collides", + "type":"bool", + "value":true + }] + }], + "tilewidth":32 + }], + "tilewidth":32, + "type":"map", + "version":1.5, + "width":10 +} diff --git a/maps/tests/index.html b/maps/tests/index.html index 068136ed..366f245f 100644 --- a/maps/tests/index.html +++ b/maps/tests/index.html @@ -64,6 +64,14 @@ Test exits + + + Success Failure Pending + + + Test the (deprecated) exitSceneUrl property + + Success Failure Pending From 1d2d60a67a9976d267dc19ca74fbe8477900df91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Tue, 7 Dec 2021 15:51:30 +0100 Subject: [PATCH 02/33] Fixing issue with "instance" part of the URL lost in exitSceneUrl URLs. --- front/src/Connexion/Room.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/Connexion/Room.ts b/front/src/Connexion/Room.ts index 4c5955cc..7d68185a 100644 --- a/front/src/Connexion/Room.ts +++ b/front/src/Connexion/Room.ts @@ -77,7 +77,7 @@ export class Room { const currentRoom = new Room(baseUrl); let instance: string = "global"; if (currentRoom.isPublic) { - instance = currentRoom.instance as string; + instance = currentRoom.getInstance(); } baseUrl.pathname = "/_/" + instance + "/" + absoluteExitSceneUrl.host + absoluteExitSceneUrl.pathname; From 7a6e250a588f937f44a900b4da9cb43c267eed5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Wed, 8 Dec 2021 14:17:13 +0100 Subject: [PATCH 03/33] Fixing map caching Maps in the GameScene can be modified by the scripting API. If so, previously, the changes to the maps were persisted in the ITiledMap object in the GameScene because this was cached by the Phaser loader, causing a series of problems, the most noticeable being that templating in the scripting API stopped working on a second visit of a page. We are now deep-copying the map on load to avoid these nasty effects. Closes https://github.com/workadventure/scripting-api-extra/issues/77 --- front/package.json | 1 + front/src/Phaser/Game/GameScene.ts | 6 +++++- front/yarn.lock | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/front/package.json b/front/package.json index ec81d8a7..8e616aae 100644 --- a/front/package.json +++ b/front/package.json @@ -45,6 +45,7 @@ "@types/socket.io-client": "^1.4.32", "axios": "^0.21.2", "cross-env": "^7.0.3", + "deep-copy-ts": "^0.5.0", "generic-type-guard": "^3.2.0", "google-protobuf": "^3.13.0", "phaser": "^3.54.0", diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index d9bb8186..90c67437 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -89,6 +89,7 @@ import { get } from "svelte/store"; import { contactPageStore } from "../../Stores/MenuStore"; import { GameMapProperties } from "./GameMapProperties"; import SpriteSheetFile = Phaser.Loader.FileTypes.SpriteSheetFile; +import { deepCopy } from "deep-copy-ts"; export interface GameSceneInitInterface { initPosition: PointInterface | null; @@ -341,7 +342,10 @@ export class GameScene extends DirtyScene { private async onMapLoad(data: any): Promise { // Triggered when the map is loaded // Load tiles attached to the map recursively - this.mapFile = data.data; + + // The map file can be modified by the scripting API and we don't want to tamper the Phaser cache (in case we come back on the map after visiting other maps) + // So we are doing a deep copy + this.mapFile = deepCopy(data.data); const url = this.MapUrlFile.substr(0, this.MapUrlFile.lastIndexOf("/")); this.mapFile.tilesets.forEach((tileset) => { if (typeof tileset.name === "undefined" || typeof tileset.image === "undefined") { diff --git a/front/yarn.lock b/front/yarn.lock index f94e659f..480de55c 100644 --- a/front/yarn.lock +++ b/front/yarn.lock @@ -1656,6 +1656,11 @@ dedent@^0.7.0: resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= +deep-copy-ts@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/deep-copy-ts/-/deep-copy-ts-0.5.0.tgz#b9493d8e2bae85ef7d659c16eb707c13efb84499" + integrity sha512-/3cgBcMkznRf5BM8wu6YWz3SQUkHzgh/v1TZFjevztLj9sMjFvNFBtpN4uUtPzw/rA/TldyD6c6LRL1zno4+YA== + deep-equal@^1.0.1: version "1.1.1" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" From aad582df7076088e4b6fc8f1f66ea11b56a94555 Mon Sep 17 00:00:00 2001 From: PizZaKatZe Date: Mon, 6 Dec 2021 21:16:53 +0100 Subject: [PATCH 04/33] Display map link in map credits if provided --- docs/maps/wa-maps.md | 8 ++++---- front/src/Components/Menu/AboutRoomSubMenu.svelte | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/maps/wa-maps.md b/docs/maps/wa-maps.md index 70581a57..819d632e 100644 --- a/docs/maps/wa-maps.md +++ b/docs/maps/wa-maps.md @@ -98,13 +98,13 @@ The exception is the "collides" property that can only be set on tiles, but not By setting properties on the map itself, you can help visitors know more about the creators of the map. The following *map* properties are supported: -* `mapName` (string) -* `mapDescription` (string) -* `mapCopyright` (string) +* `mapName` (string): The name of your map +* `mapLink` (string): A link to your map, for example a repository +* `mapDescription` (string): A short description of your map +* `mapCopyright` (string): Copyright notice And *each tileset* can also have a property called `tilesetCopyright` (string). Resulting in a "credit" page in the menu looking like this: ![](images/mapProperties.png){.document-img} - diff --git a/front/src/Components/Menu/AboutRoomSubMenu.svelte b/front/src/Components/Menu/AboutRoomSubMenu.svelte index 666183e0..0fd51ce7 100644 --- a/front/src/Components/Menu/AboutRoomSubMenu.svelte +++ b/front/src/Components/Menu/AboutRoomSubMenu.svelte @@ -8,6 +8,7 @@ let expandedTilesetCopyright = false; let mapName: string = ""; + let mapLink: string = ""; let mapDescription: string = ""; let mapCopyright: string = "The map creator did not declare a copyright for the map."; let tilesetCopyright: string[] = []; @@ -18,6 +19,10 @@ if (propertyName !== undefined && typeof propertyName.value === "string") { mapName = propertyName.value; } + const propertyLink = gameScene.mapFile.properties.find((property) => property.name === "mapLink"); + if (propertyLink !== undefined && typeof propertyLink.value === "string") { + mapLink = propertyLink.value; + } const propertyDescription = gameScene.mapFile.properties.find( (property) => property.name === "mapDescription" ); @@ -48,6 +53,9 @@

{mapName}

{mapDescription}

+ {#if mapLink} +

> link to this map <

+ {/if}

(expandedMapCopyright = !expandedMapCopyright)}> Copyrights of the map

From 80794975aab5f9fbc476e0f8876b1465f56a52fb Mon Sep 17 00:00:00 2001 From: PizZaKatZe Date: Sat, 11 Dec 2021 22:24:28 +0100 Subject: [PATCH 05/33] Add new layer property `audioCopyright` --- docs/maps/wa-maps.md | 3 +- .../Components/Menu/AboutRoomSubMenu.svelte | 32 +++++++++++++++++-- maps/tests/Properties/mapProperties.json | 8 ++++- 3 files changed, 38 insertions(+), 5 deletions(-) diff --git a/docs/maps/wa-maps.md b/docs/maps/wa-maps.md index 819d632e..6e84a251 100644 --- a/docs/maps/wa-maps.md +++ b/docs/maps/wa-maps.md @@ -103,7 +103,8 @@ The following *map* properties are supported: * `mapDescription` (string): A short description of your map * `mapCopyright` (string): Copyright notice -And *each tileset* can also have a property called `tilesetCopyright` (string). +Each *tileset* can also have a property called `tilesetCopyright` (string). +If you are using audio files in your map, you can declare a layer property `audioCopyright` (string). Resulting in a "credit" page in the menu looking like this: diff --git a/front/src/Components/Menu/AboutRoomSubMenu.svelte b/front/src/Components/Menu/AboutRoomSubMenu.svelte index 0fd51ce7..2bbb4d3c 100644 --- a/front/src/Components/Menu/AboutRoomSubMenu.svelte +++ b/front/src/Components/Menu/AboutRoomSubMenu.svelte @@ -6,12 +6,14 @@ let expandedMapCopyright = false; let expandedTilesetCopyright = false; + let expandedAudioCopyright = false; let mapName: string = ""; let mapLink: string = ""; let mapDescription: string = ""; let mapCopyright: string = "The map creator did not declare a copyright for the map."; let tilesetCopyright: string[] = []; + let audioCopyright: string[] = []; onMount(() => { if (gameScene.mapFile.properties !== undefined) { @@ -41,7 +43,18 @@ (property) => property.name === "tilesetCopyright" ); if (propertyTilesetCopyright !== undefined && typeof propertyTilesetCopyright.value === "string") { - tilesetCopyright = [...tilesetCopyright, propertyTilesetCopyright.value]; //Assignment needed to trigger Svelte's reactivity + // Assignment needed to trigger Svelte's reactivity + tilesetCopyright = [...tilesetCopyright, propertyTilesetCopyright.value]; + } + } + } + + for (const layer of gameScene.mapFile.layers) { + if (layer.type && layer.type === "tilelayer" && layer.properties) { + const propertyAudioCopyright = layer.properties.find((property) => property.name === "audioCopyright"); + if (propertyAudioCopyright !== undefined && typeof propertyAudioCopyright.value === "string") { + // Assignment needed to trigger Svelte's reactivity + audioCopyright = [...audioCopyright, propertyAudioCopyright.value]; } } } @@ -68,8 +81,21 @@

{copyright}

{:else}

- The map creator did not declare a copyright for the tilesets. Warning, This doesn't mean that those - tilesets have no license. + The map creator did not declare a copyright for the tilesets. This doesn't mean that those tilesets + have no license. +

+ {/each} +
+

(expandedAudioCopyright = !expandedAudioCopyright)}> + Copyrights of audio files +

+ diff --git a/maps/tests/Properties/mapProperties.json b/maps/tests/Properties/mapProperties.json index a58c002f..34178e38 100644 --- a/maps/tests/Properties/mapProperties.json +++ b/maps/tests/Properties/mapProperties.json @@ -8,6 +8,12 @@ "id":1, "name":"start", "opacity":1, + "properties":[ + { + "name":"audioCopyright", + "type":"string", + "value":"Copyright 2021 John Doe" + }], "type":"tilelayer", "visible":true, "width":10, @@ -124,4 +130,4 @@ "type":"map", "version":1.4, "width":10 -} \ No newline at end of file +} From bbef3b3eaf49c9da41196a868f8c03ff4ee7f17b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Mon, 13 Dec 2021 16:45:16 +0100 Subject: [PATCH 06/33] Upgrade Typescript to 4.5 This commit contains the new Typescript version but NOT the fixes needed to have the project compiling. --- front/package.json | 14 +- front/yarn.lock | 484 +++++++++++++++++++++++++-------------------- 2 files changed, 275 insertions(+), 223 deletions(-) diff --git a/front/package.json b/front/package.json index 4e81cd3c..cc977cdc 100644 --- a/front/package.json +++ b/front/package.json @@ -12,12 +12,12 @@ "@types/quill": "^1.3.7", "@types/uuidv4": "^5.0.0", "@types/webpack-dev-server": "^3.11.4", - "@typescript-eslint/eslint-plugin": "^4.23.0", - "@typescript-eslint/parser": "^4.23.0", + "@typescript-eslint/eslint-plugin": "^5.6.0", + "@typescript-eslint/parser": "^5.6.0", "css-loader": "^5.2.4", - "eslint": "^7.26.0", + "eslint": "^8.4.1", "eslint-plugin-svelte3": "^3.2.1", - "fork-ts-checker-webpack-plugin": "^6.2.9", + "fork-ts-checker-webpack-plugin": "^6.5.0", "html-webpack-plugin": "^5.3.1", "jasmine": "^3.5.0", "lint-staged": "^11.0.0", @@ -32,10 +32,10 @@ "svelte-check": "^2.1.0", "svelte-loader": "^3.1.1", "svelte-preprocess": "^4.7.3", - "ts-loader": "^9.1.2", - "ts-node": "^9.1.1", + "ts-loader": "^9.2.6", + "ts-node": "^10.4.0", "tsconfig-paths": "^3.9.0", - "typescript": "^4.2.4", + "typescript": "^4.5.3", "webpack": "^5.37.0", "webpack-cli": "^4.7.0", "webpack-dev-server": "^3.11.2" diff --git a/front/yarn.lock b/front/yarn.lock index 2af31d13..37834b34 100644 --- a/front/yarn.lock +++ b/front/yarn.lock @@ -2,13 +2,6 @@ # yarn lockfile v1 -"@babel/code-frame@7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" - integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== - dependencies: - "@babel/highlight" "^7.10.4" - "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.8.3": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658" @@ -21,7 +14,7 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz#d26cad8a47c65286b15df1547319a5d0bcf27288" integrity sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A== -"@babel/highlight@^7.10.4", "@babel/highlight@^7.12.13": +"@babel/highlight@^7.12.13": version "7.14.0" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.0.tgz#3197e375711ef6bf834e67d0daec88e4f46113cf" integrity sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg== @@ -37,23 +30,35 @@ dependencies: regenerator-runtime "^0.13.4" +"@cspotcode/source-map-consumer@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b" + integrity sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg== + +"@cspotcode/source-map-support@0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz#4789840aa859e46d2f3173727ab707c66bf344f5" + integrity sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA== + dependencies: + "@cspotcode/source-map-consumer" "0.8.0" + "@discoveryjs/json-ext@^0.5.0": version "0.5.3" resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.3.tgz#90420f9f9c6d3987f176a19a7d8e764271a2f55d" integrity sha512-Fxt+AfXgjMoin2maPIYzFZnQjAXjAL0PHscM5pRTtatFqB+vZxAM9tLp2Optnuw3QOQC40jTNeGYFOMvyf7v9g== -"@eslint/eslintrc@^0.4.1": - version "0.4.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.1.tgz#442763b88cecbe3ee0ec7ca6d6dd6168550cbf14" - integrity sha512-5v7TDE9plVhvxQeWLXDTvFvJBdH6pEsdnl2g/dAptmuFEPedQ4Erq5rsDsX+mvAM610IhNaO2W5V1dOOnDKxkQ== +"@eslint/eslintrc@^1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.0.5.tgz#33f1b838dbf1f923bfa517e008362b78ddbbf318" + integrity sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ== dependencies: ajv "^6.12.4" - debug "^4.1.1" - espree "^7.3.0" - globals "^12.1.0" + debug "^4.3.2" + espree "^9.2.0" + globals "^13.9.0" ignore "^4.0.6" import-fresh "^3.2.1" - js-yaml "^3.13.1" + js-yaml "^4.1.0" minimatch "^3.0.4" strip-json-comments "^3.1.1" @@ -88,6 +93,20 @@ dependencies: "@fortawesome/fontawesome-common-types" "^0.2.35" +"@humanwhocodes/config-array@^0.9.2": + version "0.9.2" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.9.2.tgz#68be55c737023009dfc5fe245d51181bb6476914" + integrity sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA== + dependencies: + "@humanwhocodes/object-schema" "^1.2.1" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/object-schema@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + "@joeattardi/emoji-button@^4.6.2": version "4.6.2" resolved "https://registry.yarnpkg.com/@joeattardi/emoji-button/-/emoji-button-4.6.2.tgz#75baf4ce27324e4d6fb90292f8b248235f638ad0" @@ -136,6 +155,26 @@ resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.12.0.tgz#b7395688a79403c6df8d8bb8d81deb8222519853" integrity sha512-urtgLzE4EDMAYQHYdkgC0Ei9QvLajodK1ntg71bGn0Pm84QUpaqpPDfHRU+i6jLeteyC7kWwa5O5W1m/jrjGXA== +"@tsconfig/node10@^1.0.7": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9" + integrity sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg== + +"@tsconfig/node12@^1.0.7": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.9.tgz#62c1f6dee2ebd9aead80dc3afa56810e58e1a04c" + integrity sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw== + +"@tsconfig/node14@^1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.1.tgz#95f2d167ffb9b8d2068b0b235302fafd4df711f2" + integrity sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg== + +"@tsconfig/node16@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" + integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== + "@tsconfig/svelte@^1.0.10": version "1.0.10" resolved "https://registry.yarnpkg.com/@tsconfig/svelte/-/svelte-1.0.10.tgz#30ec7feeee0bdf38b12a50f0686f8a2e7b6b9dc0" @@ -239,11 +278,16 @@ resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-3.7.4.tgz#99a49aa9a5f8dc86fc249ed13ed59552c6ce862d" integrity sha512-L3FKeEwMm8e8hqGvt7cSesVmGtavpRyHV1FNDq+Pm5pS4x5eFmE70ZERXCSBWAiLQqXBcZRUrwV59FZLQl/GxQ== -"@types/json-schema@*", "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6": +"@types/json-schema@*", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6": version "7.0.7" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== +"@types/json-schema@^7.0.9": + version "7.0.9" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" + integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== + "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" @@ -393,75 +437,75 @@ "@types/webpack-sources" "*" source-map "^0.6.0" -"@typescript-eslint/eslint-plugin@^4.23.0": - version "4.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.23.0.tgz#29d3c9c81f6200b1fd6d8454cfb007ba176cde80" - integrity sha512-tGK1y3KIvdsQEEgq6xNn1DjiFJtl+wn8JJQiETtCbdQxw1vzjXyAaIkEmO2l6Nq24iy3uZBMFQjZ6ECf1QdgGw== +"@typescript-eslint/eslint-plugin@^5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.6.0.tgz#efd8668b3d6627c46ce722c2afe813928fe120a0" + integrity sha512-MIbeMy5qfLqtgs1hWd088k1hOuRsN9JrHUPwVVKCD99EOUqScd7SrwoZl4Gso05EAP9w1kvLWUVGJOVpRPkDPA== dependencies: - "@typescript-eslint/experimental-utils" "4.23.0" - "@typescript-eslint/scope-manager" "4.23.0" - debug "^4.1.1" + "@typescript-eslint/experimental-utils" "5.6.0" + "@typescript-eslint/scope-manager" "5.6.0" + debug "^4.3.2" functional-red-black-tree "^1.0.1" - lodash "^4.17.15" - regexpp "^3.0.0" - semver "^7.3.2" - tsutils "^3.17.1" + ignore "^5.1.8" + regexpp "^3.2.0" + semver "^7.3.5" + tsutils "^3.21.0" -"@typescript-eslint/experimental-utils@4.23.0": - version "4.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.23.0.tgz#f2059434cd6e5672bfeab2fb03b7c0a20622266f" - integrity sha512-WAFNiTDnQfrF3Z2fQ05nmCgPsO5o790vOhmWKXbbYQTO9erE1/YsFot5/LnOUizLzU2eeuz6+U/81KV5/hFTGA== +"@typescript-eslint/experimental-utils@5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.6.0.tgz#f3a5960f2004abdcac7bb81412bafc1560841c23" + integrity sha512-VDoRf3Qj7+W3sS/ZBXZh3LBzp0snDLEgvp6qj0vOAIiAPM07bd5ojQ3CTzF/QFl5AKh7Bh1ycgj6lFBJHUt/DA== dependencies: - "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.23.0" - "@typescript-eslint/types" "4.23.0" - "@typescript-eslint/typescript-estree" "4.23.0" - eslint-scope "^5.0.0" - eslint-utils "^2.0.0" + "@types/json-schema" "^7.0.9" + "@typescript-eslint/scope-manager" "5.6.0" + "@typescript-eslint/types" "5.6.0" + "@typescript-eslint/typescript-estree" "5.6.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" -"@typescript-eslint/parser@^4.23.0": - version "4.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.23.0.tgz#239315d38e42e852bef43a4b0b01bef78f78911c" - integrity sha512-wsvjksHBMOqySy/Pi2Q6UuIuHYbgAMwLczRl4YanEPKW5KVxI9ZzDYh3B5DtcZPQTGRWFJrfcbJ6L01Leybwug== +"@typescript-eslint/parser@^5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.6.0.tgz#11677324659641400d653253c03dcfbed468d199" + integrity sha512-YVK49NgdUPQ8SpCZaOpiq1kLkYRPMv9U5gcMrywzI8brtwZjr/tG3sZpuHyODt76W/A0SufNjYt9ZOgrC4tLIQ== dependencies: - "@typescript-eslint/scope-manager" "4.23.0" - "@typescript-eslint/types" "4.23.0" - "@typescript-eslint/typescript-estree" "4.23.0" - debug "^4.1.1" + "@typescript-eslint/scope-manager" "5.6.0" + "@typescript-eslint/types" "5.6.0" + "@typescript-eslint/typescript-estree" "5.6.0" + debug "^4.3.2" -"@typescript-eslint/scope-manager@4.23.0": - version "4.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.23.0.tgz#8792ef7eacac122e2ec8fa2d30a59b8d9a1f1ce4" - integrity sha512-ZZ21PCFxPhI3n0wuqEJK9omkw51wi2bmeKJvlRZPH5YFkcawKOuRMQMnI8mH6Vo0/DoHSeZJnHiIx84LmVQY+w== +"@typescript-eslint/scope-manager@5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.6.0.tgz#9dd7f007dc8f3a34cdff6f79f5eaab27ae05157e" + integrity sha512-1U1G77Hw2jsGWVsO2w6eVCbOg0HZ5WxL/cozVSTfqnL/eB9muhb8THsP0G3w+BB5xAHv9KptwdfYFAUfzcIh4A== dependencies: - "@typescript-eslint/types" "4.23.0" - "@typescript-eslint/visitor-keys" "4.23.0" + "@typescript-eslint/types" "5.6.0" + "@typescript-eslint/visitor-keys" "5.6.0" -"@typescript-eslint/types@4.23.0": - version "4.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.23.0.tgz#da1654c8a5332f4d1645b2d9a1c64193cae3aa3b" - integrity sha512-oqkNWyG2SLS7uTWLZf6Sr7Dm02gA5yxiz1RP87tvsmDsguVATdpVguHr4HoGOcFOpCvx9vtCSCyQUGfzq28YCw== +"@typescript-eslint/types@5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.6.0.tgz#745cb1b59daadcc1f32f7be95f0f68accf38afdd" + integrity sha512-OIZffked7mXv4mXzWU5MgAEbCf9ecNJBKi+Si6/I9PpTaj+cf2x58h2oHW5/P/yTnPkKaayfjhLvx+crnl5ubA== -"@typescript-eslint/typescript-estree@4.23.0": - version "4.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.23.0.tgz#0753b292097523852428a6f5a1aa8ccc1aae6cd9" - integrity sha512-5Sty6zPEVZF5fbvrZczfmLCOcby3sfrSPu30qKoY1U3mca5/jvU5cwsPb/CO6Q3ByRjixTMIVsDkqwIxCf/dMw== +"@typescript-eslint/typescript-estree@5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.6.0.tgz#dfbb19c9307fdd81bd9c650c67e8397821d7faf0" + integrity sha512-92vK5tQaE81rK7fOmuWMrSQtK1IMonESR+RJR2Tlc7w4o0MeEdjgidY/uO2Gobh7z4Q1hhS94Cr7r021fMVEeA== dependencies: - "@typescript-eslint/types" "4.23.0" - "@typescript-eslint/visitor-keys" "4.23.0" - debug "^4.1.1" - globby "^11.0.1" - is-glob "^4.0.1" - semver "^7.3.2" - tsutils "^3.17.1" + "@typescript-eslint/types" "5.6.0" + "@typescript-eslint/visitor-keys" "5.6.0" + debug "^4.3.2" + globby "^11.0.4" + is-glob "^4.0.3" + semver "^7.3.5" + tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@4.23.0": - version "4.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.23.0.tgz#7215cc977bd3b4ef22467b9023594e32f9e4e455" - integrity sha512-5PNe5cmX9pSifit0H+nPoQBXdbNzi5tOEec+3riK+ku4e3er37pKxMKDH5Ct5Y4fhWxcD4spnlYjxi9vXbSpwg== +"@typescript-eslint/visitor-keys@5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.6.0.tgz#3e36509e103fe9713d8f035ac977235fd63cb6e6" + integrity sha512-1p7hDp5cpRFUyE3+lvA74egs+RWSgumrBpzBCDzfTFv0aQ7lIeay80yU0hIxgAhwQ6PcasW35kaOCyDOv6O/Ng== dependencies: - "@typescript-eslint/types" "4.23.0" - eslint-visitor-keys "^2.0.0" + "@typescript-eslint/types" "5.6.0" + eslint-visitor-keys "^3.0.0" "@webassemblyjs/ast@1.11.0": version "1.11.0" @@ -624,16 +668,21 @@ acorn-jsx@^5.3.1: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" integrity sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng== -acorn@^7.4.0: - version "7.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" - integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== +acorn-walk@^8.1.1: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== acorn@^8.2.1: version "8.2.4" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.2.4.tgz#caba24b08185c3b56e3168e97d15ed17f4d31fd0" integrity sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg== +acorn@^8.4.1, acorn@^8.6.0: + version "8.6.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.6.0.tgz#e3692ba0eb1a0c83eaa4f37f5fa7368dd7142895" + integrity sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw== + after@0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" @@ -667,16 +716,6 @@ ajv@^6.1.0, ajv@^6.10.0, ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.1: - version "8.4.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.4.0.tgz#48984fdb2ce225cab15795f0772a8d85669075e4" - integrity sha512-7QD2l6+KBSLwf+7MuYocbWvRPdOu63/trReTLu2KFwkgctnub1auoF+Y1WYcm09CTM7quuscrzqmASaLHC/K4Q== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - ansi-colors@^3.0.0: version "3.2.4" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" @@ -714,6 +753,11 @@ ansi-regex@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" @@ -749,12 +793,10 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== arr-diff@^4.0.0: version "4.0.0" @@ -1628,13 +1670,20 @@ debug@^3.1.1, debug@^3.2.6: dependencies: ms "^2.1.1" -debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: +debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== dependencies: ms "2.1.2" +debug@^4.3.2: + version "4.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" + integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== + dependencies: + ms "2.1.2" + debug@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" @@ -2041,12 +2090,17 @@ escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + eslint-plugin-svelte3@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/eslint-plugin-svelte3/-/eslint-plugin-svelte3-3.2.1.tgz#f0f24150ecea3061c38c69e282bea26dc3e660c6" integrity sha512-YoBR9mLoKCjGghJ/gvpnFZKaMEu/VRcuxpSRS8KuozuEo7CdBH7bmBHa6FmMm0i4kJnOyx+PVsaptz96K6H/4Q== -eslint-scope@^5.0.0, eslint-scope@^5.1.1: +eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -2054,79 +2108,83 @@ eslint-scope@^5.0.0, eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-utils@^2.0.0, eslint-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" - integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== +eslint-scope@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.0.tgz#c1f6ea30ac583031f203d65c73e723b01298f153" + integrity sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg== dependencies: - eslint-visitor-keys "^1.1.0" + esrecurse "^4.3.0" + estraverse "^5.2.0" -eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" - integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" eslint-visitor-keys@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint@^7.26.0: - version "7.26.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.26.0.tgz#d416fdcdcb3236cd8f282065312813f8c13982f6" - integrity sha512-4R1ieRf52/izcZE7AlLy56uIHHDLT74Yzz2Iv2l6kDaYvEu9x+wMB5dZArVL8SYGXSYV2YAg70FcW5Y5nGGNIg== +eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz#eee4acea891814cda67a7d8812d9647dd0179af2" + integrity sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA== + +eslint@^8.4.1: + version "8.4.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.4.1.tgz#d6531bbf3e598dffd7c0c7d35ec52a0b30fdfa2d" + integrity sha512-TxU/p7LB1KxQ6+7aztTnO7K0i+h0tDi81YRY9VzB6Id71kNz+fFYnf5HD5UOQmxkzcoa0TlVZf9dpMtUv0GpWg== dependencies: - "@babel/code-frame" "7.12.11" - "@eslint/eslintrc" "^0.4.1" + "@eslint/eslintrc" "^1.0.5" + "@humanwhocodes/config-array" "^0.9.2" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" - debug "^4.0.1" + debug "^4.3.2" doctrine "^3.0.0" enquirer "^2.3.5" - eslint-scope "^5.1.1" - eslint-utils "^2.1.0" - eslint-visitor-keys "^2.0.0" - espree "^7.3.1" + escape-string-regexp "^4.0.0" + eslint-scope "^7.1.0" + eslint-utils "^3.0.0" + eslint-visitor-keys "^3.1.0" + espree "^9.2.0" esquery "^1.4.0" esutils "^2.0.2" + fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" functional-red-black-tree "^1.0.1" - glob-parent "^5.0.0" + glob-parent "^6.0.1" globals "^13.6.0" ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" - js-yaml "^3.13.1" + js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" - lodash "^4.17.21" + lodash.merge "^4.6.2" minimatch "^3.0.4" natural-compare "^1.4.0" optionator "^0.9.1" progress "^2.0.0" - regexpp "^3.1.0" + regexpp "^3.2.0" semver "^7.2.1" - strip-ansi "^6.0.0" + strip-ansi "^6.0.1" strip-json-comments "^3.1.0" - table "^6.0.4" text-table "^0.2.0" v8-compile-cache "^2.0.3" -espree@^7.3.0, espree@^7.3.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" - integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== +espree@^9.2.0: + version "9.2.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.2.0.tgz#c50814e01611c2d0f8bd4daa83c369eabba80dbc" + integrity sha512-oP3utRkynpZWF/F2x/HZJ+AGtnIclaR7z1pYPxy7NYM2fSO6LgK/Rkny8anRSPK/VwEA1eqm2squui0T7ZMOBg== dependencies: - acorn "^7.4.0" + acorn "^8.6.0" acorn-jsx "^5.3.1" - eslint-visitor-keys "^1.3.0" - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + eslint-visitor-keys "^3.1.0" esquery@^1.4.0: version "1.4.0" @@ -2308,7 +2366,7 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -fast-deep-equal@^3.1.1: +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== @@ -2462,10 +2520,10 @@ foreach@^2.0.5: resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= -fork-ts-checker-webpack-plugin@^6.2.9: - version "6.2.9" - resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.2.9.tgz#08f51b685a48b09ab3ec079a8501762422443120" - integrity sha512-D/KSb/2VeiOy3odDerrC16WiZ1t5TLwiFfZmuDeTXcf3Km79M+f8nTCIdKkokxybybrgMcStbx0QpGaseePxnA== +fork-ts-checker-webpack-plugin@^6.5.0: + version "6.5.0" + resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.0.tgz#0282b335fa495a97e167f69018f566ea7d2a2b5e" + integrity sha512-cS178Y+xxtIjEUorcHddKS7yCMlrDPV31mt47blKKRfMd70Kxu5xruAFE2o9sDY6wVC5deuob/u/alD04YYHnw== dependencies: "@babel/code-frame" "^7.8.3" "@types/json-schema" "^7.0.5" @@ -2609,13 +2667,20 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.0, glob-parent@~5.1.2: +glob-parent@^5.1.0, glob-parent@~5.1.0, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" +glob-parent@^6.0.1: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob-to-regexp@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" @@ -2633,13 +2698,6 @@ glob@^7.0.3, glob@^7.1.3, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^12.1.0: - version "12.4.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" - integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== - dependencies: - type-fest "^0.8.1" - globals@^13.6.0: version "13.8.0" resolved "https://registry.yarnpkg.com/globals/-/globals-13.8.0.tgz#3e20f504810ce87a8d72e55aecf8435b50f4c1b3" @@ -2647,10 +2705,17 @@ globals@^13.6.0: dependencies: type-fest "^0.20.2" -globby@^11.0.1: - version "11.0.3" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.3.tgz#9b1f0cb523e171dd1ad8c7b2a9fb4b644b9593cb" - integrity sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== +globals@^13.9.0: + version "13.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.12.0.tgz#4d733760304230a0082ed96e21e5c565f898089e" + integrity sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg== + dependencies: + type-fest "^0.20.2" + +globby@^11.0.4: + version "11.0.4" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5" + integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" @@ -2951,6 +3016,11 @@ ignore@^5.1.4: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== +ignore@^5.1.8: + version "5.1.9" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.9.tgz#9ec1a5cbe8e1446ec60d4420060d43aa6e7382fb" + integrity sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ== + import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" @@ -3193,6 +3263,13 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" +is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + is-nan@^1.2.1: version "1.3.2" resolved "https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d" @@ -3374,13 +3451,12 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: - argparse "^1.0.7" - esprima "^4.0.0" + argparse "^2.0.1" json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" @@ -3397,11 +3473,6 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== -json-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" @@ -3576,22 +3647,17 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" -lodash.clonedeep@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" - integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= - lodash.isequal@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA= -lodash.truncate@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" - integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21: +lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.20: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -4762,10 +4828,10 @@ regexp.prototype.flags@^1.2.0: call-bind "^1.0.2" define-properties "^1.1.3" -regexpp@^3.0.0, regexpp@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" - integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== +regexpp@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== relateurl@^0.2.7: version "0.2.7" @@ -4803,11 +4869,6 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= -require-from-string@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - require-main-filename@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" @@ -5291,7 +5352,7 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.5.17, source-map-support@~0.5.12, source-map-support@~0.5.19: +source-map-support@~0.5.12, source-map-support@~0.5.19: version "0.5.19" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== @@ -5375,11 +5436,6 @@ split-string@^3.0.1, split-string@^3.0.2: dependencies: extend-shallow "^3.0.0" -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - standardized-audio-context@^25.2.4: version "25.2.4" resolved "https://registry.yarnpkg.com/standardized-audio-context/-/standardized-audio-context-25.2.4.tgz#d64dbdd70615171ec90d1b7151a0d945af94cf3d" @@ -5512,6 +5568,13 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" +strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -5614,18 +5677,6 @@ tabbable@^4.0.0: resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-4.0.0.tgz#5bff1d1135df1482cf0f0206434f15eadbeb9261" integrity sha512-H1XoH1URcBOa/rZZWxLxHCtOdVUEev+9vo5YdYhC9tCY4wnybX+VQrCYuy9ubkg69fCBxCONJOSLGfw0DWMffQ== -table@^6.0.4: - version "6.7.1" - resolved "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2" - integrity sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg== - dependencies: - ajv "^8.0.1" - lodash.clonedeep "^4.5.0" - lodash.truncate "^4.4.2" - slice-ansi "^4.0.0" - string-width "^4.2.0" - strip-ansi "^6.0.0" - tapable@^1.0.0: version "1.1.3" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" @@ -5735,26 +5786,32 @@ toidentifier@1.0.0: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== -ts-loader@^9.1.2: - version "9.1.2" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.1.2.tgz#ba9b9abb05a514e8ff825791a3f6fcf793272728" - integrity sha512-ryMgATvLLl+z8zQvdlm6Pep0slmwxFWIEnq/5VdiLVjqQXnFJgO+qNLGIIP+d2N2jsFZ9MibZCVDb2bSp7OmEA== +ts-loader@^9.2.6: + version "9.2.6" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.2.6.tgz#9937c4dd0a1e3dbbb5e433f8102a6601c6615d74" + integrity sha512-QMTC4UFzHmu9wU2VHZEmWWE9cUajjfcdcws+Gh7FhiO+Dy0RnR1bNz0YCHqhI0yRowCE9arVnNxYHqELOy9Hjw== dependencies: chalk "^4.1.0" enhanced-resolve "^5.0.0" micromatch "^4.0.0" semver "^7.3.4" -ts-node@^9.1.1: - version "9.1.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d" - integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg== +ts-node@^10.4.0: + version "10.4.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.4.0.tgz#680f88945885f4e6cf450e7f0d6223dd404895f7" + integrity sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A== dependencies: + "@cspotcode/source-map-support" "0.7.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" arg "^4.1.0" create-require "^1.1.0" diff "^4.0.1" make-error "^1.1.1" - source-map-support "^0.5.17" yn "3.1.1" tsconfig-paths@^3.9.0: @@ -5777,7 +5834,7 @@ tslib@^2.0.0, tslib@^2.0.3, tslib@^2.2.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e" integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg== -tsutils@^3.17.1: +tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== @@ -5821,11 +5878,6 @@ type-fest@^0.21.3: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== -type-fest@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" - integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== - type-is@~1.6.17, type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" @@ -5839,10 +5891,10 @@ typescript@*: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805" integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw== -typescript@^4.2.4: - version "4.2.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961" - integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg== +typescript@^4.5.3: + version "4.5.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.3.tgz#afaa858e68c7103317d89eb90c5d8906268d353c" + integrity sha512-eVYaEHALSt+s9LbvgEv4Ef+Tdq7hBiIZgii12xXJnukryt3pMgJf6aKhoCZ3FWQsu6sydEnkg11fYXLzhLBjeQ== unbox-primitive@^1.0.0: version "1.0.1" From 2fff6ae41e0623fdb0d37565ba74a8488817fae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Tue, 14 Dec 2021 18:55:41 +0100 Subject: [PATCH 07/33] Improving code security by adding stricter typings --- front/src/Connexion/ConnectionManager.ts | 7 +++-- front/src/Connexion/Room.ts | 31 ++++++++++++------- front/src/Messages/JsonMessages/.gitignore | 2 ++ .../JsonMessages}/CharacterTexture.ts | 0 .../JsonMessages}/MapDetailsData.ts | 4 +-- .../JsonMessages}/RoomRedirect.ts | 0 messages/package.json | 7 +++-- messages/yarn.lock | 5 +++ .../src/Controller/AuthenticateController.ts | 4 +-- pusher/src/Controller/MapController.ts | 2 +- pusher/src/Messages/JsonMessages/.gitignore | 2 ++ pusher/src/Services/SocketManager.ts | 4 +-- 12 files changed, 45 insertions(+), 23 deletions(-) create mode 100644 front/src/Messages/JsonMessages/.gitignore rename {pusher/src/Services/AdminApi => messages/JsonMessages}/CharacterTexture.ts (100%) rename {pusher/src/Services/AdminApi => messages/JsonMessages}/MapDetailsData.ts (87%) rename {pusher/src/Services/AdminApi => messages/JsonMessages}/RoomRedirect.ts (100%) create mode 100644 pusher/src/Messages/JsonMessages/.gitignore diff --git a/front/src/Connexion/ConnectionManager.ts b/front/src/Connexion/ConnectionManager.ts index 05d84367..39bb079c 100644 --- a/front/src/Connexion/ConnectionManager.ts +++ b/front/src/Connexion/ConnectionManager.ts @@ -11,6 +11,7 @@ import { loginSceneVisibleIframeStore } from "../Stores/LoginSceneStore"; import { userIsConnected } from "../Stores/MenuStore"; import { analyticsClient } from "../Administration/AnalyticsClient"; import { axiosWithRetry } from "./AxiosUtils"; +import axios from "axios"; class ConnectionManager { private localUser!: LocalUser; @@ -192,11 +193,11 @@ class ConnectionManager { analyticsClient.loggedWithSso(); } catch (err) { console.error(err); - //if user must to be connect in current room or pusher error is not openid provier access error - //try to connected with function loadOpenIDScreen + // if the user must be connected in the current room or if the pusher error is not openid provider access error + // try to connect with function loadOpenIDScreen if ( this._currentRoom.authenticationMandatory || - (err.response?.data && err.response.data !== "User cannot to be connected on openid provier") + (axios.isAxiosError(err) && err.response?.data && err.response.data !== "User cannot to be connected on openid provider") ) { this.loadOpenIDScreen(); return Promise.reject(new Error("You will be redirect on login page")); diff --git a/front/src/Connexion/Room.ts b/front/src/Connexion/Room.ts index 044d8d67..15ac9502 100644 --- a/front/src/Connexion/Room.ts +++ b/front/src/Connexion/Room.ts @@ -5,6 +5,8 @@ import type { CharacterTexture } from "./LocalUser"; import { localUserStore } from "./LocalUserStore"; import axios from "axios"; import { axiosWithRetry } from "./AxiosUtils"; +import {isMapDetailsData} from "../../../pusher/src/Messages/JsonMessages/MapDetailsData"; +import {isRoomRedirect} from "../Messages/JsonMessages/RoomRedirect"; export class MapDetail { constructor(public readonly mapUrl: string, public readonly textures: CharacterTexture[] | undefined) {} @@ -101,27 +103,34 @@ export class Room { }); const data = result.data; - if (data.redirectUrl) { + + if (isRoomRedirect(data.redirectUrl)) { return { redirectUrl: data.redirectUrl as string, }; + } else if (isMapDetailsData(data)) { + console.log("Map ", this.id, " resolves to URL ", data.mapUrl); + this._mapUrl = data.mapUrl; + this._textures = data.textures; + this._group = data.group; + this._authenticationMandatory = + data.authenticationMandatory != null ? data.authenticationMandatory : DISABLE_ANONYMOUS; + this._iframeAuthentication = data.iframeAuthentication || OPID_LOGIN_SCREEN_PROVIDER; + this._contactPage = data.contactPage || CONTACT_URL; + return new MapDetail(data.mapUrl, data.textures); + } else { + throw new Error('Data received by the /map endpoint of the Pusher is not in a valid format.'); } - console.log("Map ", this.id, " resolves to URL ", data.mapUrl); - this._mapUrl = data.mapUrl; - this._textures = data.textures; - this._group = data.group; - this._authenticationMandatory = - data.authenticationMandatory != null ? data.authenticationMandatory : DISABLE_ANONYMOUS; - this._iframeAuthentication = data.iframeAuthentication || OPID_LOGIN_SCREEN_PROVIDER; - this._contactPage = data.contactPage || CONTACT_URL; - return new MapDetail(data.mapUrl, data.textures); + } catch (e) { if (axios.isAxiosError(e) && e.response?.status == 401 && e.response?.data === "Token decrypted error") { console.warn("JWT token sent could not be decrypted. Maybe it expired?"); localUserStore.setAuthToken(null); window.location.assign("/login"); - } else { + } else if (axios.isAxiosError(e)) { console.error("Error => getMapDetail", e, e.response); + } else { + console.error("Error => getMapDetail", e); } throw e; } diff --git a/front/src/Messages/JsonMessages/.gitignore b/front/src/Messages/JsonMessages/.gitignore new file mode 100644 index 00000000..d6b7ef32 --- /dev/null +++ b/front/src/Messages/JsonMessages/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/pusher/src/Services/AdminApi/CharacterTexture.ts b/messages/JsonMessages/CharacterTexture.ts similarity index 100% rename from pusher/src/Services/AdminApi/CharacterTexture.ts rename to messages/JsonMessages/CharacterTexture.ts diff --git a/pusher/src/Services/AdminApi/MapDetailsData.ts b/messages/JsonMessages/MapDetailsData.ts similarity index 87% rename from pusher/src/Services/AdminApi/MapDetailsData.ts rename to messages/JsonMessages/MapDetailsData.ts index 7a1f57ff..d359edf2 100644 --- a/pusher/src/Services/AdminApi/MapDetailsData.ts +++ b/messages/JsonMessages/MapDetailsData.ts @@ -1,7 +1,6 @@ import * as tg from "generic-type-guard"; -import { GameRoomPolicyTypes } from "_Model/PusherRoom"; import { isCharacterTexture } from "./CharacterTexture"; -import { isAny, isNumber } from "generic-type-guard"; +import { isNumber } from "generic-type-guard"; /*const isNumericEnum = (vs: T) => @@ -17,6 +16,7 @@ export const isMapDetailsData = new tg.IsInterface() textures: tg.isArray(isCharacterTexture), contactPage: tg.isUnion(tg.isString, tg.isUndefined), authenticationMandatory: tg.isUnion(tg.isBoolean, tg.isUndefined), + group: tg.isString, }) .get(); diff --git a/pusher/src/Services/AdminApi/RoomRedirect.ts b/messages/JsonMessages/RoomRedirect.ts similarity index 100% rename from pusher/src/Services/AdminApi/RoomRedirect.ts rename to messages/JsonMessages/RoomRedirect.ts diff --git a/messages/package.json b/messages/package.json index 636f4647..d4906977 100644 --- a/messages/package.json +++ b/messages/package.json @@ -7,10 +7,13 @@ "copy-to-back": "rm -rf ../back/src/Messages/generated && cp -rf generated/ ../back/src/Messages/generated", "copy-to-front": "rm -rf ../front/src/Messages/generated && cp -rf generated/ ../front/src/Messages/generated", "copy-to-pusher": "rm -rf ../pusher/src/Messages/generated && cp -rf generated/ ../pusher/src/Messages/generated", - "proto-all": "yarn run proto && yarn run copy-to-back && yarn run copy-to-front && yarn run copy-to-pusher", - "proto:watch": "yarn run proto-all; inotifywait -q -m -e close_write protos/messages.proto | while read -r filename event; do yarn run proto-all; done" + "json-copy-to-pusher": "rm -rf ../pusher/src/Messages/JsonMessages/* && cp -rf JsonMessages/* ../pusher/src/Messages/JsonMessages/", + "json-copy-to-front": "rm -rf ../front/src/Messages/JsonMessages/* && cp -rf JsonMessages/* ../front/src/Messages/JsonMessages/", + "proto-all": "yarn run proto && yarn run copy-to-back && yarn run copy-to-front && yarn run copy-to-pusher && yarn run json-copy-to-pusher && yarn run json-copy-to-front", + "proto:watch": "yarn run proto-all; inotifywait -q -m -e close_write protos/messages.proto JsonMessages/ | while read -r filename event; do yarn run proto-all; done" }, "dependencies": { + "generic-type-guard": "^3.5.0", "google-protobuf": "^3.13.0", "grpc": "^1.24.4" }, diff --git a/messages/yarn.lock b/messages/yarn.lock index 2c9d3000..2f4a00bf 100644 --- a/messages/yarn.lock +++ b/messages/yarn.lock @@ -1788,6 +1788,11 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" +generic-type-guard@^3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/generic-type-guard/-/generic-type-guard-3.5.0.tgz#39de9f8fceee65d79e7540959f0e7b23210c07b6" + integrity sha512-OpgXv/sbRobhFboaSyN/Tsh97Sxt5pcfLLxCiYZgYIIWFFp+kn2EzAXiaQZKEVRlq1rOE/zh8cYhJXEwplbJiQ== + get-caller-file@^2.0.1: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" diff --git a/pusher/src/Controller/AuthenticateController.ts b/pusher/src/Controller/AuthenticateController.ts index 47d35fab..e2089c89 100644 --- a/pusher/src/Controller/AuthenticateController.ts +++ b/pusher/src/Controller/AuthenticateController.ts @@ -83,7 +83,7 @@ export class AuthenticateController extends BaseController { console.error("Token cannot to be check on OpenId provider"); res.writeStatus("500"); res.writeHeader("Access-Control-Allow-Origin", FRONT_URL); - res.end("User cannot to be connected on openid provier"); + res.end("User cannot to be connected on openid provider"); return; } @@ -105,7 +105,7 @@ export class AuthenticateController extends BaseController { console.error("User cannot to be connected on OpenId provider => ", err); res.writeStatus("500"); res.writeHeader("Access-Control-Allow-Origin", FRONT_URL); - res.end("User cannot to be connected on openid provier"); + res.end("User cannot to be connected on openid provider"); return; } const email = userInfo.email || userInfo.sub; diff --git a/pusher/src/Controller/MapController.ts b/pusher/src/Controller/MapController.ts index 23eef566..3277bd84 100644 --- a/pusher/src/Controller/MapController.ts +++ b/pusher/src/Controller/MapController.ts @@ -4,7 +4,7 @@ import { parse } from "query-string"; import { adminApi } from "../Services/AdminApi"; import { ADMIN_API_URL, DISABLE_ANONYMOUS, FRONT_URL } from "../Enum/EnvironmentVariable"; import { GameRoomPolicyTypes } from "../Model/PusherRoom"; -import { isMapDetailsData, MapDetailsData } from "../Services/AdminApi/MapDetailsData"; +import { isMapDetailsData, MapDetailsData } from "../Messages/JsonMessages/MapDetailsData"; import { socketManager } from "../Services/SocketManager"; import { AuthTokenData, jwtTokenManager } from "../Services/JWTTokenManager"; import { v4 } from "uuid"; diff --git a/pusher/src/Messages/JsonMessages/.gitignore b/pusher/src/Messages/JsonMessages/.gitignore new file mode 100644 index 00000000..d6b7ef32 --- /dev/null +++ b/pusher/src/Messages/JsonMessages/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/pusher/src/Services/SocketManager.ts b/pusher/src/Services/SocketManager.ts index 083840e4..f66e20fc 100644 --- a/pusher/src/Services/SocketManager.ts +++ b/pusher/src/Services/SocketManager.ts @@ -47,8 +47,8 @@ import { GroupDescriptor, UserDescriptor, ZoneEventListener } from "_Model/Zone" import Debug from "debug"; import { ExAdminSocketInterface } from "_Model/Websocket/ExAdminSocketInterface"; import { WebSocket } from "uWebSockets.js"; -import { isRoomRedirect } from "./AdminApi/RoomRedirect"; -import { CharacterTexture } from "./AdminApi/CharacterTexture"; +import { isRoomRedirect } from "../Messages/JsonMessages/RoomRedirect"; +import { CharacterTexture } from "../Messages/JsonMessages/CharacterTexture"; const debug = Debug("socket"); From 10b7fee50260d1e1d86614ff14ba097011a72be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Tue, 14 Dec 2021 19:03:02 +0100 Subject: [PATCH 08/33] Even better typing of messages in /map --- messages/JsonMessages/MapDetailsData.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/messages/JsonMessages/MapDetailsData.ts b/messages/JsonMessages/MapDetailsData.ts index d359edf2..899506b7 100644 --- a/messages/JsonMessages/MapDetailsData.ts +++ b/messages/JsonMessages/MapDetailsData.ts @@ -16,7 +16,10 @@ export const isMapDetailsData = new tg.IsInterface() textures: tg.isArray(isCharacterTexture), contactPage: tg.isUnion(tg.isString, tg.isUndefined), authenticationMandatory: tg.isUnion(tg.isBoolean, tg.isUndefined), - group: tg.isString, + group: tg.isNullable(tg.isString), + }) + .withOptionalProperties({ + iframeAuthentication: tg.isNullable(tg.isString), }) .get(); From 4385d5aff979f6d6d00df75d13394f779e9f2391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Tue, 14 Dec 2021 19:05:14 +0100 Subject: [PATCH 09/33] Adding warning messages regarding files copying --- messages/JsonMessages/CharacterTexture.ts | 5 +++++ messages/JsonMessages/MapDetailsData.ts | 8 ++++---- messages/JsonMessages/RoomRedirect.ts | 5 +++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/messages/JsonMessages/CharacterTexture.ts b/messages/JsonMessages/CharacterTexture.ts index 055b3033..eb2ec15e 100644 --- a/messages/JsonMessages/CharacterTexture.ts +++ b/messages/JsonMessages/CharacterTexture.ts @@ -1,5 +1,10 @@ import * as tg from "generic-type-guard"; +/* + * WARNING! The original file is in /messages/JsonMessages. + * All other files are automatically copied from this file on container startup / build + */ + export const isCharacterTexture = new tg.IsInterface() .withProperties({ id: tg.isNumber, diff --git a/messages/JsonMessages/MapDetailsData.ts b/messages/JsonMessages/MapDetailsData.ts index 899506b7..ff18acc3 100644 --- a/messages/JsonMessages/MapDetailsData.ts +++ b/messages/JsonMessages/MapDetailsData.ts @@ -2,10 +2,10 @@ import * as tg from "generic-type-guard"; import { isCharacterTexture } from "./CharacterTexture"; import { isNumber } from "generic-type-guard"; -/*const isNumericEnum = - (vs: T) => - (v: any): v is T => - typeof v === "number" && v in vs;*/ +/* + * WARNING! The original file is in /messages/JsonMessages. + * All other files are automatically copied from this file on container startup / build + */ export const isMapDetailsData = new tg.IsInterface() .withProperties({ diff --git a/messages/JsonMessages/RoomRedirect.ts b/messages/JsonMessages/RoomRedirect.ts index 7257ebd3..1eb09937 100644 --- a/messages/JsonMessages/RoomRedirect.ts +++ b/messages/JsonMessages/RoomRedirect.ts @@ -1,5 +1,10 @@ import * as tg from "generic-type-guard"; +/* + * WARNING! The original file is in /messages/JsonMessages. + * All other files are automatically copied from this file on container startup / build + */ + export const isRoomRedirect = new tg.IsInterface() .withProperties({ redirectUrl: tg.isString, From be0c70f9acb3af8cb53c94da7de77c67f2d48b9b Mon Sep 17 00:00:00 2001 From: Valdo Romao Date: Wed, 15 Dec 2021 11:11:37 +0000 Subject: [PATCH 10/33] Added some skins to test the woka related code --- maps/assets/skins/skin-blue.png | Bin 0 -> 12676 bytes maps/assets/skins/skin-green.png | Bin 0 -> 13572 bytes maps/assets/skins/skin-yellow.png | Bin 0 -> 14003 bytes 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 maps/assets/skins/skin-blue.png create mode 100644 maps/assets/skins/skin-green.png create mode 100644 maps/assets/skins/skin-yellow.png diff --git a/maps/assets/skins/skin-blue.png b/maps/assets/skins/skin-blue.png new file mode 100644 index 0000000000000000000000000000000000000000..ad6a976e81796c612f22d8109932e965845a77a4 GIT binary patch literal 12676 zcmeHsXIN9+wr=Q6s(>^hgx*7kKt!ZB=}4E5gx(3gi%3TlL8MoaW}!;&MU>uqmnKc= zMQ-r>_P5>V?7Pq1&vVbeO-QolobPz&SYy6pthHt$weBks6Ved^003eYWqBR+w*~qg zjE{@{JeY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R^@r(x|t+mQdbU;Vl^;k(RV_;b$P^B zD_ojKAh#h(e{&oZHd|oipVJO=nozdUuA#3m_sC7j-!LV+|HH2vE_g z0`mjXvs*%ty=Id47V{9BFEFFGBm!}!^qUM`>^@%WNrb$sC#^%L)_-s8hF5ZjVB-5d zkV3>yTPOGDfggNwSkmqq)q;i`Oz4?=&)0ZagGTh@V1-cVfq3?;6jVGZe~O7|Tk%>Z zI9Lpe64DO<=|B+|uD_WcUAK91-rZu0^;mHwFPD>AN8zg&xO zdN$vP;#+#$k`XjeJ9+#(6BQ7DPx4L-`^5_=gLq|W>{0-DBqyGcb%eD|wdy6l0gjug ziE5Cb()D}2d^$N(#mJwalJBW@VjB19Lo$Aq zr==OsOxE7Yhk-u>VWNah_8F#843-d|b{uIia}iiC?*6LJ^;)u0yI`7F($)=a0P?7} zJbL0Q!MjwghCq|PckBq8PbQv8tv0zZybvrQ$NX{S}KY+`S`84cI(7O%EchXild z=n+oZcibI)C4fX#E8lhjr>?BrH)}F0478+)mb#rzSOvRaFHdKx?Gg}7xb&AsBEcGW z&%W2jw3^sJdSPRHO+%!1FAGC&1sifw!0VqQyRXaboMdEV5S>@M5^8GL0YoEdy2U|T zs?~-qSbcqc^??Z5b%!$n9? zu}JOkqjq=gdHDH1iogX12F8o{v)x9#T<2Jh&&zwHQ)&7H(p6oJ!TNFdTrd&-V*?`# zi!Xn^n{>{JAt^89?SdHef!OS+rU(b4jn8d)bNwo|`Oh>H}^%*Thsq*l*aJ4t>Z z56GaFXGN17E&N&j`^9(=!`4{tOK&60N2g0=s=1OTCM!j)!m;=8g#5+Sd+XXUu!|&s Nf{dzkjig!F{{c${J^}y$ literal 0 HcmV?d00001 diff --git a/maps/assets/skins/skin-yellow.png b/maps/assets/skins/skin-yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..f3214968441f8b5ba6c9b75329bac2d01db2416d GIT binary patch literal 14003 zcmeHuby%Cr)^BhqPJ!Z3tT@5lgSNO8CxiqiNN|@@D8-8uD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j_baRW=}HB?;fZRhm6>>aCBhg`Bj9b%^{`PFSU6(@WkwbxruxYC7G?`t;SBsk7t$Mt6Y7#F@)xzmqTkMA#|0x!$EKT9O z$Zk8`>!$LEtY7LvSFy~M&EGnG{ma(%a(;C64H-TD@sTp#q`vCgeyZ!_wy*n{kwU6q z)!q=ga`K1+^r4i+jxhY;Ayb8=*_;LEWs?Lz%K*#5=>nVEw?g3KTl?jBevM(Yk$w*) zAJT(8x;(^=@4GH6QdM7`)Ud8qE$D7=b$L5+)cI{qfC7^&5qe}^@jwOC2s5WRk404; zxx$0A!`WV>Sm&_4h-bzjc#ei#-xHbpt4rs$eCQfYHJnn(&QXd3b*^U}J++@$8%=R* zPv79>D4Fs+Sa23WK3X^mXY6tfe`n+5)V&~2%g7M$x?CP+O?R4zooZWje%`hE6wzv= z6_oNrHSEAebj7oI)veL8W;T8ZHWYw~%vWDF-H4%sL@axUi_Ooku6!KlYH=D(2>`Og z(RsE}w)zehDNyDlRgGpiKngB*?hfeJx&HqB`%ERctNMI&a#Nie1u!x;7P{USx4zaB zy?uD7?BKu&(%#tJ-6dC7^gG|LV#Y@Dc6(>1^ZKwo?#&yz+S*zGz}Up(0WBO3ukZf# zM#_&tH8I`M!^49}F~PyfNiir$hR3`m5{dc#fd9sXXt6t_JUa-P7y%t4BSgy3c>tHm zR2B~{@~2uzice5s6pcrnoVZ=y1X}Y`o;A$k;o-T^($a=Y6PBPa?;!HZ%J2d4D$Ixn zHWc3g03_$-Ig)j7$=C{J1ac}W;_jo%WjWg_F9)$?`=3M=;8f1FF8gfJ>KPdDL=PJO ad?2%NrI4sR9)jF208|w Date: Thu, 16 Dec 2021 09:51:30 +0100 Subject: [PATCH 11/33] camera docs update --- docs/maps/camera.md | 24 +++++++++++------- docs/maps/images/camera/4_add_zone_type.png | Bin 0 -> 5253 bytes ..._property.png => 5_click_add_property.png} | Bin ...able_prop.png => 6_add_focusable_prop.png} | Bin ...re_checked.png => 7_make_sure_checked.png} | Bin ..._zoom_margin.png => 8_add_zoom_margin.png} | Bin ...png => 9_optional_zoom_margin_defined.png} | Bin 7 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 docs/maps/images/camera/4_add_zone_type.png rename docs/maps/images/camera/{4_click_add_property.png => 5_click_add_property.png} (100%) rename docs/maps/images/camera/{5_add_focusable_prop.png => 6_add_focusable_prop.png} (100%) rename docs/maps/images/camera/{6_make_sure_checked.png => 7_make_sure_checked.png} (100%) rename docs/maps/images/camera/{7_add_zoom_margin.png => 8_add_zoom_margin.png} (100%) rename docs/maps/images/camera/{8_optional_zoom_margin_defined.png => 9_optional_zoom_margin_defined.png} (100%) diff --git a/docs/maps/camera.md b/docs/maps/camera.md index ac25c843..9e58fcad 100644 --- a/docs/maps/camera.md +++ b/docs/maps/camera.md @@ -29,22 +29,28 @@ It is possible to define special regions on the map that can make the camera zoo -4. Edit this new object and click on **Add Property**, like this: +4. Make sure your object is of type "zone"!
- +
-5. Add a **bool** property of name *focusable*: +5. Edit this new object and click on **Add Property**, like this:
- +
-6. Make sure it's checked! :) +6. Add a **bool** property of name *focusable*:
- + +
+ +7. Make sure it's checked! :) + +
+
All should be set up now and your new **Focusable Zone** should be working fine! @@ -56,19 +62,19 @@ If you want, you can add an additional property to control how much should the c 1. Like before, click on **Add Property**
- +
2. Add a **float** property of name *zoom_margin*:
- +
2. Define how much (in percentage value) should the zoom be decreased:
- +
For example, if you define your zone as a 300x200 rectangle, setting this property to 0.5 *(50%)* means the camera will try to fit within the viewport the entire zone + margin of 50% of its dimensions, so 450x300. diff --git a/docs/maps/images/camera/4_add_zone_type.png b/docs/maps/images/camera/4_add_zone_type.png new file mode 100644 index 0000000000000000000000000000000000000000..0416d1e475165e0eee273b036888825fe8bf33d7 GIT binary patch literal 5253 zcmb7Ic|26@+aHFp4Js95uY~LkvX+@B%Fb9)V|mPEizG{SV;HhCcFD+2mP(N|6vJ2s zA^Xl)lC2&~@t&vWec#XX{+_?yKh8P#Irnv6=Um_Gdw;L{K2MDdwAop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TyU(I*)_yu8psOCclIx=Ih(5;@zBfdS}j>2gpZQ`#8VRI&@ZYJ|h;@ zr%4-r->Gq52Ns%HXhS`!(E9BreI0K3^F^u1w-VLu)ub9jF4#<5_8pMdTywR}6Pq=@|>LY8cEe~JZNW%##<9sc?4Si{xX>M3*U T%njhzA?Vf(1FeedwxRz8puncz literal 0 HcmV?d00001 diff --git a/docs/maps/images/camera/4_click_add_property.png b/docs/maps/images/camera/5_click_add_property.png similarity index 100% rename from docs/maps/images/camera/4_click_add_property.png rename to docs/maps/images/camera/5_click_add_property.png diff --git a/docs/maps/images/camera/5_add_focusable_prop.png b/docs/maps/images/camera/6_add_focusable_prop.png similarity index 100% rename from docs/maps/images/camera/5_add_focusable_prop.png rename to docs/maps/images/camera/6_add_focusable_prop.png diff --git a/docs/maps/images/camera/6_make_sure_checked.png b/docs/maps/images/camera/7_make_sure_checked.png similarity index 100% rename from docs/maps/images/camera/6_make_sure_checked.png rename to docs/maps/images/camera/7_make_sure_checked.png diff --git a/docs/maps/images/camera/7_add_zoom_margin.png b/docs/maps/images/camera/8_add_zoom_margin.png similarity index 100% rename from docs/maps/images/camera/7_add_zoom_margin.png rename to docs/maps/images/camera/8_add_zoom_margin.png diff --git a/docs/maps/images/camera/8_optional_zoom_margin_defined.png b/docs/maps/images/camera/9_optional_zoom_margin_defined.png similarity index 100% rename from docs/maps/images/camera/8_optional_zoom_margin_defined.png rename to docs/maps/images/camera/9_optional_zoom_margin_defined.png From fa2e583d485b0fee1a5cb7ab47d8fad1261c5811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 16 Dec 2021 10:04:41 +0100 Subject: [PATCH 12/33] Reimporting correctly types moved to /messages --- front/src/Connexion/ConnectionManager.ts | 4 +++- front/src/Connexion/Room.ts | 7 +++---- pusher/src/Controller/IoSocketController.ts | 2 +- pusher/src/Services/AdminApi.ts | 6 +++--- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/front/src/Connexion/ConnectionManager.ts b/front/src/Connexion/ConnectionManager.ts index 39bb079c..6c40631c 100644 --- a/front/src/Connexion/ConnectionManager.ts +++ b/front/src/Connexion/ConnectionManager.ts @@ -197,7 +197,9 @@ class ConnectionManager { // try to connect with function loadOpenIDScreen if ( this._currentRoom.authenticationMandatory || - (axios.isAxiosError(err) && err.response?.data && err.response.data !== "User cannot to be connected on openid provider") + (axios.isAxiosError(err) && + err.response?.data && + err.response.data !== "User cannot to be connected on openid provider") ) { this.loadOpenIDScreen(); return Promise.reject(new Error("You will be redirect on login page")); diff --git a/front/src/Connexion/Room.ts b/front/src/Connexion/Room.ts index 15ac9502..6bd53c8b 100644 --- a/front/src/Connexion/Room.ts +++ b/front/src/Connexion/Room.ts @@ -5,8 +5,8 @@ import type { CharacterTexture } from "./LocalUser"; import { localUserStore } from "./LocalUserStore"; import axios from "axios"; import { axiosWithRetry } from "./AxiosUtils"; -import {isMapDetailsData} from "../../../pusher/src/Messages/JsonMessages/MapDetailsData"; -import {isRoomRedirect} from "../Messages/JsonMessages/RoomRedirect"; +import { isMapDetailsData } from "../Messages/JsonMessages/MapDetailsData"; +import { isRoomRedirect } from "../Messages/JsonMessages/RoomRedirect"; export class MapDetail { constructor(public readonly mapUrl: string, public readonly textures: CharacterTexture[] | undefined) {} @@ -119,9 +119,8 @@ export class Room { this._contactPage = data.contactPage || CONTACT_URL; return new MapDetail(data.mapUrl, data.textures); } else { - throw new Error('Data received by the /map endpoint of the Pusher is not in a valid format.'); + throw new Error("Data received by the /map endpoint of the Pusher is not in a valid format."); } - } catch (e) { if (axios.isAxiosError(e) && e.response?.status == 401 && e.response?.data === "Token decrypted error") { console.warn("JWT token sent could not be decrypted. Maybe it expired?"); diff --git a/pusher/src/Controller/IoSocketController.ts b/pusher/src/Controller/IoSocketController.ts index 4c09638a..4d62f7fa 100644 --- a/pusher/src/Controller/IoSocketController.ts +++ b/pusher/src/Controller/IoSocketController.ts @@ -29,7 +29,7 @@ import { emitInBatch } from "../Services/IoSocketHelpers"; import { ADMIN_API_URL, DISABLE_ANONYMOUS, SOCKET_IDLE_TIMER } from "../Enum/EnvironmentVariable"; import { Zone } from "_Model/Zone"; import { ExAdminSocketInterface } from "_Model/Websocket/ExAdminSocketInterface"; -import { CharacterTexture } from "../Services/AdminApi/CharacterTexture"; +import { CharacterTexture} from "../Messages/JsonMessages/CharacterTexture"; import { isAdminMessageInterface } from "../Model/Websocket/Admin/AdminMessages"; import Axios from "axios"; import { InvalidTokenError } from "../Controller/InvalidTokenError"; diff --git a/pusher/src/Services/AdminApi.ts b/pusher/src/Services/AdminApi.ts index 416b9cb6..87c0d920 100644 --- a/pusher/src/Services/AdminApi.ts +++ b/pusher/src/Services/AdminApi.ts @@ -1,9 +1,9 @@ import { ADMIN_API_TOKEN, ADMIN_API_URL, ADMIN_URL, OPID_PROFILE_SCREEN_PROVIDER } from "../Enum/EnvironmentVariable"; import Axios from "axios"; import { GameRoomPolicyTypes } from "_Model/PusherRoom"; -import { CharacterTexture } from "./AdminApi/CharacterTexture"; -import { MapDetailsData } from "./AdminApi/MapDetailsData"; -import { RoomRedirect } from "./AdminApi/RoomRedirect"; +import { CharacterTexture} from "../Messages/JsonMessages/CharacterTexture"; +import { MapDetailsData} from "../Messages/JsonMessages/MapDetailsData"; +import { RoomRedirect} from "../Messages/JsonMessages/RoomRedirect"; export interface AdminApiData { roomUrl: string; From 98d3a58861259da46ba3881ac8f1941d7f759bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 16 Dec 2021 10:04:55 +0100 Subject: [PATCH 13/33] Improving typings of VirtualJoystick --- .../src/Phaser/UserInput/UserInputManager.ts | 2 +- front/src/rex-plugins.d.ts | 37 ++++++++++++++++++- front/src/types.ts | 23 ------------ messages/package.json | 2 +- 4 files changed, 37 insertions(+), 27 deletions(-) delete mode 100644 front/src/types.ts diff --git a/front/src/Phaser/UserInput/UserInputManager.ts b/front/src/Phaser/UserInput/UserInputManager.ts index bb7041d2..28b87e69 100644 --- a/front/src/Phaser/UserInput/UserInputManager.ts +++ b/front/src/Phaser/UserInput/UserInputManager.ts @@ -1,8 +1,8 @@ -import type { Direction } from "../../types"; import type { GameScene } from "../Game/GameScene"; import { touchScreenManager } from "../../Touch/TouchScreenManager"; import { MobileJoystick } from "../Components/MobileJoystick"; import { enableUserInputsStore } from "../../Stores/UserInputStore"; +import type { Direction } from "phaser3-rex-plugins/plugins/virtualjoystick.js"; interface UserInputManagerDatum { keyInstance: Phaser.Input.Keyboard.Key; diff --git a/front/src/rex-plugins.d.ts b/front/src/rex-plugins.d.ts index 9884d425..e171f0ba 100644 --- a/front/src/rex-plugins.d.ts +++ b/front/src/rex-plugins.d.ts @@ -1,6 +1,39 @@ +//import Phaser from "phaser"; + declare module "phaser3-rex-plugins/plugins/virtualjoystick.js" { - const content: any; // eslint-disable-line - export default content; + /*const content: any; // eslint-disable-line + export default content;*/ + import GameObject = Phaser.GameObjects.GameObject; + import { Scene } from "phaser"; + + type CursorKey = { + isDown: boolean; + }; + + export type Direction = "left" | "right" | "up" | "down"; + + interface CursorKeys extends Record { + left: CursorKey; + right: CursorKey; + up: CursorKey; + down: CursorKey; + } + + class VirtualJoystick extends GameObject { + constructor(scene: Scene, config: unknown); + enable: boolean; + base: GameObjects.Image; + thumb: GameObjects.Image; + setRadius: (radius: number) => void; + y: number; + x: number; + forceX: number; + forceY: number; + visible: boolean; + createCursorKeys: () => CursorKeys; + } + + export default VirtualJoystick; } declare module "phaser3-rex-plugins/plugins/gestures-plugin.js" { const content: any; // eslint-disable-line diff --git a/front/src/types.ts b/front/src/types.ts deleted file mode 100644 index d957a2c2..00000000 --- a/front/src/types.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type Phaser from "phaser"; - -export type CursorKey = { - isDown: boolean; -}; - -export type Direction = "left" | "right" | "up" | "down"; - -export interface CursorKeys extends Record { - left: CursorKey; - right: CursorKey; - up: CursorKey; - down: CursorKey; -} - -export interface IVirtualJoystick extends Phaser.GameObjects.GameObject { - y: number; - x: number; - forceX: number; - forceY: number; - visible: boolean; - createCursorKeys: () => CursorKeys; -} diff --git a/messages/package.json b/messages/package.json index d4906977..596bb089 100644 --- a/messages/package.json +++ b/messages/package.json @@ -36,7 +36,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/CatsMiaow/node-grpc-typescript.git" + "url": "https://github.com/CatsMiaow/node-grpc-typescript.git#grpc_tools_node_protoc_ts" }, "keywords": [ "Node.js", From a5ecac290c3b343818cb145cd541dff565d930f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 16 Dec 2021 10:08:10 +0100 Subject: [PATCH 14/33] Changing slightly wording of misleading phrase --- docs/maps/scripting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/maps/scripting.md b/docs/maps/scripting.md index 8b11fe74..6da3ddbf 100644 --- a/docs/maps/scripting.md +++ b/docs/maps/scripting.md @@ -60,7 +60,7 @@ WA.chat.sendChatMessage('Hello world', 'Mr Robot'); The `WA` objects contains a number of useful methods enabling you to interact with the WorkAdventure game. For instance, `WA.chat.sendChatMessage` opens the chat and adds a message in it. -In your browser console, when you open the map, the chat message should be displayed right away. +The message should be displayed in the chat history as soon as you enter the room. ## Adding a script in an iFrame From 0c281db4113f6971a4265ef9f9732aacac39d80e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 16 Dec 2021 15:57:37 +0100 Subject: [PATCH 15/33] More eslint fixes (+ ignoring no-unsafe-argument rule for now) --- front/.eslintrc.js | 3 ++- front/src/Connexion/ConnectionManager.ts | 10 ++++++- front/src/Stores/MediaStore.ts | 4 +-- front/src/Stores/ScreenSharingStore.ts | 2 +- front/src/Touch/TouchScreenManager.ts | 2 +- messages/JsonMessages/AdminApiData.ts | 23 ++++++++++++++++ messages/JsonMessages/RegisterData.ts | 24 +++++++++++++++++ .../src/Controller/AuthenticateController.ts | 3 ++- pusher/src/Services/AdminApi.ts | 26 +++++++++---------- 9 files changed, 76 insertions(+), 21 deletions(-) create mode 100644 messages/JsonMessages/AdminApiData.ts create mode 100644 messages/JsonMessages/RegisterData.ts diff --git a/front/.eslintrc.js b/front/.eslintrc.js index 33466012..117cb7e6 100644 --- a/front/.eslintrc.js +++ b/front/.eslintrc.js @@ -41,7 +41,8 @@ module.exports = { "@typescript-eslint/no-unsafe-assignment": "off", "@typescript-eslint/no-unsafe-return": "off", "@typescript-eslint/no-unsafe-member-access": "off", - "@typescript-eslint/restrict-template-expressions": "off" + "@typescript-eslint/restrict-template-expressions": "off", + "@typescript-eslint/no-unsafe-argument": "off", }, "settings": { "svelte3/typescript": true, diff --git a/front/src/Connexion/ConnectionManager.ts b/front/src/Connexion/ConnectionManager.ts index 6c40631c..6f1e1f50 100644 --- a/front/src/Connexion/ConnectionManager.ts +++ b/front/src/Connexion/ConnectionManager.ts @@ -12,6 +12,8 @@ import { userIsConnected } from "../Stores/MenuStore"; import { analyticsClient } from "../Administration/AnalyticsClient"; import { axiosWithRetry } from "./AxiosUtils"; import axios from "axios"; +import { isRegisterData } from "../Messages/JsonMessages/RegisterData"; +import { isAdminApiData } from "../Messages/JsonMessages/AdminApiData"; class ConnectionManager { private localUser!: LocalUser; @@ -126,6 +128,10 @@ class ConnectionManager { const data = await Axios.post(`${PUSHER_URL}/register`, { organizationMemberToken }).then( (res) => res.data ); + if (!isRegisterData(data)) { + console.error("Invalid data received from /register route. Data: ", data); + throw new Error("Invalid data received from /register route."); + } this.localUser = new LocalUser(data.userUuid, data.textures, data.email); this.authToken = data.authToken; localUserStore.saveUser(this.localUser); @@ -326,7 +332,9 @@ class ConnectionManager { } const { authToken, userUuid, textures, email } = await Axios.get(`${PUSHER_URL}/login-callback`, { params: { code, nonce, token, playUri: this.currentRoom?.key }, - }).then((res) => res.data); + }).then((res) => { + return res.data; + }); localUserStore.setAuthToken(authToken); this.localUser = new LocalUser(userUuid, textures, email); localUserStore.saveUser(this.localUser); diff --git a/front/src/Stores/MediaStore.ts b/front/src/Stores/MediaStore.ts index 8a8e39e2..44c78ad2 100644 --- a/front/src/Stores/MediaStore.ts +++ b/front/src/Stores/MediaStore.ts @@ -426,7 +426,7 @@ export const localStreamStore = derived, LocalS // TODO: does it make sense to pop this error when retrying? set({ type: "error", - error: e, + error: e instanceof Error ? e : new Error("An unknown error happened"), }); // Let's try without video constraints if (constraints.video !== false) { @@ -444,7 +444,7 @@ export const localStreamStore = derived, LocalS console.info("Error. Unable to get microphone and/or camera access.", constraints, e); set({ type: "error", - error: e, + error: e instanceof Error ? e : new Error("An unknown error happened"), }); } } diff --git a/front/src/Stores/ScreenSharingStore.ts b/front/src/Stores/ScreenSharingStore.ts index e4ee6410..d68dbf8b 100644 --- a/front/src/Stores/ScreenSharingStore.ts +++ b/front/src/Stores/ScreenSharingStore.ts @@ -153,7 +153,7 @@ export const screenSharingLocalStreamStore = derived 0 || navigator.msMaxTouchPoints > 0; + return "ontouchstart" in window || navigator.maxTouchPoints > 0; } } diff --git a/messages/JsonMessages/AdminApiData.ts b/messages/JsonMessages/AdminApiData.ts new file mode 100644 index 00000000..f21cc17c --- /dev/null +++ b/messages/JsonMessages/AdminApiData.ts @@ -0,0 +1,23 @@ +import * as tg from "generic-type-guard"; +import { isCharacterTexture} from "./CharacterTexture"; + +/* + * WARNING! The original file is in /messages/JsonMessages. + * All other files are automatically copied from this file on container startup / build + */ + +export const isAdminApiData = new tg.IsInterface() + .withProperties({ + roomUrl: tg.isString, + email: tg.isNullable(tg.isString), + mapUrlStart: tg.isString, + tags: tg.isArray(tg.isString), + policy_type: tg.isNumber, + userUuid: tg.isString, + textures: tg.isArray(isCharacterTexture), + }) + .withOptionalProperties({ + messages: tg.isArray(tg.isUnknown), + }) + .get(); +export type AdminApiData = tg.GuardedType; diff --git a/messages/JsonMessages/RegisterData.ts b/messages/JsonMessages/RegisterData.ts new file mode 100644 index 00000000..c585731e --- /dev/null +++ b/messages/JsonMessages/RegisterData.ts @@ -0,0 +1,24 @@ +import * as tg from "generic-type-guard"; +import { isCharacterTexture} from "./CharacterTexture"; + +/* + * WARNING! The original file is in /messages/JsonMessages. + * All other files are automatically copied from this file on container startup / build + */ + +export const isRegisterData = new tg.IsInterface() + .withProperties({ + roomUrl: tg.isString, + email: tg.isNullable(tg.isString), + organizationMemberToken: tg.isNullable(tg.isString), + mapUrlStart: tg.isString, + userUuid: tg.isString, + textures: tg.isArray(isCharacterTexture), + authToken: tg.isString, + + }) + .withOptionalProperties({ + messages: tg.isArray(tg.isUnknown), + }) + .get(); +export type RegisterData = tg.GuardedType; diff --git a/pusher/src/Controller/AuthenticateController.ts b/pusher/src/Controller/AuthenticateController.ts index e2089c89..3e725da5 100644 --- a/pusher/src/Controller/AuthenticateController.ts +++ b/pusher/src/Controller/AuthenticateController.ts @@ -6,6 +6,7 @@ import { AuthTokenData, jwtTokenManager } from "../Services/JWTTokenManager"; import { parse } from "query-string"; import { openIDClient } from "../Services/OpenIDClient"; import { DISABLE_ANONYMOUS, FRONT_URL } from "../Enum/EnvironmentVariable"; +import { RegisterData } from "../../../messages/JsonMessages/RegisterData"; export interface TokenInterface { userUuid: string; @@ -191,7 +192,7 @@ export class AuthenticateController extends BaseController { mapUrlStart, organizationMemberToken, textures, - }) + } as RegisterData) ); } catch (e) { console.error("register => ERROR", e); diff --git a/pusher/src/Services/AdminApi.ts b/pusher/src/Services/AdminApi.ts index 87c0d920..4410c29e 100644 --- a/pusher/src/Services/AdminApi.ts +++ b/pusher/src/Services/AdminApi.ts @@ -1,20 +1,10 @@ import { ADMIN_API_TOKEN, ADMIN_API_URL, ADMIN_URL, OPID_PROFILE_SCREEN_PROVIDER } from "../Enum/EnvironmentVariable"; import Axios from "axios"; import { GameRoomPolicyTypes } from "_Model/PusherRoom"; -import { CharacterTexture} from "../Messages/JsonMessages/CharacterTexture"; -import { MapDetailsData} from "../Messages/JsonMessages/MapDetailsData"; -import { RoomRedirect} from "../Messages/JsonMessages/RoomRedirect"; - -export interface AdminApiData { - roomUrl: string; - email: string | null; - mapUrlStart: string; - tags: string[]; - policy_type: number; - userUuid: string; - messages?: unknown[]; - textures: CharacterTexture[]; -} +import { CharacterTexture } from "../Messages/JsonMessages/CharacterTexture"; +import { MapDetailsData } from "../Messages/JsonMessages/MapDetailsData"; +import { RoomRedirect } from "../Messages/JsonMessages/RoomRedirect"; +import { AdminApiData, isAdminApiData } from "../Messages/JsonMessages/AdminApiData"; export interface AdminBannedData { is_banned: boolean; @@ -77,6 +67,10 @@ class AdminApi { const res = await Axios.get(ADMIN_API_URL + "/api/login-url/" + organizationMemberToken, { headers: { Authorization: `${ADMIN_API_TOKEN}` }, }); + if (!isAdminApiData(res.data)) { + console.error("Message received from /api/login-url is not in the expected format. Message: ", res.data); + throw new Error("Message received from /api/login-url is not in the expected format."); + } return res.data; } @@ -88,6 +82,10 @@ class AdminApi { const res = await Axios.get(ADMIN_API_URL + "/api/check-user/" + organizationMemberToken, { headers: { Authorization: `${ADMIN_API_TOKEN}` }, }); + if (!isAdminApiData(res.data)) { + console.error("Message received from /api/check-user is not in the expected format. Message: ", res.data); + throw new Error("Message received from /api/check-user is not in the expected format."); + } return res.data; } From 88a6e80a8ffae338318c50542596f29ac0f69d8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 16 Dec 2021 16:09:59 +0100 Subject: [PATCH 16/33] Adding JsonMessages to Docker image --- front/Dockerfile | 1 + pusher/Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/front/Dockerfile b/front/Dockerfile index 6fef9dc8..f781a37c 100644 --- a/front/Dockerfile +++ b/front/Dockerfile @@ -8,6 +8,7 @@ FROM thecodingmachine/nodejs:14-apache COPY --chown=docker:docker front . COPY --from=builder --chown=docker:docker /usr/src/generated /var/www/html/src/Messages/generated +COPY --from=builder --chown=docker:docker /usr/src/JsonMessages /var/www/html/src/Messages/JsonMessages # Removing the iframe.html file from the final image as this adds a XSS attack. # iframe.html is only in dev mode to circumvent a limitation diff --git a/pusher/Dockerfile b/pusher/Dockerfile index 4aec9748..af4e107e 100644 --- a/pusher/Dockerfile +++ b/pusher/Dockerfile @@ -11,6 +11,7 @@ COPY pusher/yarn.lock pusher/package.json ./ RUN yarn install COPY pusher . COPY --from=builder /usr/src/generated src/Messages/generated +COPY --from=builder /usr/src/JsonMessages /var/www/html/src/Messages/JsonMessages ENV NODE_ENV=production RUN yarn run tsc From 805368dd3ff75131ae3d328fde03a305fd8802f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 16 Dec 2021 16:15:12 +0100 Subject: [PATCH 17/33] Fixing CI with new messages --- .github/workflows/continuous_integration.yml | 4 ++-- .github/workflows/push-to-npm.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index fcde792a..1ad73027 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -39,7 +39,7 @@ jobs: working-directory: "messages" - name: "Build proto messages" - run: yarn run proto && yarn run copy-to-front + run: yarn run proto && yarn run copy-to-front && yarn run json-copy-to-front working-directory: "messages" - name: "Create index.html" @@ -97,7 +97,7 @@ jobs: working-directory: "messages" - name: "Build proto messages" - run: yarn run proto && yarn run copy-to-pusher + run: yarn run proto && yarn run copy-to-pusher && yarn run json-copy-to-pusher working-directory: "messages" - name: "Build" diff --git a/.github/workflows/push-to-npm.yml b/.github/workflows/push-to-npm.yml index 1208e0c0..71f2824f 100644 --- a/.github/workflows/push-to-npm.yml +++ b/.github/workflows/push-to-npm.yml @@ -36,7 +36,7 @@ jobs: working-directory: "messages" - name: "Build proto messages" - run: yarn run proto && yarn run copy-to-front + run: yarn run proto && yarn run copy-to-front && yarn run json-copy-to-front working-directory: "messages" - name: "Create index.html" From 8c938017468d54055849354f00a0855e1fbbcce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 16 Dec 2021 16:18:23 +0100 Subject: [PATCH 18/33] Fixing wrong import --- pusher/src/Model/Websocket/ExSocketInterface.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pusher/src/Model/Websocket/ExSocketInterface.ts b/pusher/src/Model/Websocket/ExSocketInterface.ts index 411d88fa..67078aa2 100644 --- a/pusher/src/Model/Websocket/ExSocketInterface.ts +++ b/pusher/src/Model/Websocket/ExSocketInterface.ts @@ -11,7 +11,7 @@ import { import { WebSocket } from "uWebSockets.js"; import { ClientDuplexStream } from "grpc"; import { Zone } from "_Model/Zone"; -import { CharacterTexture } from "../../Services/AdminApi/CharacterTexture"; +import { CharacterTexture} from "../../Messages/JsonMessages/CharacterTexture"; export type BackConnection = ClientDuplexStream; From fff45c2f92bab7a348791f55f96a09ea46b9b438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 16 Dec 2021 16:27:44 +0100 Subject: [PATCH 19/33] Adding prettier on messages --- messages/.prettierignore | 1 + messages/.prettierrc.json | 5 + messages/LICENSE.txt | 691 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 697 insertions(+) create mode 100644 messages/.prettierignore create mode 100644 messages/.prettierrc.json create mode 100644 messages/LICENSE.txt diff --git a/messages/.prettierignore b/messages/.prettierignore new file mode 100644 index 00000000..1f453464 --- /dev/null +++ b/messages/.prettierignore @@ -0,0 +1 @@ +src/Messages/generated diff --git a/messages/.prettierrc.json b/messages/.prettierrc.json new file mode 100644 index 00000000..057ed062 --- /dev/null +++ b/messages/.prettierrc.json @@ -0,0 +1,5 @@ +{ + "printWidth": 120, + "tabWidth": 4, + "plugins": ["prettier-plugin-svelte"] +} diff --git a/messages/LICENSE.txt b/messages/LICENSE.txt new file mode 100644 index 00000000..614e6268 --- /dev/null +++ b/messages/LICENSE.txt @@ -0,0 +1,691 @@ +NOTICE +This package contains software licensed under different +licenses, please refer to the NOTICE.txt file for further +information and LICENSES.txt for full license texts. + +WorkAdventure Enterprise edition can be licensed independently from +the source under separate commercial terms. + +The software ("Software") is developed and owned by TheCodingMachine +and is subject to the terms of the GNU AFFERO GENERAL PUBLIC LICENSE +Version 3, with the Commons Clause as follows: + + + + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license +for software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are +designed to take away your freedom to share and change the works. By +contrast, our General Public Licenses are intended to guarantee your +freedom to share and change all versions of a program--to make sure it +remains free software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public +License. + + "Copyright" also means copyright-like laws that apply to other kinds +of works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further restriction, +you may remove that term. If a license document contains a further +restriction but permits relicensing or conveying under this License, you +may add to a covered work material governed by the terms of that license +document, provided that the further restriction does not survive such +relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have permission +to link or combine any covered work with a work licensed under version 3 +of the GNU General Public License into a single combined work, and to +convey the resulting work. The terms of this License will continue to +apply to the part which is the covered work, but the work with which it is +combined will remain governed by version 3 of the GNU General Public +License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may differ +in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero +General Public License "or any later version" applies to it, you have +the option of following the terms and conditions either of that +numbered version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number +of the GNU Affero General Public License, you may choose any version +ever published by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that +proxy's public statement of acceptance of a version permanently +authorizes you to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. + + +"Commons Clause" License Condition + +The Software is provided to you by the Licensor under the License, as +defined below, subject to the following condition. Without limiting +other conditions in the License, the grant of rights under the License +will not include, and the License does not grant to you, the right to +Sell the Software. For purposes of the foregoing, "Sell" means +practicing any or all of the rights granted to you under the License +to provide to third parties, for a fee or other consideration, +a product or service that consists, entirely or substantially, +of the Software or the functionality of the Software. Any license +notice or attribution required by the License must also include +this Commons Cause License Condition notice. From 1ed10b0cddde41834092df36f75ca64922659d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 16 Dec 2021 16:40:50 +0100 Subject: [PATCH 20/33] Adding Prettier in messages --- .husky/pre-commit | 4 + front/.prettierignore | 1 + messages/.prettierignore | 2 +- messages/package.json | 18 +- messages/yarn.lock | 364 ++++++++++++++++++++++++++++++++++++++- pusher/.prettierignore | 1 + 6 files changed, 381 insertions(+), 9 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 5944be37..8fa7767b 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,6 +1,10 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" +( +cd messages || exit +yarn run precommit +) ( cd front || exit yarn run precommit diff --git a/front/.prettierignore b/front/.prettierignore index 1f453464..26de759f 100644 --- a/front/.prettierignore +++ b/front/.prettierignore @@ -1 +1,2 @@ src/Messages/generated +src/Messages/JsonMessages diff --git a/messages/.prettierignore b/messages/.prettierignore index 1f453464..86d4c2dd 100644 --- a/messages/.prettierignore +++ b/messages/.prettierignore @@ -1 +1 @@ -src/Messages/generated +generated diff --git a/messages/package.json b/messages/package.json index 596bb089..6095a626 100644 --- a/messages/package.json +++ b/messages/package.json @@ -9,8 +9,11 @@ "copy-to-pusher": "rm -rf ../pusher/src/Messages/generated && cp -rf generated/ ../pusher/src/Messages/generated", "json-copy-to-pusher": "rm -rf ../pusher/src/Messages/JsonMessages/* && cp -rf JsonMessages/* ../pusher/src/Messages/JsonMessages/", "json-copy-to-front": "rm -rf ../front/src/Messages/JsonMessages/* && cp -rf JsonMessages/* ../front/src/Messages/JsonMessages/", + "precommit": "lint-staged", "proto-all": "yarn run proto && yarn run copy-to-back && yarn run copy-to-front && yarn run copy-to-pusher && yarn run json-copy-to-pusher && yarn run json-copy-to-front", - "proto:watch": "yarn run proto-all; inotifywait -q -m -e close_write protos/messages.proto JsonMessages/ | while read -r filename event; do yarn run proto-all; done" + "proto:watch": "yarn run proto-all; inotifywait -q -m -e close_write protos/messages.proto JsonMessages/ | while read -r filename event; do yarn run proto-all; done", + "pretty": "yarn prettier --write 'JsonMessages/**/*.ts'", + "pretty-check": "yarn prettier --check 'JsonMessages/**/*.ts'" }, "dependencies": { "generic-type-guard": "^3.5.0", @@ -29,6 +32,8 @@ "eslint-plugin-sonarjs": "^0.5.0", "grpc-tools": "^1.9.1", "grpc_tools_node_protoc_ts": "^5.0.1", + "lint-staged": "^11.0.0", + "prettier": "^2.3.1", "protobufjs": "^6.10.1", "rimraf": "^3.0.2", "shelljs": "^0.8.4", @@ -43,7 +48,12 @@ "gRPC", "TypeScript" ], - "homepage": "https://github.com/CatsMiaow/node-grpc-typescript#readme", - "author": "CatsMiaow", - "license": "MIT" + "homepage": "https://github.com/thecodingmachine/workadventure", + "author": "David Négrier", + "license": "SEE LICENSE IN LICENSE.txt", + "lint-staged": { + "*.ts": [ + "yarn run pretty" + ] + } } diff --git a/messages/yarn.lock b/messages/yarn.lock index 2f4a00bf..5d040c6f 100644 --- a/messages/yarn.lock +++ b/messages/yarn.lock @@ -184,6 +184,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.30.tgz#1ed6e01e4ca576d5aec9cc802cc3bcf94c274192" integrity sha512-HmqFpNzp3TSELxU/bUuRK+xzarVOAsR00hzcvM0TXrMlt/+wcSLa5q6YhTb6/cA6wqDCZLDcfd8fSL95x5h7AA== +"@types/parse-json@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" + integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== + "@types/parsimmon@^1.10.1": version "1.10.4" resolved "https://registry.yarnpkg.com/@types/parsimmon/-/parsimmon-1.10.4.tgz#7639e16015440d9baf622f83c12dae47787226b7" @@ -319,6 +324,14 @@ acorn@^7.4.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" @@ -458,6 +471,13 @@ ansi-dim@^0.1.1: dependencies: ansi-wrap "0.1.0" +ansi-escapes@^4.3.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + ansi-gray@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251" @@ -694,6 +714,11 @@ astral-regex@^1.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -930,6 +955,26 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-truncate@2.1.0, cli-truncate@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" + integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== + dependencies: + slice-ansi "^3.0.0" + string-width "^4.2.0" + cliui@^3.0.3: version "3.2.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" @@ -985,6 +1030,16 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +colorette@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.4.0.tgz#5190fbb87276259a86ad700bff2c6d6faa3fca40" + integrity sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g== + +colorette@^2.0.16: + version "2.0.16" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" + integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== + colour@~0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/colour/-/colour-0.7.1.tgz#9cb169917ec5d12c0736d3e8685746df1cadf778" @@ -1007,6 +1062,11 @@ commander@^2.12.1: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== +commander@^8.2.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" + integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== + component-emitter@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" @@ -1059,6 +1119,17 @@ core-util-is@1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= +cosmiconfig@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d" + integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ== + dependencies: + "@types/parse-json" "^4.0.0" + import-fresh "^3.2.1" + parse-json "^5.0.0" + path-type "^4.0.0" + yaml "^1.10.0" + create-frame@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/create-frame/-/create-frame-1.0.0.tgz#8b95f2691e3249b6080443e33d0bad9f8f6975aa" @@ -1069,7 +1140,7 @@ create-frame@^1.0.0: isobject "^3.0.0" lazy-cache "^2.0.2" -cross-spawn@^7.0.2: +cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -1113,6 +1184,13 @@ debug@^4.0.1, debug@^4.1.1: dependencies: ms "2.1.2" +debug@^4.3.2: + version "4.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" + integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== + dependencies: + ms "2.1.2" + debug@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" @@ -1270,7 +1348,7 @@ end-of-stream@^1.4.1: dependencies: once "^1.4.0" -enquirer@^2.3.5: +enquirer@^2.3.5, enquirer@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== @@ -1282,7 +1360,7 @@ ent@^2.2.0: resolved "https://registry.yarnpkg.com/ent/-/ent-2.2.0.tgz#e964219325a21d05f44466a2f686ed6ce5f5dd1d" integrity sha1-6WQhkyWiHQX0RGai9obtbOX13R0= -error-ex@^1.2.0: +error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== @@ -1530,6 +1608,21 @@ esutils@^2.0.2: resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +execa@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" + integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + expand-brackets@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" @@ -1815,6 +1908,16 @@ get-object@^0.2.0: is-number "^2.0.2" isobject "^0.2.0" +get-own-enumerable-property-symbols@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" + integrity sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g== + +get-stream@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" + integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -2123,6 +2226,11 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" +human-signals@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" + integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== + iconv-lite@^0.4.4: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -2165,6 +2273,11 @@ imurmurhash@^0.1.4: resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -2348,6 +2461,11 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== +is-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= + is-odd@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-0.1.2.tgz#bc573b5ce371ef2aad6e6f49799b72bef13978a7" @@ -2369,6 +2487,11 @@ is-regex@^1.1.1: dependencies: has-symbols "^1.0.1" +is-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" + integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= + is-self-closing@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-self-closing/-/is-self-closing-1.0.1.tgz#5f406b527c7b12610176320338af0fa3896416e4" @@ -2376,6 +2499,11 @@ is-self-closing@^1.0.1: dependencies: self-closing-tags "^1.0.1" +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + is-string@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" @@ -2453,6 +2581,11 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= +json-parse-even-better-errors@^2.3.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" + integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -2555,6 +2688,45 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" +lines-and-columns@^1.1.6: + version "1.2.4" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" + integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== + +lint-staged@^11.0.0: + version "11.2.6" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-11.2.6.tgz#f477b1af0294db054e5937f171679df63baa4c43" + integrity sha512-Vti55pUnpvPE0J9936lKl0ngVeTdSZpEdTNhASbkaWX7J5R9OEifo1INBGQuGW4zmy6OG+TcWPJ3m5yuy5Q8Tg== + dependencies: + cli-truncate "2.1.0" + colorette "^1.4.0" + commander "^8.2.0" + cosmiconfig "^7.0.1" + debug "^4.3.2" + enquirer "^2.3.6" + execa "^5.1.1" + listr2 "^3.12.2" + micromatch "^4.0.4" + normalize-path "^3.0.0" + please-upgrade-node "^3.2.0" + string-argv "0.3.1" + stringify-object "3.3.0" + supports-color "8.1.1" + +listr2@^3.12.2: + version "3.13.5" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.13.5.tgz#105a813f2eb2329c4aae27373a281d610ee4985f" + integrity sha512-3n8heFQDSk+NcwBn3CgxEibZGaRzx+pC64n3YjpMD1qguV4nWus3Al+Oo3KooqFKTQEJ1v7MmnbnyyNspgx3NA== + dependencies: + cli-truncate "^2.1.0" + colorette "^2.0.16" + log-update "^4.0.0" + p-map "^4.0.0" + rfdc "^1.3.0" + rxjs "^7.4.0" + through "^2.3.8" + wrap-ansi "^7.0.0" + load-json-file@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" @@ -2623,6 +2795,16 @@ log-ok@^0.1.1: ansi-green "^0.1.1" success-symbol "^0.1.0" +log-update@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" + integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== + dependencies: + ansi-escapes "^4.3.0" + cli-cursor "^3.1.0" + slice-ansi "^4.0.0" + wrap-ansi "^6.2.0" + log-utils@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/log-utils/-/log-utils-0.2.1.tgz#a4c217a0dd9a50515d9b920206091ab3d4e031cf" @@ -2666,6 +2848,11 @@ map-visit@^1.0.0: dependencies: object-visit "^1.0.0" +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + merge2@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" @@ -2698,6 +2885,14 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" +micromatch@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" + integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== + dependencies: + braces "^3.0.1" + picomatch "^2.2.3" + mime-db@1.44.0: version "1.44.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" @@ -2710,6 +2905,11 @@ mime-types@^2.1.12, mime-types@~2.1.19: dependencies: mime-db "1.44.0" +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -2858,6 +3058,11 @@ normalize-package-data@^2.3.2, "normalize-package-data@~1.0.1 || ^2.0.0": semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" +normalize-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + npm-bundled@^1.0.1: version "1.1.1" resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b" @@ -2908,6 +3113,13 @@ npm-registry-client@^8.6.0: optionalDependencies: npmlog "2 || ^3.1.0 || ^4.0.0" +npm-run-path@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" + integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== + dependencies: + path-key "^3.0.0" + "npmlog@2 || ^3.1.0 || ^4.0.0", npmlog@^4.0.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" @@ -3002,6 +3214,13 @@ once@^1.3.0, once@^1.3.3, once@^1.4.0: dependencies: wrappy "1" +onetime@^5.1.0, onetime@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" + integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== + dependencies: + mimic-fn "^2.1.0" + optionator@^0.9.1: version "0.9.1" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" @@ -3072,6 +3291,13 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" @@ -3096,6 +3322,16 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" +parse-json@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-5.2.0.tgz#c76fc66dee54231c962b22bcc8a72cf2f99753cd" + integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== + dependencies: + "@babel/code-frame" "^7.0.0" + error-ex "^1.3.1" + json-parse-even-better-errors "^2.3.0" + lines-and-columns "^1.1.6" + parsimmon@^1.13.0: version "1.16.0" resolved "https://registry.yarnpkg.com/parsimmon/-/parsimmon-1.16.0.tgz#2834e3db645b6a855ab2ea14fbaad10d82867e0f" @@ -3121,7 +3357,7 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-key@^3.1.0: +path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== @@ -3153,6 +3389,11 @@ picomatch@^2.0.5, picomatch@^2.2.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== +picomatch@^2.2.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" + integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== + pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -3165,6 +3406,13 @@ pkg-dir@^2.0.0: dependencies: find-up "^2.1.0" +please-upgrade-node@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz#aeddd3f994c933e4ad98b99d9a556efa0e2fe942" + integrity sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg== + dependencies: + semver-compare "^1.0.0" + posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" @@ -3175,6 +3423,11 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== +prettier@^2.3.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a" + integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg== + process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -3384,6 +3637,14 @@ resolve@^1.10.0: dependencies: path-parse "^1.0.6" +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -3399,6 +3660,11 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== +rfdc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" + integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== + rimraf@2, rimraf@^2.6.1: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" @@ -3425,6 +3691,13 @@ run-parallel@^1.1.9: resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.10.tgz#60a51b2ae836636c81377df16cb107351bcd13ef" integrity sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw== +rxjs@^7.4.0: + version "7.4.0" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.4.0.tgz#a12a44d7eebf016f5ff2441b87f28c9a51cebc68" + integrity sha512-7SQDi7xeTMCJpqViXh8gL/lebcwlp3d831F05+9B44A4B0WfsEwUQHR64gsH1kvJ+Ep/J9K2+n1hVl1CsGN23w== + dependencies: + tslib "~2.1.0" + safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -3457,6 +3730,11 @@ self-closing-tags@^1.0.1: resolved "https://registry.yarnpkg.com/self-closing-tags/-/self-closing-tags-1.0.1.tgz#6c5fa497994bb826b484216916371accee490a5d" integrity sha512-7t6hNbYMxM+VHXTgJmxwgZgLGktuXtVVD5AivWzNTdJBM4DBjnDKDzkf2SrNjihaArpeJYNjxkELBu1evI4lQA== +semver-compare@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" + integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= + "semver@2 >=2.2.1 || 3.x || 4 || 5", "semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" @@ -3520,6 +3798,11 @@ signal-exit@^3.0.0: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== +signal-exit@^3.0.2, signal-exit@^3.0.3: + version "3.0.6" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.6.tgz#24e630c4b0f03fea446a2bd299e62b4a6ca8d0af" + integrity sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ== + slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -3534,6 +3817,24 @@ slice-ansi@^2.1.0: astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" +slice-ansi@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" + integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + slide@^1.1.3: version "1.1.6" resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" @@ -3663,6 +3964,11 @@ static-extend@^0.1.1: define-property "^0.2.5" object-copy "^0.1.0" +string-argv@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" + integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== + string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -3728,6 +4034,15 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" +stringify-object@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629" + integrity sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw== + dependencies: + get-own-enumerable-property-symbols "^3.0.0" + is-obj "^1.0.1" + is-regexp "^1.0.0" + strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" @@ -3761,6 +4076,11 @@ strip-bom@^3.0.0: resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" @@ -3781,6 +4101,13 @@ success-symbol@^0.1.0: resolved "https://registry.yarnpkg.com/success-symbol/-/success-symbol-0.1.0.tgz#24022e486f3bf1cdca094283b769c472d3b72897" integrity sha1-JAIuSG878c3KCUKDt2nEctO3KJc= +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -3856,6 +4183,11 @@ through2@^2.0.0: readable-stream "~2.3.6" xtend "~4.0.1" +through@^2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + time-stamp@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" @@ -3928,6 +4260,11 @@ tslib@^1.8.0, tslib@^1.8.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" + integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== + tslint@5.14.0: version "5.14.0" resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.14.0.tgz#be62637135ac244fc9b37ed6ea5252c9eba1616e" @@ -3980,6 +4317,11 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + type-fest@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" @@ -4142,6 +4484,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -4174,6 +4525,11 @@ yallist@^3.0.0, yallist@^3.0.3: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== +yaml@^1.10.0: + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== + yargs-parser@^18.1.2: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" diff --git a/pusher/.prettierignore b/pusher/.prettierignore index 1f453464..26de759f 100644 --- a/pusher/.prettierignore +++ b/pusher/.prettierignore @@ -1 +1,2 @@ src/Messages/generated +src/Messages/JsonMessages From 36f5d42668212cc111233554aed00df370530c95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 16 Dec 2021 16:46:22 +0100 Subject: [PATCH 21/33] Fixing prettier setup on messages --- messages/.prettierrc.json | 3 +-- messages/JsonMessages/AdminApiData.ts | 2 +- messages/JsonMessages/RegisterData.ts | 3 +-- pusher/src/Controller/AuthenticateController.ts | 2 +- pusher/src/Model/Websocket/ExSocketInterface.ts | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/messages/.prettierrc.json b/messages/.prettierrc.json index 057ed062..e8980d15 100644 --- a/messages/.prettierrc.json +++ b/messages/.prettierrc.json @@ -1,5 +1,4 @@ { "printWidth": 120, - "tabWidth": 4, - "plugins": ["prettier-plugin-svelte"] + "tabWidth": 4 } diff --git a/messages/JsonMessages/AdminApiData.ts b/messages/JsonMessages/AdminApiData.ts index f21cc17c..72bfe682 100644 --- a/messages/JsonMessages/AdminApiData.ts +++ b/messages/JsonMessages/AdminApiData.ts @@ -1,5 +1,5 @@ import * as tg from "generic-type-guard"; -import { isCharacterTexture} from "./CharacterTexture"; +import { isCharacterTexture } from "./CharacterTexture"; /* * WARNING! The original file is in /messages/JsonMessages. diff --git a/messages/JsonMessages/RegisterData.ts b/messages/JsonMessages/RegisterData.ts index c585731e..473ee592 100644 --- a/messages/JsonMessages/RegisterData.ts +++ b/messages/JsonMessages/RegisterData.ts @@ -1,5 +1,5 @@ import * as tg from "generic-type-guard"; -import { isCharacterTexture} from "./CharacterTexture"; +import { isCharacterTexture } from "./CharacterTexture"; /* * WARNING! The original file is in /messages/JsonMessages. @@ -15,7 +15,6 @@ export const isRegisterData = new tg.IsInterface() userUuid: tg.isString, textures: tg.isArray(isCharacterTexture), authToken: tg.isString, - }) .withOptionalProperties({ messages: tg.isArray(tg.isUnknown), diff --git a/pusher/src/Controller/AuthenticateController.ts b/pusher/src/Controller/AuthenticateController.ts index f063de10..149253b3 100644 --- a/pusher/src/Controller/AuthenticateController.ts +++ b/pusher/src/Controller/AuthenticateController.ts @@ -6,7 +6,7 @@ import { AuthTokenData, jwtTokenManager } from "../Services/JWTTokenManager"; import { parse } from "query-string"; import { openIDClient } from "../Services/OpenIDClient"; import { DISABLE_ANONYMOUS, FRONT_URL } from "../Enum/EnvironmentVariable"; -import { RegisterData } from "../../../messages/JsonMessages/RegisterData"; +import { RegisterData } from "../Messages/JsonMessages/RegisterData"; export interface TokenInterface { userUuid: string; diff --git a/pusher/src/Model/Websocket/ExSocketInterface.ts b/pusher/src/Model/Websocket/ExSocketInterface.ts index 67078aa2..47eba2dd 100644 --- a/pusher/src/Model/Websocket/ExSocketInterface.ts +++ b/pusher/src/Model/Websocket/ExSocketInterface.ts @@ -11,7 +11,7 @@ import { import { WebSocket } from "uWebSockets.js"; import { ClientDuplexStream } from "grpc"; import { Zone } from "_Model/Zone"; -import { CharacterTexture} from "../../Messages/JsonMessages/CharacterTexture"; +import { CharacterTexture } from "../../Messages/JsonMessages/CharacterTexture"; export type BackConnection = ClientDuplexStream; From 404404d2bf88f89f09c69cbe8b43f4745f037748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Fri, 17 Dec 2021 10:18:31 +0100 Subject: [PATCH 22/33] Fixing pusher build --- pusher/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pusher/Dockerfile b/pusher/Dockerfile index af4e107e..3ead0913 100644 --- a/pusher/Dockerfile +++ b/pusher/Dockerfile @@ -11,7 +11,7 @@ COPY pusher/yarn.lock pusher/package.json ./ RUN yarn install COPY pusher . COPY --from=builder /usr/src/generated src/Messages/generated -COPY --from=builder /usr/src/JsonMessages /var/www/html/src/Messages/JsonMessages +COPY --from=builder /usr/src/JsonMessages src/Messages/JsonMessages ENV NODE_ENV=production RUN yarn run tsc From 4ffcebb2e480f27f3a63ff6c9b5802c6051c3f02 Mon Sep 17 00:00:00 2001 From: Alban Bruder Date: Mon, 20 Dec 2021 13:53:54 +0100 Subject: [PATCH 23/33] Use specified type in admin message --- back/src/RoomManager.ts | 2 +- back/src/Services/SocketManager.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/back/src/RoomManager.ts b/back/src/RoomManager.ts index 8dbde018..b68fe824 100644 --- a/back/src/RoomManager.ts +++ b/back/src/RoomManager.ts @@ -251,7 +251,7 @@ const roomManager: IRoomManagerServer = { }, sendAdminMessage(call: ServerUnaryCall, callback: sendUnaryData): void { socketManager - .sendAdminMessage(call.request.getRoomid(), call.request.getRecipientuuid(), call.request.getMessage()) + .sendAdminMessage(call.request.getRoomid(), call.request.getRecipientuuid(), call.request.getMessage(), call.request.getType()) .catch((e) => console.error(e)); callback(null, new EmptyMessage()); diff --git a/back/src/Services/SocketManager.ts b/back/src/Services/SocketManager.ts index 8989df75..a5f53f4c 100644 --- a/back/src/Services/SocketManager.ts +++ b/back/src/Services/SocketManager.ts @@ -691,7 +691,7 @@ export class SocketManager { } } - public async sendAdminMessage(roomId: string, recipientUuid: string, message: string): Promise { + public async sendAdminMessage(roomId: string, recipientUuid: string, message: string, type: string): Promise { const room = await this.roomsPromises.get(roomId); if (!room) { console.error( @@ -715,7 +715,7 @@ export class SocketManager { for (const recipient of recipients) { const sendUserMessage = new SendUserMessage(); sendUserMessage.setMessage(message); - sendUserMessage.setType("ban"); //todo: is the type correct? + sendUserMessage.setType(type); const serverToClientMessage = new ServerToClientMessage(); serverToClientMessage.setSendusermessage(sendUserMessage); From e0aab9c0ce164eed26104dddad0e713436fd8bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Mon, 20 Dec 2021 14:12:58 +0100 Subject: [PATCH 24/33] Properly delete rooms in Pusher in case of connection error and empty room Closes #1646 --- pusher/src/Controller/IoSocketController.ts | 9 ++++++++- pusher/src/Services/SocketManager.ts | 14 +++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/pusher/src/Controller/IoSocketController.ts b/pusher/src/Controller/IoSocketController.ts index 1f683b3b..c308ca00 100644 --- a/pusher/src/Controller/IoSocketController.ts +++ b/pusher/src/Controller/IoSocketController.ts @@ -1,5 +1,5 @@ import { CharacterLayer, ExSocketInterface } from "../Model/Websocket/ExSocketInterface"; //TODO fix import by "_Model/.." -import { GameRoomPolicyTypes } from "../Model/PusherRoom"; +import { GameRoomPolicyTypes, PusherRoom } from "../Model/PusherRoom"; import { PointInterface } from "../Model/Websocket/PointInterface"; import { SetPlayerDetailsMessage, @@ -273,6 +273,7 @@ export class IoSocketController { rejected: true, message: err?.response?.data.message, status: err?.response?.status, + room, }, websocketKey, websocketProtocol, @@ -392,6 +393,12 @@ export class IoSocketController { /* Handlers */ open: (ws) => { if (ws.rejected === true) { + // If there is a room in the error, let's check if we need to clean it. + if (ws.room) { + const room = ws.room as PusherRoom; + socketManager.deleteRoomIfEmpty(room); + } + //FIX ME to use status code if (ws.reason === tokenInvalidException) { socketManager.emitTokenExpiredMessage(ws); diff --git a/pusher/src/Services/SocketManager.ts b/pusher/src/Services/SocketManager.ts index a1777f0d..8bff27cb 100644 --- a/pusher/src/Services/SocketManager.ts +++ b/pusher/src/Services/SocketManager.ts @@ -351,11 +351,7 @@ export class SocketManager implements ZoneEventListener { debug("Leaving room %s.", socket.roomId); room.leave(socket); - if (room.isEmpty()) { - room.close(); - this.rooms.delete(socket.roomId); - debug("Room %s is empty. Deleting.", socket.roomId); - } + this.deleteRoomIfEmpty(room); } else { console.error("Could not find the GameRoom the user is leaving!"); } @@ -374,6 +370,14 @@ export class SocketManager implements ZoneEventListener { } } + public deleteRoomIfEmpty(room: PusherRoom): void { + if (room.isEmpty()) { + room.close(); + this.rooms.delete(room.roomUrl); + debug("Room %s is empty. Deleting.", room.roomUrl); + } + } + async getOrCreateRoom(roomUrl: string): Promise { //check and create new world for a room let room = this.rooms.get(roomUrl); From d185c0ee2455e44044a3479796c47bc535f8a079 Mon Sep 17 00:00:00 2001 From: Alban Bruder Date: Mon, 20 Dec 2021 15:14:49 +0100 Subject: [PATCH 25/33] fix code styling --- back/src/RoomManager.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/back/src/RoomManager.ts b/back/src/RoomManager.ts index b68fe824..322c9b46 100644 --- a/back/src/RoomManager.ts +++ b/back/src/RoomManager.ts @@ -251,7 +251,12 @@ const roomManager: IRoomManagerServer = { }, sendAdminMessage(call: ServerUnaryCall, callback: sendUnaryData): void { socketManager - .sendAdminMessage(call.request.getRoomid(), call.request.getRecipientuuid(), call.request.getMessage(), call.request.getType()) + .sendAdminMessage( + call.request.getRoomid(), + call.request.getRecipientuuid(), + call.request.getMessage(), + call.request.getType() + ) .catch((e) => console.error(e)); callback(null, new EmptyMessage()); From d792d35d095de09067aeabc697c9e2cb9fc922bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Mon, 20 Dec 2021 15:33:47 +0100 Subject: [PATCH 26/33] Correctly cleaning room in pusher even if an exception occurs Closes #1646 (again) --- pusher/src/Controller/IoSocketController.ts | 9 +++++---- pusher/src/Services/SocketManager.ts | 9 ++++++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/pusher/src/Controller/IoSocketController.ts b/pusher/src/Controller/IoSocketController.ts index c308ca00..072fe5dd 100644 --- a/pusher/src/Controller/IoSocketController.ts +++ b/pusher/src/Controller/IoSocketController.ts @@ -273,7 +273,7 @@ export class IoSocketController { rejected: true, message: err?.response?.data.message, status: err?.response?.status, - room, + roomId, }, websocketKey, websocketProtocol, @@ -368,6 +368,7 @@ export class IoSocketController { rejected: true, reason: e instanceof InvalidTokenError ? tokenInvalidException : null, message: e.message, + roomId, }, websocketKey, websocketProtocol, @@ -380,6 +381,7 @@ export class IoSocketController { rejected: true, reason: null, message: "500 Internal Server Error", + roomId, }, websocketKey, websocketProtocol, @@ -394,9 +396,8 @@ export class IoSocketController { open: (ws) => { if (ws.rejected === true) { // If there is a room in the error, let's check if we need to clean it. - if (ws.room) { - const room = ws.room as PusherRoom; - socketManager.deleteRoomIfEmpty(room); + if (ws.roomId) { + socketManager.deleteRoomIfEmptyFromId(ws.roomId as string); } //FIX ME to use status code diff --git a/pusher/src/Services/SocketManager.ts b/pusher/src/Services/SocketManager.ts index 8bff27cb..703b1cda 100644 --- a/pusher/src/Services/SocketManager.ts +++ b/pusher/src/Services/SocketManager.ts @@ -370,7 +370,7 @@ export class SocketManager implements ZoneEventListener { } } - public deleteRoomIfEmpty(room: PusherRoom): void { + private deleteRoomIfEmpty(room: PusherRoom): void { if (room.isEmpty()) { room.close(); this.rooms.delete(room.roomUrl); @@ -378,6 +378,13 @@ export class SocketManager implements ZoneEventListener { } } + public deleteRoomIfEmptyFromId(roomUrl: string): void { + const room = this.rooms.get(roomUrl); + if (room) { + this.deleteRoomIfEmpty(room); + } + } + async getOrCreateRoom(roomUrl: string): Promise { //check and create new world for a room let room = this.rooms.get(roomUrl); From e660e25616e9f51776d54009586ffeb8fed2b242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Tue, 21 Dec 2021 11:24:05 +0100 Subject: [PATCH 27/33] Fixing new MapDetails type guard It was working improperly with messages from the admin --- messages/JsonMessages/MapDetailsData.ts | 6 +++--- pusher/src/Controller/MapController.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/messages/JsonMessages/MapDetailsData.ts b/messages/JsonMessages/MapDetailsData.ts index ff18acc3..794c9bac 100644 --- a/messages/JsonMessages/MapDetailsData.ts +++ b/messages/JsonMessages/MapDetailsData.ts @@ -9,13 +9,13 @@ import { isNumber } from "generic-type-guard"; export const isMapDetailsData = new tg.IsInterface() .withProperties({ - roomSlug: tg.isOptional(tg.isString), // deprecated mapUrl: tg.isString, policy_type: isNumber, //isNumericEnum(GameRoomPolicyTypes), tags: tg.isArray(tg.isString), textures: tg.isArray(isCharacterTexture), - contactPage: tg.isUnion(tg.isString, tg.isUndefined), - authenticationMandatory: tg.isUnion(tg.isBoolean, tg.isUndefined), + authenticationMandatory: tg.isUnion(tg.isNullable(tg.isBoolean), tg.isUndefined), + roomSlug: tg.isNullable(tg.isString), // deprecated + contactPage: tg.isNullable(tg.isString), group: tg.isNullable(tg.isString), }) .withOptionalProperties({ diff --git a/pusher/src/Controller/MapController.ts b/pusher/src/Controller/MapController.ts index 3277bd84..00936b44 100644 --- a/pusher/src/Controller/MapController.ts +++ b/pusher/src/Controller/MapController.ts @@ -59,11 +59,11 @@ export class MapController extends BaseController { JSON.stringify({ mapUrl, policy_type: GameRoomPolicyTypes.ANONYMOUS_POLICY, - roomSlug: "", // Deprecated + roomSlug: null, // Deprecated group: null, tags: [], textures: [], - contactPage: undefined, + contactPage: null, authenticationMandatory: DISABLE_ANONYMOUS, } as MapDetailsData) ); From 85c07e3723ad1d1550277dce10370be0269b523f Mon Sep 17 00:00:00 2001 From: Alban Bruder Date: Tue, 21 Dec 2021 13:03:24 +0100 Subject: [PATCH 28/33] Fix admin message update in frontend --- front/src/Components/TypeMessage/BanMessage.svelte | 5 ++++- front/src/Components/TypeMessage/TextMessage.svelte | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/front/src/Components/TypeMessage/BanMessage.svelte b/front/src/Components/TypeMessage/BanMessage.svelte index faeae923..718170f9 100644 --- a/front/src/Components/TypeMessage/BanMessage.svelte +++ b/front/src/Components/TypeMessage/BanMessage.svelte @@ -3,7 +3,10 @@ import { banMessageVisibleStore, banMessageContentStore } from "../../Stores/TypeMessageStore/BanMessageStore"; import { onMount } from "svelte"; - const text = $banMessageContentStore; + let text: string; + $: { + text = $banMessageContentStore; + } const NAME_BUTTON = "Ok"; let nbSeconds = 10; let nameButton = ""; diff --git a/front/src/Components/TypeMessage/TextMessage.svelte b/front/src/Components/TypeMessage/TextMessage.svelte index 1541ab6e..78f4df41 100644 --- a/front/src/Components/TypeMessage/TextMessage.svelte +++ b/front/src/Components/TypeMessage/TextMessage.svelte @@ -3,8 +3,11 @@ import { textMessageContentStore, textMessageVisibleStore } from "../../Stores/TypeMessageStore/TextMessageStore"; import { QuillDeltaToHtmlConverter } from "quill-delta-to-html"; - const content = JSON.parse($textMessageContentStore); - const converter = new QuillDeltaToHtmlConverter(content.ops, { inlineStyles: true }); + let converter: QuillDeltaToHtmlConverter; + $: { + const content = JSON.parse($textMessageContentStore); + converter = new QuillDeltaToHtmlConverter(content.ops, { inlineStyles: true }); + } const NAME_BUTTON = "Ok"; function closeTextMessage() { From 90f7287860a3ac986bfa29b2658a63db815be93e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Tue, 21 Dec 2021 17:02:18 +0100 Subject: [PATCH 29/33] Adding the ability to set the player's color outline via the scripting API (currently not shared with the other players yet) --- docs/maps/api-player.md | 22 +++++++ front/src/Api/Events/ColorEvent.ts | 13 ++++ front/src/Api/Events/IframeEvent.ts | 9 +++ front/src/Api/iframe/player.ts | 20 +++++- front/src/Phaser/Entity/Character.ts | 36 ++++++++--- front/src/Phaser/Game/GameScene.ts | 13 ++++ front/src/Stores/OutlineColorStore.ts | 40 ++++++++++++ maps/tests/Outline/outline.json | 93 +++++++++++++++++++++++++++ maps/tests/Outline/outline.php | 36 +++++++++++ maps/tests/index.html | 8 +++ messages/protos/messages.proto | 1 + 11 files changed, 282 insertions(+), 9 deletions(-) create mode 100644 front/src/Api/Events/ColorEvent.ts create mode 100644 front/src/Stores/OutlineColorStore.ts create mode 100644 maps/tests/Outline/outline.json create mode 100644 maps/tests/Outline/outline.php diff --git a/docs/maps/api-player.md b/docs/maps/api-player.md index 9af0b1c2..35d5f464 100644 --- a/docs/maps/api-player.md +++ b/docs/maps/api-player.md @@ -106,3 +106,25 @@ Example : ```javascript WA.player.onPlayerMove(console.log); ``` + +### Set the outline color of the player +``` +WA.player.setOutlineColor(red: number, green: number, blue: number): Promise; +WA.player.removeOutlineColor(): Promise; +``` + +You can display a thin line around your player's name (the "outline"). + +Use `setOutlineColor` to set the outline and `removeOutlineColor` to remove it. + +Colors are expressed in RGB. Each parameter is an integer between 0 and 255. + +```typescript +// Let's add a red outline to our player +WA.player.setOutlineColor(255, 0, 0); +``` + +When you set the outline on your player, other players will see the outline too (the outline color is shared across +browsers automatically). + +![](images/outlines.png) diff --git a/front/src/Api/Events/ColorEvent.ts b/front/src/Api/Events/ColorEvent.ts new file mode 100644 index 00000000..c8e6d349 --- /dev/null +++ b/front/src/Api/Events/ColorEvent.ts @@ -0,0 +1,13 @@ +import * as tg from "generic-type-guard"; + +export const isColorEvent = new tg.IsInterface() + .withProperties({ + red: tg.isNumber, + green: tg.isNumber, + blue: tg.isNumber, + }) + .get(); +/** + * A message sent from the iFrame to the game to dynamically set the outline of the player. + */ +export type ColorEvent = tg.GuardedType; diff --git a/front/src/Api/Events/IframeEvent.ts b/front/src/Api/Events/IframeEvent.ts index c338ddbe..2871b93c 100644 --- a/front/src/Api/Events/IframeEvent.ts +++ b/front/src/Api/Events/IframeEvent.ts @@ -29,6 +29,7 @@ import { isMessageReferenceEvent, isTriggerActionMessageEvent } from "./ui/Trigg import type { MenuRegisterEvent, UnregisterMenuEvent } from "./ui/MenuRegisterEvent"; import type { ChangeLayerEvent } from "./ChangeLayerEvent"; import type { ChangeZoneEvent } from "./ChangeZoneEvent"; +import { isColorEvent } from "./ColorEvent"; export interface TypedMessageEvent extends MessageEvent { data: T; @@ -152,6 +153,14 @@ export const iframeQueryMapTypeGuards = { query: isCreateEmbeddedWebsiteEvent, answer: tg.isUndefined, }, + setPlayerOutline: { + query: isColorEvent, + answer: tg.isUndefined, + }, + removePlayerOutline: { + query: tg.isUndefined, + answer: tg.isUndefined, + }, }; type GuardedType = T extends (x: unknown) => x is infer T ? T : never; diff --git a/front/src/Api/iframe/player.ts b/front/src/Api/iframe/player.ts index c46f3fbc..2d187bf5 100644 --- a/front/src/Api/iframe/player.ts +++ b/front/src/Api/iframe/player.ts @@ -1,4 +1,4 @@ -import { IframeApiContribution, sendToWorkadventure } from "./IframeApiContribution"; +import { IframeApiContribution, queryWorkadventure, sendToWorkadventure } from "./IframeApiContribution"; import type { HasPlayerMovedEvent, HasPlayerMovedEventCallback } from "../Events/HasPlayerMovedEvent"; import { Subject } from "rxjs"; import { apiCallback } from "./registeredCallbacks"; @@ -82,6 +82,24 @@ export class WorkadventurePlayerCommands extends IframeApiContribution { + return queryWorkadventure({ + type: "setPlayerOutline", + data: { + red, + green, + blue, + }, + }); + } + + public removeOutlineColor(): Promise { + return queryWorkadventure({ + type: "removePlayerOutline", + data: undefined, + }); + } } export default new WorkadventurePlayerCommands(); diff --git a/front/src/Phaser/Entity/Character.ts b/front/src/Phaser/Entity/Character.ts index 2e0bd363..3281afe3 100644 --- a/front/src/Phaser/Entity/Character.ts +++ b/front/src/Phaser/Entity/Character.ts @@ -13,7 +13,8 @@ import { isSilentStore } from "../../Stores/MediaStore"; import { lazyLoadPlayerCharacterTextures, loadAllDefaultModels } from "./PlayerTexturesLoadingManager"; import { TexturesHelper } from "../Helpers/TexturesHelper"; import type { PictureStore } from "../../Stores/PictureStore"; -import { Writable, writable } from "svelte/store"; +import { Unsubscriber, Writable, writable } from "svelte/store"; +import { createColorStore } from "../../Stores/OutlineColorStore"; const playerNameY = -25; @@ -40,6 +41,8 @@ export abstract class Character extends Container { private emoteTween: Phaser.Tweens.Tween | null = null; scene: GameScene; private readonly _pictureStore: Writable; + private readonly outlineColorStore = createColorStore(); + private readonly outlineColorStoreUnsubscribe: Unsubscriber; constructor( scene: GameScene, @@ -97,18 +100,26 @@ export abstract class Character extends Container { }); this.on("pointerover", () => { - this.getOutlinePlugin()?.add(this.playerName, { - thickness: 2, - outlineColor: 0xffff00, - }); - this.scene.markDirty(); + this.outlineColorStore.pointerOver(); }); this.on("pointerout", () => { - this.getOutlinePlugin()?.remove(this.playerName); - this.scene.markDirty(); + this.outlineColorStore.pointerOut(); }); } + this.outlineColorStoreUnsubscribe = this.outlineColorStore.subscribe((color) => { + if (color === undefined) { + this.getOutlinePlugin()?.remove(this.playerName); + } else { + this.getOutlinePlugin()?.remove(this.playerName); + this.getOutlinePlugin()?.add(this.playerName, { + thickness: 2, + outlineColor: color, + }); + } + this.scene.markDirty(); + }); + scene.add.existing(this); this.scene.physics.world.enableBody(this); @@ -315,6 +326,7 @@ export abstract class Character extends Container { } } this.list.forEach((objectContaining) => objectContaining.destroy()); + this.outlineColorStoreUnsubscribe(); super.destroy(); } @@ -401,4 +413,12 @@ export abstract class Character extends Container { public get pictureStore(): PictureStore { return this._pictureStore; } + + public setOutlineColor(red: number, green: number, blue: number): void { + this.outlineColorStore.setColor((red << 16) | (green << 8) | blue); + } + + public removeOutlineColor(): void { + this.outlineColorStore.removeColor(); + } } diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index ae89e2c3..abe9137b 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -1300,6 +1300,18 @@ ${escapedMessage} iframeListener.registerAnswerer("removeActionMessage", (message) => { layoutManagerActionStore.removeAction(message.uuid); }); + + iframeListener.registerAnswerer("setPlayerOutline", (message) => { + const normalizeColor = (color: number) => Math.min(Math.max(0, Math.round(color)), 255); + const red = normalizeColor(message.red); + const green = normalizeColor(message.green); + const blue = normalizeColor(message.blue); + this.CurrentPlayer.setOutlineColor(red, green, blue); + }); + + iframeListener.registerAnswerer("removePlayerOutline", (message) => { + this.CurrentPlayer.removeOutlineColor(); + }); } private setPropertyLayer( @@ -1422,6 +1434,7 @@ ${escapedMessage} iframeListener.unregisterAnswerer("removeActionMessage"); iframeListener.unregisterAnswerer("openCoWebsite"); iframeListener.unregisterAnswerer("getCoWebsites"); + iframeListener.unregisterAnswerer("setPlayerOutline"); this.sharedVariablesManager?.close(); this.embeddedWebsiteManager?.close(); diff --git a/front/src/Stores/OutlineColorStore.ts b/front/src/Stores/OutlineColorStore.ts new file mode 100644 index 00000000..1618eebc --- /dev/null +++ b/front/src/Stores/OutlineColorStore.ts @@ -0,0 +1,40 @@ +import { writable } from "svelte/store"; + +export function createColorStore() { + const { subscribe, set } = writable(undefined); + + let color: number | undefined = undefined; + let focused: boolean = false; + + const updateColor = () => { + if (focused) { + set(0xffff00); + } else { + set(color); + } + }; + + return { + subscribe, + + pointerOver() { + focused = true; + updateColor(); + }, + + pointerOut() { + focused = false; + updateColor(); + }, + + setColor(newColor: number) { + color = newColor; + updateColor(); + }, + + removeColor() { + color = undefined; + updateColor(); + }, + }; +} diff --git a/maps/tests/Outline/outline.json b/maps/tests/Outline/outline.json new file mode 100644 index 00000000..476fe25c --- /dev/null +++ b/maps/tests/Outline/outline.json @@ -0,0 +1,93 @@ +{ "compressionlevel":-1, + "height":10, + "infinite":false, + "layers":[ + { + "data":[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], + "height":10, + "id":1, + "name":"floor", + "opacity":1, + "properties":[ + { + "name":"openWebsite", + "type":"string", + "value":"outline.php" + }, + { + "name":"openWebsiteAllowApi", + "type":"bool", + "value":true + }], + "type":"tilelayer", + "visible":true, + "width":10, + "x":0, + "y":0 + }, + { + "data":[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + "height":10, + "id":2, + "name":"start", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":10, + "x":0, + "y":0 + }, + { + "draworder":"topdown", + "id":3, + "name":"floorLayer", + "objects":[ + { + "height":342.082007343941, + "id":1, + "name":"", + "rotation":0, + "text": + { + "fontfamily":"Sans Serif", + "pixelsize":13, + "text":"Test:\nPlay with the colors and the limits in the form\n\nResult:\nThe outline should be displayed. A mouse over displays the yellow outline but the normal outline comes back on mouse out.\n\nTest:\nClick the remove outline\n\nResult:\nThe outline is removed\n\nTest:\nClick with many players\n\nResult:\nThe outline is correctly shared", + "wrap":true + }, + "type":"", + "visible":true, + "width":274.96422378621, + "x":35.7623688177162, + "y":8.73391812865529 + }], + "opacity":1, + "type":"objectgroup", + "visible":true, + "x":0, + "y":0 + }], + "nextlayerid":6, + "nextobjectid":3, + "orientation":"orthogonal", + "renderorder":"right-down", + "tiledversion":"2021.03.23", + "tileheight":32, + "tilesets":[ + { + "columns":11, + "firstgid":1, + "image":"..\/tileset1.png", + "imageheight":352, + "imagewidth":352, + "margin":0, + "name":"tileset1", + "spacing":0, + "tilecount":121, + "tileheight":32, + "tilewidth":32 + }], + "tilewidth":32, + "type":"map", + "version":1.5, + "width":10 +} \ No newline at end of file diff --git a/maps/tests/Outline/outline.php b/maps/tests/Outline/outline.php new file mode 100644 index 00000000..244ca4bc --- /dev/null +++ b/maps/tests/Outline/outline.php @@ -0,0 +1,36 @@ + + + + + + + +red:
+green:
+blue:
+ + + + + + + diff --git a/maps/tests/index.html b/maps/tests/index.html index c920c876..ffe389b3 100644 --- a/maps/tests/index.html +++ b/maps/tests/index.html @@ -251,6 +251,14 @@ Testing scripting API for enters/leaves layer + + + Success Failure Pending + + + Testing scripting API for outline on players + +

CoWebsite

diff --git a/messages/protos/messages.proto b/messages/protos/messages.proto index 117ab582..d210c42e 100644 --- a/messages/protos/messages.proto +++ b/messages/protos/messages.proto @@ -13,6 +13,7 @@ message PositionMessage { } Direction direction = 3; bool moving = 4; + uint32 outlineColor = 5; } message PointMessage { From 482ba9690abf8e0aaa68c7ee0b61d9c7f1d9b9ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Wed, 22 Dec 2021 18:30:23 +0100 Subject: [PATCH 30/33] Sharing outline color changes in real time --- back/src/Model/GameRoom.ts | 36 +++++++++++++++--- back/src/Model/PositionNotifier.ts | 31 ++++++++++++++-- back/src/Model/User.ts | 17 ++++++++- back/src/Model/Zone.ts | 21 ++++++++++- back/src/RoomManager.ts | 18 ++++++--- back/src/Services/SocketManager.ts | 32 ++++++++-------- front/src/Connexion/ConnexionModels.ts | 7 ++++ front/src/Connexion/RoomConnection.ts | 35 +++++++++++++++++- front/src/Phaser/Entity/Character.ts | 4 +- front/src/Phaser/Game/GameScene.ts | 51 +++++++++++++++++++++----- front/src/Stores/MediaStore.ts | 28 ++++++++++---- front/src/WebRtc/SimplePeer.ts | 2 +- messages/protos/messages.proto | 15 ++++++-- pusher/src/Model/Zone.ts | 15 ++++++++ pusher/src/Services/SocketManager.ts | 12 ++++++ 15 files changed, 268 insertions(+), 56 deletions(-) diff --git a/back/src/Model/GameRoom.ts b/back/src/Model/GameRoom.ts index 5c114f19..d708fba5 100644 --- a/back/src/Model/GameRoom.ts +++ b/back/src/Model/GameRoom.ts @@ -2,7 +2,13 @@ import { PointInterface } from "./Websocket/PointInterface"; import { Group } from "./Group"; import { User, UserSocket } from "./User"; import { PositionInterface } from "_Model/PositionInterface"; -import { EmoteCallback, EntersCallback, LeavesCallback, MovesCallback } from "_Model/Zone"; +import { + EmoteCallback, + EntersCallback, + LeavesCallback, + MovesCallback, + PlayerDetailsUpdatedCallback, +} from "_Model/Zone"; import { PositionNotifier } from "./PositionNotifier"; import { Movable } from "_Model/Movable"; import { @@ -11,6 +17,7 @@ import { EmoteEventMessage, ErrorMessage, JoinRoomMessage, + SetPlayerDetailsMessage, SubToPusherRoomMessage, VariableMessage, VariableWithTagMessage, @@ -56,10 +63,19 @@ export class GameRoom { onEnters: EntersCallback, onMoves: MovesCallback, onLeaves: LeavesCallback, - onEmote: EmoteCallback + onEmote: EmoteCallback, + onPlayerDetailsUpdated: PlayerDetailsUpdatedCallback ) { // A zone is 10 sprites wide. - this.positionNotifier = new PositionNotifier(320, 320, onEnters, onMoves, onLeaves, onEmote); + this.positionNotifier = new PositionNotifier( + 320, + 320, + onEnters, + onMoves, + onLeaves, + onEmote, + onPlayerDetailsUpdated + ); } public static async create( @@ -71,7 +87,8 @@ export class GameRoom { onEnters: EntersCallback, onMoves: MovesCallback, onLeaves: LeavesCallback, - onEmote: EmoteCallback + onEmote: EmoteCallback, + onPlayerDetailsUpdated: PlayerDetailsUpdatedCallback ): Promise { const mapDetails = await GameRoom.getMapDetails(roomUrl); @@ -85,7 +102,8 @@ export class GameRoom { onEnters, onMoves, onLeaves, - onEmote + onEmote, + onPlayerDetailsUpdated ); return gameRoom; @@ -180,6 +198,14 @@ export class GameRoom { this.updateUserGroup(user); } + updatePlayerDetails(user: User, playerDetailsMessage: SetPlayerDetailsMessage) { + if (playerDetailsMessage.getRemoveoutlinecolor()) { + user.outlineColor = undefined; + } else { + user.outlineColor = playerDetailsMessage.getOutlinecolor(); + } + } + private updateUserGroup(user: User): void { user.group?.updatePosition(); user.group?.searchForNearbyUsers(); diff --git a/back/src/Model/PositionNotifier.ts b/back/src/Model/PositionNotifier.ts index 2052f229..b059999a 100644 --- a/back/src/Model/PositionNotifier.ts +++ b/back/src/Model/PositionNotifier.ts @@ -8,12 +8,19 @@ * The PositionNotifier is important for performance. It allows us to send the position of players only to a restricted * number of players around the current player. */ -import { EmoteCallback, EntersCallback, LeavesCallback, MovesCallback, Zone } from "./Zone"; +import { + EmoteCallback, + EntersCallback, + LeavesCallback, + MovesCallback, + PlayerDetailsUpdatedCallback, + Zone, +} from "./Zone"; import { Movable } from "_Model/Movable"; import { PositionInterface } from "_Model/PositionInterface"; import { ZoneSocket } from "../RoomManager"; import { User } from "../Model/User"; -import { EmoteEventMessage } from "../Messages/generated/messages_pb"; +import { EmoteEventMessage, SetPlayerDetailsMessage } from "../Messages/generated/messages_pb"; interface ZoneDescriptor { i: number; @@ -42,7 +49,8 @@ export class PositionNotifier { private onUserEnters: EntersCallback, private onUserMoves: MovesCallback, private onUserLeaves: LeavesCallback, - private onEmote: EmoteCallback + private onEmote: EmoteCallback, + private onPlayerDetailsUpdated: PlayerDetailsUpdatedCallback ) {} private getZoneDescriptorFromCoordinates(x: number, y: number): ZoneDescriptor { @@ -98,7 +106,15 @@ export class PositionNotifier { let zone = this.zones[j][i]; if (zone === undefined) { - zone = new Zone(this.onUserEnters, this.onUserMoves, this.onUserLeaves, this.onEmote, i, j); + zone = new Zone( + this.onUserEnters, + this.onUserMoves, + this.onUserLeaves, + this.onEmote, + this.onPlayerDetailsUpdated, + i, + j + ); this.zones[j][i] = zone; } return zone; @@ -132,4 +148,11 @@ export class PositionNotifier { } } } + + public updatePlayerDetails(user: User, playerDetails: SetPlayerDetailsMessage) { + const position = user.getPosition(); + const zoneDesc = this.getZoneDescriptorFromCoordinates(position.x, position.y); + const zone = this.getZone(zoneDesc.i, zoneDesc.j); + zone.updatePlayerDetails(user, playerDetails); + } } diff --git a/back/src/Model/User.ts b/back/src/Model/User.ts index 186fb32a..a02ffde9 100644 --- a/back/src/Model/User.ts +++ b/back/src/Model/User.ts @@ -9,6 +9,7 @@ import { CompanionMessage, PusherToBackMessage, ServerToClientMessage, + SetPlayerDetailsMessage, SubMessage, } from "../Messages/generated/messages_pb"; import { CharacterLayer } from "_Model/Websocket/CharacterLayer"; @@ -31,7 +32,8 @@ export class User implements Movable { public readonly visitCardUrl: string | null, public readonly name: string, public readonly characterLayers: CharacterLayer[], - public readonly companion?: CompanionMessage + public readonly companion?: CompanionMessage, + private _outlineColor?: number | undefined ) { this.listenedZones = new Set(); @@ -69,4 +71,17 @@ export class User implements Movable { }, 100); } } + + public set outlineColor(value: number | undefined) { + this._outlineColor = value; + + const playerDetails = new SetPlayerDetailsMessage(); + if (value === undefined) { + playerDetails.setRemoveoutlinecolor(true); + } else { + playerDetails.setOutlinecolor(value); + } + + this.positionNotifier.updatePlayerDetails(this, playerDetails); + } } diff --git a/back/src/Model/Zone.ts b/back/src/Model/Zone.ts index d236e489..53f45464 100644 --- a/back/src/Model/Zone.ts +++ b/back/src/Model/Zone.ts @@ -3,12 +3,20 @@ import { PositionInterface } from "_Model/PositionInterface"; import { Movable } from "./Movable"; import { Group } from "./Group"; import { ZoneSocket } from "../RoomManager"; -import { EmoteEventMessage } from "../Messages/generated/messages_pb"; +import { + EmoteEventMessage, + SetPlayerDetailsMessage, + PlayerDetailsUpdatedMessage, +} from "../Messages/generated/messages_pb"; export type EntersCallback = (thing: Movable, fromZone: Zone | null, listener: ZoneSocket) => void; export type MovesCallback = (thing: Movable, position: PositionInterface, listener: ZoneSocket) => void; export type LeavesCallback = (thing: Movable, newZone: Zone | null, listener: ZoneSocket) => void; export type EmoteCallback = (emoteEventMessage: EmoteEventMessage, listener: ZoneSocket) => void; +export type PlayerDetailsUpdatedCallback = ( + playerDetailsUpdatedMessage: PlayerDetailsUpdatedMessage, + listener: ZoneSocket +) => void; export class Zone { private things: Set = new Set(); @@ -19,6 +27,7 @@ export class Zone { private onMoves: MovesCallback, private onLeaves: LeavesCallback, private onEmote: EmoteCallback, + private onPlayerDetailsUpdated: PlayerDetailsUpdatedCallback, public readonly x: number, public readonly y: number ) {} @@ -106,4 +115,14 @@ export class Zone { this.onEmote(emoteEventMessage, listener); } } + + public updatePlayerDetails(user: User, playerDetails: SetPlayerDetailsMessage) { + const playerDetailsUpdatedMessage = new PlayerDetailsUpdatedMessage(); + playerDetailsUpdatedMessage.setUserid(user.id); + playerDetailsUpdatedMessage.setDetails(playerDetails); + + for (const listener of this.listeners) { + this.onPlayerDetailsUpdated(playerDetailsUpdatedMessage, listener); + } + } } diff --git a/back/src/RoomManager.ts b/back/src/RoomManager.ts index 322c9b46..9f6b5d69 100644 --- a/back/src/RoomManager.ts +++ b/back/src/RoomManager.ts @@ -5,6 +5,7 @@ import { AdminPusherToBackMessage, AdminRoomMessage, BanMessage, + BanUserMessage, BatchToPusherMessage, BatchToPusherRoomMessage, EmotePromptMessage, @@ -16,7 +17,9 @@ import { QueryJitsiJwtMessage, RefreshRoomPromptMessage, RoomMessage, + SendUserMessage, ServerToAdminClientMessage, + SetPlayerDetailsMessage, SilentMessage, UserMovesMessage, VariableMessage, @@ -118,14 +121,17 @@ const roomManager: IRoomManagerServer = { ); } else if (message.hasSendusermessage()) { const sendUserMessage = message.getSendusermessage(); - if (sendUserMessage !== undefined) { - socketManager.handlerSendUserMessage(user, sendUserMessage); - } + socketManager.handleSendUserMessage(user, sendUserMessage as SendUserMessage); } else if (message.hasBanusermessage()) { const banUserMessage = message.getBanusermessage(); - if (banUserMessage !== undefined) { - socketManager.handlerBanUserMessage(room, user, banUserMessage); - } + socketManager.handlerBanUserMessage(room, user, banUserMessage as BanUserMessage); + } else if (message.hasSetplayerdetailsmessage()) { + const setPlayerDetailsMessage = message.getSetplayerdetailsmessage(); + socketManager.handleSetPlayerDetails( + room, + user, + setPlayerDetailsMessage as SetPlayerDetailsMessage + ); } else { throw new Error("Unhandled message type"); } diff --git a/back/src/Services/SocketManager.ts b/back/src/Services/SocketManager.ts index a5f53f4c..6d76f3af 100644 --- a/back/src/Services/SocketManager.ts +++ b/back/src/Services/SocketManager.ts @@ -33,6 +33,8 @@ import { VariableMessage, BatchToPusherRoomMessage, SubToPusherRoomMessage, + SetPlayerDetailsMessage, + PlayerDetailsUpdatedMessage, } from "../Messages/generated/messages_pb"; import { User, UserSocket } from "../Model/User"; import { ProtobufUtils } from "../Model/Websocket/ProtobufUtils"; @@ -151,20 +153,9 @@ export class SocketManager { //room.setViewport(client, client.viewport); } - // Useless now, will be useful again if we allow editing details in game - /*handleSetPlayerDetails(client: UserSocket, playerDetailsMessage: SetPlayerDetailsMessage) { - const playerDetails = { - name: playerDetailsMessage.getName(), - characterLayers: playerDetailsMessage.getCharacterlayersList() - }; - //console.log(SocketIoEvent.SET_PLAYER_DETAILS, playerDetails); - if (!isSetPlayerDetailsMessage(playerDetails)) { - emitError(client, 'Invalid SET_PLAYER_DETAILS message received: '); - return; - } - client.name = playerDetails.name; - client.characterLayers = SocketManager.mergeCharacterLayersAndCustomTextures(playerDetails.characterLayers, client.textures); - }*/ + handleSetPlayerDetails(room: GameRoom, user: User, playerDetailsMessage: SetPlayerDetailsMessage) { + room.updatePlayerDetails(user, playerDetailsMessage); + } handleSilentMessage(room: GameRoom, user: User, silentMessage: SilentMessage) { room.setSilent(user, silentMessage.getSilent()); @@ -282,7 +273,9 @@ export class SocketManager { (thing: Movable, newZone: Zone | null, listener: ZoneSocket) => this.onClientLeave(thing, newZone, listener), (emoteEventMessage: EmoteEventMessage, listener: ZoneSocket) => - this.onEmote(emoteEventMessage, listener) + this.onEmote(emoteEventMessage, listener), + (playerDetailsUpdatedMessage: PlayerDetailsUpdatedMessage, listener: ZoneSocket) => + this.onPlayerDetailsUpdated(playerDetailsUpdatedMessage, listener) ) .then((gameRoom) => { gaugeManager.incNbRoomGauge(); @@ -378,6 +371,13 @@ export class SocketManager { emitZoneMessage(subMessage, client); } + private onPlayerDetailsUpdated(playerDetailsUpdatedMessage: PlayerDetailsUpdatedMessage, client: ZoneSocket) { + const subMessage = new SubToPusherMessage(); + subMessage.setPlayerdetailsupdatedmessage(playerDetailsUpdatedMessage); + + emitZoneMessage(subMessage, client); + } + private emitCreateUpdateGroupEvent(client: ZoneSocket, fromZone: Zone | null, group: Group): void { const position = group.getPosition(); const pointMessage = new PointMessage(); @@ -572,7 +572,7 @@ export class SocketManager { user.socket.write(serverToClientMessage); } - public handlerSendUserMessage(user: User, sendUserMessageToSend: SendUserMessage) { + public handleSendUserMessage(user: User, sendUserMessageToSend: SendUserMessage) { const sendUserMessage = new SendUserMessage(); sendUserMessage.setMessage(sendUserMessageToSend.getMessage()); sendUserMessage.setType(sendUserMessageToSend.getType()); diff --git a/front/src/Connexion/ConnexionModels.ts b/front/src/Connexion/ConnexionModels.ts index fa0f192e..a2dc68da 100644 --- a/front/src/Connexion/ConnexionModels.ts +++ b/front/src/Connexion/ConnexionModels.ts @@ -18,6 +18,7 @@ export enum EventMessage { GROUP_DELETE = "group-delete", SET_PLAYER_DETAILS = "set-player-details", // Send the name and character to the server (on connect), receive back the id. ITEM_EVENT = "item-event", + USER_DETAILS_UPDATED = "user-details-updated", CONNECT_ERROR = "connect_error", CONNECTING_ERROR = "connecting_error", @@ -102,6 +103,12 @@ export interface ItemEventMessageInterface { parameters: unknown; } +export interface PlayerDetailsUpdatedMessageInterface { + userId: number; + outlineColor: number; + removeOutlineColor: boolean; +} + export interface RoomJoinedMessageInterface { //users: MessageUserPositionInterface[], //groups: GroupCreatedUpdatedMessageInterface[], diff --git a/front/src/Connexion/RoomConnection.ts b/front/src/Connexion/RoomConnection.ts index 9e4025b1..96191b15 100644 --- a/front/src/Connexion/RoomConnection.ts +++ b/front/src/Connexion/RoomConnection.ts @@ -34,6 +34,7 @@ import { BanUserMessage, VariableMessage, ErrorMessage, + PlayerDetailsUpdatedMessage, } from "../Messages/generated/messages_pb"; import type { UserSimplePeerInterface } from "../WebRtc/SimplePeer"; @@ -45,6 +46,7 @@ import { ItemEventMessageInterface, MessageUserJoined, OnConnectInterface, + PlayerDetailsUpdatedMessageInterface, PlayGlobalMessageInterface, PositionInterface, RoomJoinedMessageInterface, @@ -172,6 +174,9 @@ export class RoomConnection implements RoomConnection { } else if (subMessage.hasEmoteeventmessage()) { const emoteMessage = subMessage.getEmoteeventmessage() as EmoteEventMessage; emoteEventStream.fire(emoteMessage.getActoruserid(), emoteMessage.getEmote()); + } else if (subMessage.hasPlayerdetailsupdatedmessage()) { + event = EventMessage.USER_DETAILS_UPDATED; + payload = subMessage.getPlayerdetailsupdatedmessage(); } else if (subMessage.hasErrormessage()) { const errorMessage = subMessage.getErrormessage() as ErrorMessage; console.error("An error occurred server side: " + errorMessage.getMessage()); @@ -276,7 +281,7 @@ export class RoomConnection implements RoomConnection { } } - public emitPlayerDetailsMessage(userName: string, characterLayersSelected: BodyResourceDescriptionInterface[]) { + /*public emitPlayerDetailsMessage(userName: string, characterLayersSelected: BodyResourceDescriptionInterface[]) { const message = new SetPlayerDetailsMessage(); message.setName(userName); message.setCharacterlayersList(characterLayersSelected.map((characterLayer) => characterLayer.name)); @@ -284,6 +289,20 @@ export class RoomConnection implements RoomConnection { const clientToServerMessage = new ClientToServerMessage(); clientToServerMessage.setSetplayerdetailsmessage(message); + this.socket.send(clientToServerMessage.serializeBinary().buffer); + }*/ + + public emitPlayerOutlineColor(color: number | null) { + const message = new SetPlayerDetailsMessage(); + if (color === null) { + message.setRemoveoutlinecolor(true); + } else { + message.setOutlinecolor(color); + } + + const clientToServerMessage = new ClientToServerMessage(); + clientToServerMessage.setSetplayerdetailsmessage(message); + this.socket.send(clientToServerMessage.serializeBinary().buffer); } @@ -596,6 +615,20 @@ export class RoomConnection implements RoomConnection { }); } + onPlayerDetailsUpdated(callback: (message: PlayerDetailsUpdatedMessageInterface) => void): void { + this.onMessage(EventMessage.USER_DETAILS_UPDATED, (message: PlayerDetailsUpdatedMessage) => { + const details = message.getDetails(); + if (details === undefined) { + throw new Error("Malformed message. Missing details in PlayerDetailsUpdatedMessage"); + } + callback({ + userId: message.getUserid(), + outlineColor: details.getOutlinecolor(), + removeOutlineColor: details.getRemoveoutlinecolor(), + }); + }); + } + public uploadAudio(file: FormData) { return Axios.post(`${UPLOADER_URL}/upload-audio-message`, file) .then((res: { data: {} }) => { diff --git a/front/src/Phaser/Entity/Character.ts b/front/src/Phaser/Entity/Character.ts index 3281afe3..98154e37 100644 --- a/front/src/Phaser/Entity/Character.ts +++ b/front/src/Phaser/Entity/Character.ts @@ -414,8 +414,8 @@ export abstract class Character extends Container { return this._pictureStore; } - public setOutlineColor(red: number, green: number, blue: number): void { - this.outlineColorStore.setColor((red << 16) | (green << 8) | blue); + public setOutlineColor(color: number): void { + this.outlineColorStore.setColor(color); } public removeOutlineColor(): void { diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index abe9137b..99580374 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -55,6 +55,7 @@ import type { MessageUserMovedInterface, MessageUserPositionInterface, OnConnectInterface, + PlayerDetailsUpdatedMessageInterface, PointInterface, PositionInterface, RoomJoinedMessageInterface, @@ -88,6 +89,7 @@ import Tileset = Phaser.Tilemaps.Tileset; import SpriteSheetFile = Phaser.Loader.FileTypes.SpriteSheetFile; import FILE_LOAD_ERROR = Phaser.Loader.Events.FILE_LOAD_ERROR; import { MapStore } from "../../Stores/Utils/MapStore"; +import { SetPlayerDetailsMessage } from "../../Messages/generated/messages_pb"; export interface GameSceneInitInterface { initPosition: PointInterface | null; reconnecting: boolean; @@ -123,6 +125,11 @@ interface DeleteGroupEventInterface { groupId: number; } +interface PlayerDetailsUpdatedInterface { + type: "PlayerDetailsUpdated"; + details: PlayerDetailsUpdatedMessageInterface; +} + export class GameScene extends DirtyScene { Terrains: Array; CurrentPlayer!: Player; @@ -135,20 +142,14 @@ export class GameScene extends DirtyScene { groups: Map; circleTexture!: CanvasTexture; circleRedTexture!: CanvasTexture; - pendingEvents: Queue< - | InitUserPositionEventInterface - | AddPlayerEventInterface - | RemovePlayerEventInterface - | UserMovedEventInterface - | GroupCreatedUpdatedEventInterface - | DeleteGroupEventInterface - > = new Queue< + pendingEvents = new Queue< | InitUserPositionEventInterface | AddPlayerEventInterface | RemovePlayerEventInterface | UserMovedEventInterface | GroupCreatedUpdatedEventInterface | DeleteGroupEventInterface + | PlayerDetailsUpdatedInterface >(); private initPosition: PositionInterface | null = null; private playersPositionInterpolator = new PlayersPositionInterpolator(); @@ -735,6 +736,13 @@ export class GameScene extends DirtyScene { item.fire(message.event, message.state, message.parameters); }); + this.connection.onPlayerDetailsUpdated((message) => { + this.pendingEvents.enqueue({ + type: "PlayerDetailsUpdated", + details: message, + }); + }); + /** * Triggered when we receive the JWT token to connect to Jitsi */ @@ -1306,11 +1314,14 @@ ${escapedMessage} const red = normalizeColor(message.red); const green = normalizeColor(message.green); const blue = normalizeColor(message.blue); - this.CurrentPlayer.setOutlineColor(red, green, blue); + const color = (red << 16) | (green << 8) | blue; + this.CurrentPlayer.setOutlineColor(color); + this.connection?.emitPlayerOutlineColor(color); }); iframeListener.registerAnswerer("removePlayerOutline", (message) => { this.CurrentPlayer.removeOutlineColor(); + this.connection?.emitPlayerOutlineColor(null); }); } @@ -1689,6 +1700,11 @@ ${escapedMessage} case "DeleteGroupEvent": this.doDeleteGroup(event.groupId); break; + case "PlayerDetailsUpdated": + this.doUpdatePlayerDetails(event.details); + break; + default: + const tmp: never = event; } } // Let's move all users @@ -1865,6 +1881,23 @@ ${escapedMessage} this.groups.delete(groupId); } + doUpdatePlayerDetails(message: PlayerDetailsUpdatedMessageInterface): void { + const character = this.MapPlayersByKey.get(message.userId); + if (character === undefined) { + console.log( + "Could not set new details to character with ID ", + message.userId, + ". Did he/she left before te message was received?" + ); + return; + } + if (message.removeOutlineColor) { + character.removeOutlineColor(); + } else { + character.setOutlineColor(message.outlineColor); + } + } + /** * Sends to the server an event emitted by one of the ActionableItems. */ diff --git a/front/src/Stores/MediaStore.ts b/front/src/Stores/MediaStore.ts index 44c78ad2..a0f1a92b 100644 --- a/front/src/Stores/MediaStore.ts +++ b/front/src/Stores/MediaStore.ts @@ -365,7 +365,9 @@ function applyCameraConstraints(currentStream: MediaStream | null, constraints: return; } for (const track of currentStream.getVideoTracks()) { - toggleConstraints(track, constraints); + toggleConstraints(track, constraints).catch((e) => + console.error("Error while setting new camera constraints:", e) + ); } } @@ -380,19 +382,21 @@ function applyMicrophoneConstraints( return; } for (const track of currentStream.getAudioTracks()) { - toggleConstraints(track, constraints); + toggleConstraints(track, constraints).catch((e) => + console.error("Error while setting new audio constraints:", e) + ); } } -function toggleConstraints(track: MediaStreamTrack, constraints: MediaTrackConstraints | boolean): void { +async function toggleConstraints(track: MediaStreamTrack, constraints: MediaTrackConstraints | boolean): Promise { if (implementCorrectTrackBehavior) { track.enabled = constraints !== false; } else if (constraints === false) { track.stop(); } - // @ts-ignore + if (typeof constraints !== "boolean" && constraints !== true) { - track.applyConstraints(constraints); + return track.applyConstraints(constraints); } } @@ -484,7 +488,12 @@ export const localStreamStore = derived, LocalS type: "success", stream: null, }); - initStream(constraints); + initStream(constraints).catch((e) => { + set({ + type: "error", + error: e instanceof Error ? e : new Error("An unknown error happened"), + }); + }); } } else { //on bad navigators like chrome, we have to stop the tracks when we mute and reinstantiate the stream when we need to unmute @@ -496,7 +505,12 @@ export const localStreamStore = derived, LocalS }); } //we reemit the stream if it was muted just to be sure else if (constraints.audio /* && !oldConstraints.audio*/ || (!oldConstraints.video && constraints.video)) { - initStream(constraints); + initStream(constraints).catch((e) => { + set({ + type: "error", + error: e instanceof Error ? e : new Error("An unknown error happened"), + }); + }); } oldConstraints = { video: !!constraints.video, diff --git a/front/src/WebRtc/SimplePeer.ts b/front/src/WebRtc/SimplePeer.ts index 7c575867..ccbd0012 100644 --- a/front/src/WebRtc/SimplePeer.ts +++ b/front/src/WebRtc/SimplePeer.ts @@ -98,7 +98,7 @@ export class SimplePeer { private receiveWebrtcStart(user: UserSimplePeerInterface): void { this.Users.push(user); - // Note: the clients array contain the list of all clients (even the ones we are already connected to in case a user joints a group) + // Note: the clients array contain the list of all clients (even the ones we are already connected to in case a user joins a group) // So we can receive a request we already had before. (which will abort at the first line of createPeerConnection) // This would be symmetrical to the way we handle disconnection. diff --git a/messages/protos/messages.proto b/messages/protos/messages.proto index d210c42e..c53ec143 100644 --- a/messages/protos/messages.proto +++ b/messages/protos/messages.proto @@ -13,7 +13,6 @@ message PositionMessage { } Direction direction = 3; bool moving = 4; - uint32 outlineColor = 5; } message PointMessage { @@ -48,8 +47,12 @@ message PingMessage { } message SetPlayerDetailsMessage { - string name = 1; - repeated string characterLayers = 2; + //string name = 1; + //repeated string characterLayers = 2; + + // TODO: switch to google.protobuf.Int32Value when we migrate to ts-proto + int32 outlineColor = 3; + bool removeOutlineColor = 4; } message UserMovesMessage { @@ -151,6 +154,7 @@ message SubMessage { EmoteEventMessage emoteEventMessage = 7; VariableMessage variableMessage = 8; ErrorMessage errorMessage = 9; + PlayerDetailsUpdatedMessage playerDetailsUpdatedMessage = 10; } } @@ -333,6 +337,10 @@ message GroupLeftZoneMessage { Zone toZone = 2; } +message PlayerDetailsUpdatedMessage { + int32 userId = 1; + SetPlayerDetailsMessage details = 2; +} message Zone { int32 x = 1; @@ -385,6 +393,7 @@ message SubToPusherMessage { BanUserMessage banUserMessage = 8; EmoteEventMessage emoteEventMessage = 9; ErrorMessage errorMessage = 10; + PlayerDetailsUpdatedMessage playerDetailsUpdatedMessage = 11; } } diff --git a/pusher/src/Model/Zone.ts b/pusher/src/Model/Zone.ts index d5a6058f..e77741aa 100644 --- a/pusher/src/Model/Zone.ts +++ b/pusher/src/Model/Zone.ts @@ -16,6 +16,7 @@ import { EmoteEventMessage, CompanionMessage, ErrorMessage, + PlayerDetailsUpdatedMessage, } from "../Messages/generated/messages_pb"; import { ClientReadableStream } from "grpc"; import { PositionDispatcher } from "_Model/PositionDispatcher"; @@ -32,6 +33,7 @@ export interface ZoneEventListener { onGroupLeaves(groupId: number, listener: ExSocketInterface): void; onEmote(emoteMessage: EmoteEventMessage, listener: ExSocketInterface): void; onError(errorMessage: ErrorMessage, listener: ExSocketInterface): void; + onPlayerDetailsUpdated(playerDetailsUpdatedMessage: PlayerDetailsUpdatedMessage, listener: ExSocketInterface): void; } /*export type EntersCallback = (thing: Movable, listener: User) => void; @@ -219,6 +221,10 @@ export class Zone { } else if (message.hasEmoteeventmessage()) { const emoteEventMessage = message.getEmoteeventmessage() as EmoteEventMessage; this.notifyEmote(emoteEventMessage); + } else if (message.hasPlayerdetailsupdatedmessage()) { + const playerDetailsUpdatedMessage = + message.getPlayerdetailsupdatedmessage() as PlayerDetailsUpdatedMessage; + this.notifyPlayerDetailsUpdated(playerDetailsUpdatedMessage); } else if (message.hasErrormessage()) { const errorMessage = message.getErrormessage() as ErrorMessage; this.notifyError(errorMessage); @@ -308,6 +314,15 @@ export class Zone { } } + private notifyPlayerDetailsUpdated(playerDetailsUpdatedMessage: PlayerDetailsUpdatedMessage) { + for (const listener of this.listeners) { + if (listener.userId === playerDetailsUpdatedMessage.getUserid()) { + continue; + } + this.socketListener.onPlayerDetailsUpdated(playerDetailsUpdatedMessage, listener); + } + } + private notifyError(errorMessage: ErrorMessage) { for (const listener of this.listeners) { this.socketListener.onError(errorMessage, listener); diff --git a/pusher/src/Services/SocketManager.ts b/pusher/src/Services/SocketManager.ts index 703b1cda..5cce5a6e 100644 --- a/pusher/src/Services/SocketManager.ts +++ b/pusher/src/Services/SocketManager.ts @@ -34,6 +34,7 @@ import { VariableMessage, ErrorMessage, WorldFullMessage, + PlayerDetailsUpdatedMessage, } from "../Messages/generated/messages_pb"; import { ProtobufUtils } from "../Model/Websocket/ProtobufUtils"; import { ADMIN_API_URL, JITSI_ISS, JITSI_URL, SECRET_JITSI_KEY } from "../Enum/EnvironmentVariable"; @@ -55,6 +56,7 @@ const debug = Debug("socket"); interface AdminSocketRoomsList { [index: string]: number; } + interface AdminSocketUsersList { [index: string]: boolean; } @@ -276,6 +278,16 @@ export class SocketManager implements ZoneEventListener { emitInBatch(listener, subMessage); } + onPlayerDetailsUpdated( + playerDetailsUpdatedMessage: PlayerDetailsUpdatedMessage, + listener: ExSocketInterface + ): void { + const subMessage = new SubMessage(); + subMessage.setPlayerdetailsupdatedmessage(playerDetailsUpdatedMessage); + + emitInBatch(listener, subMessage); + } + onError(errorMessage: ErrorMessage, listener: ExSocketInterface): void { const subMessage = new SubMessage(); subMessage.setErrormessage(errorMessage); From 35463930a028510a4f8a42391965150806de405f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 23 Dec 2021 10:22:19 +0100 Subject: [PATCH 31/33] Sending color outline on connect --- back/src/Services/SocketManager.ts | 6 ++++ front/src/Connexion/ConnexionModels.ts | 1 + front/src/Connexion/RoomConnection.ts | 1 + front/src/Phaser/Game/GameScene.ts | 7 ++++- front/src/Phaser/Game/PlayerInterface.ts | 1 + messages/protos/messages.proto | 6 +++- pusher/src/Model/Zone.ts | 40 ++++++++++++++++++++++-- 7 files changed, 57 insertions(+), 5 deletions(-) diff --git a/back/src/Services/SocketManager.ts b/back/src/Services/SocketManager.ts index 6d76f3af..ce4ea413 100644 --- a/back/src/Services/SocketManager.ts +++ b/back/src/Services/SocketManager.ts @@ -322,6 +322,12 @@ export class SocketManager { userJoinedZoneMessage.setVisitcardurl(thing.visitCardUrl); } userJoinedZoneMessage.setCompanion(thing.companion); + if (thing.outlineColor === undefined) { + userJoinedZoneMessage.setHasoutline(false); + } else { + userJoinedZoneMessage.setHasoutline(true); + userJoinedZoneMessage.setOutlinecolor(thing.outlineColor); + } const subMessage = new SubToPusherMessage(); subMessage.setUserjoinedzonemessage(userJoinedZoneMessage); diff --git a/front/src/Connexion/ConnexionModels.ts b/front/src/Connexion/ConnexionModels.ts index a2dc68da..6200e0c9 100644 --- a/front/src/Connexion/ConnexionModels.ts +++ b/front/src/Connexion/ConnexionModels.ts @@ -65,6 +65,7 @@ export interface MessageUserJoined { visitCardUrl: string | null; companion: string | null; userUuid: string; + outlineColor: number | undefined; } export interface PositionInterface { diff --git a/front/src/Connexion/RoomConnection.ts b/front/src/Connexion/RoomConnection.ts index 96191b15..9c861293 100644 --- a/front/src/Connexion/RoomConnection.ts +++ b/front/src/Connexion/RoomConnection.ts @@ -423,6 +423,7 @@ export class RoomConnection implements RoomConnection { position: ProtobufClientUtils.toPointInterface(position), companion: companion ? companion.getName() : null, userUuid: message.getUseruuid(), + outlineColor: message.getHasoutline() ? message.getOutlinecolor() : undefined, }; } diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index 99580374..25d691c3 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -683,6 +683,7 @@ export class GameScene extends DirtyScene { visitCardUrl: message.visitCardUrl, companion: message.companion, userUuid: message.userUuid, + outlineColor: message.outlineColor, }; this.addPlayer(userMessage); }); @@ -1703,8 +1704,9 @@ ${escapedMessage} case "PlayerDetailsUpdated": this.doUpdatePlayerDetails(event.details); break; - default: + default: { const tmp: never = event; + } } } // Let's move all users @@ -1778,6 +1780,9 @@ ${escapedMessage} addPlayerData.companion, addPlayerData.companion !== null ? lazyLoadCompanionResource(this.load, addPlayerData.companion) : undefined ); + if (addPlayerData.outlineColor !== undefined) { + player.setOutlineColor(addPlayerData.outlineColor); + } this.MapPlayers.add(player); this.MapPlayersByKey.set(player.userId, player); player.updatePosition(addPlayerData.position); diff --git a/front/src/Phaser/Game/PlayerInterface.ts b/front/src/Phaser/Game/PlayerInterface.ts index 6ab439df..0a3d7543 100644 --- a/front/src/Phaser/Game/PlayerInterface.ts +++ b/front/src/Phaser/Game/PlayerInterface.ts @@ -8,4 +8,5 @@ export interface PlayerInterface { companion: string | null; userUuid: string; color?: string; + outlineColor?: number; } diff --git a/messages/protos/messages.proto b/messages/protos/messages.proto index c53ec143..76a0373c 100644 --- a/messages/protos/messages.proto +++ b/messages/protos/messages.proto @@ -51,7 +51,7 @@ message SetPlayerDetailsMessage { //repeated string characterLayers = 2; // TODO: switch to google.protobuf.Int32Value when we migrate to ts-proto - int32 outlineColor = 3; + uint32 outlineColor = 3; bool removeOutlineColor = 4; } @@ -181,6 +181,8 @@ message UserJoinedMessage { CompanionMessage companion = 5; string visitCardUrl = 6; string userUuid = 7; + uint32 outlineColor = 8; + bool hasOutline = 9; } message UserLeftMessage { @@ -318,6 +320,8 @@ message UserJoinedZoneMessage { CompanionMessage companion = 6; string visitCardUrl = 7; string userUuid = 8; + uint32 outlineColor = 9; + bool hasOutline = 10; } message UserLeftZoneMessage { diff --git a/pusher/src/Model/Zone.ts b/pusher/src/Model/Zone.ts index e77741aa..2132ff39 100644 --- a/pusher/src/Model/Zone.ts +++ b/pusher/src/Model/Zone.ts @@ -17,6 +17,7 @@ import { CompanionMessage, ErrorMessage, PlayerDetailsUpdatedMessage, + SetPlayerDetailsMessage, } from "../Messages/generated/messages_pb"; import { ClientReadableStream } from "grpc"; import { PositionDispatcher } from "_Model/PositionDispatcher"; @@ -48,7 +49,8 @@ export class UserDescriptor { private characterLayers: CharacterLayerMessage[], private position: PositionMessage, private visitCardUrl: string | null, - private companion?: CompanionMessage + private companion?: CompanionMessage, + private outlineColor?: number ) { if (!Number.isInteger(this.userId)) { throw new Error("UserDescriptor.userId is not an integer: " + this.userId); @@ -67,7 +69,8 @@ export class UserDescriptor { message.getCharacterlayersList(), position, message.getVisitcardurl(), - message.getCompanion() + message.getCompanion(), + message.getHasoutline() ? message.getOutlinecolor() : undefined ); } @@ -79,6 +82,14 @@ export class UserDescriptor { this.position = position; } + public updateDetails(playerDetails: SetPlayerDetailsMessage) { + if (playerDetails.getRemoveoutlinecolor()) { + this.outlineColor = undefined; + } else { + this.outlineColor = playerDetails.getOutlinecolor(); + } + } + public toUserJoinedMessage(): UserJoinedMessage { const userJoinedMessage = new UserJoinedMessage(); @@ -91,6 +102,12 @@ export class UserDescriptor { } userJoinedMessage.setCompanion(this.companion); userJoinedMessage.setUseruuid(this.userUuid); + if (this.outlineColor !== undefined) { + userJoinedMessage.setOutlinecolor(this.outlineColor); + userJoinedMessage.setHasoutline(true); + } else { + userJoinedMessage.setHasoutline(false); + } return userJoinedMessage; } @@ -211,7 +228,7 @@ export class Zone { const userDescriptor = this.users.get(userId); if (userDescriptor === undefined) { - console.error('Unexpected move message received for user "' + userId + '"'); + console.error('Unexpected move message received for unknown user "' + userId + '"'); return; } @@ -224,6 +241,23 @@ export class Zone { } else if (message.hasPlayerdetailsupdatedmessage()) { const playerDetailsUpdatedMessage = message.getPlayerdetailsupdatedmessage() as PlayerDetailsUpdatedMessage; + + const userId = playerDetailsUpdatedMessage.getUserid(); + const userDescriptor = this.users.get(userId); + + if (userDescriptor === undefined) { + console.error('Unexpected details message received for unknown user "' + userId + '"'); + return; + } + + const details = playerDetailsUpdatedMessage.getDetails(); + if (details === undefined) { + console.error('Unexpected details message without details received for user "' + userId + '"'); + return; + } + + userDescriptor.updateDetails(details); + this.notifyPlayerDetailsUpdated(playerDetailsUpdatedMessage); } else if (message.hasErrormessage()) { const errorMessage = message.getErrormessage() as ErrorMessage; From e34c49fd499b044d381533dd4c31fdd708bfc50a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 23 Dec 2021 10:44:46 +0100 Subject: [PATCH 32/33] Fixing tests --- back/tests/GameRoomTest.ts | 9 ++++++--- back/tests/PositionNotifierTest.ts | 6 ++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/back/tests/GameRoomTest.ts b/back/tests/GameRoomTest.ts index 7540ad94..d4e83daf 100644 --- a/back/tests/GameRoomTest.ts +++ b/back/tests/GameRoomTest.ts @@ -51,7 +51,8 @@ describe("GameRoom", () => { () => {}, () => {}, () => {}, - emote + emote, + () => {} ); const user1 = world.join(createMockUserSocket(), createJoinRoomMessage("1", 100, 100)); @@ -86,7 +87,8 @@ describe("GameRoom", () => { () => {}, () => {}, () => {}, - emote + emote, + () => {} ); const user1 = world.join(createMockUserSocket(), createJoinRoomMessage("1", 100, 100)); @@ -125,7 +127,8 @@ describe("GameRoom", () => { () => {}, () => {}, () => {}, - emote + emote, + () => {} ); const user1 = world.join(createMockUserSocket(), createJoinRoomMessage("1", 100, 100)); diff --git a/back/tests/PositionNotifierTest.ts b/back/tests/PositionNotifierTest.ts index 1aaf2e13..c081f1b4 100644 --- a/back/tests/PositionNotifierTest.ts +++ b/back/tests/PositionNotifierTest.ts @@ -19,7 +19,8 @@ describe("PositionNotifier", () => { moveTriggered = true; }, (thing: Movable) => { leaveTriggered = true; - }, () => {}); + }, () => {}, + () => {}); const user1 = new User(1, 'test', '10.0.0.2', { x: 500, @@ -94,7 +95,8 @@ describe("PositionNotifier", () => { moveTriggered = true; }, (thing: Movable) => { leaveTriggered = true; - }, () => {}); + }, () => {}, + () => {}); const user1 = new User(1, 'test', '10.0.0.2', { x: 500, From a82a5caec8edc58c6f644f081e411f37c6853c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Thu, 23 Dec 2021 11:46:39 +0100 Subject: [PATCH 33/33] Upgrading testcafe to 1.18.0 --- tests/README.md | 4 +- tests/package-lock.json | 565 +++++++++++++++++++++++++++++++++++++--- tests/package.json | 2 +- 3 files changed, 538 insertions(+), 33 deletions(-) diff --git a/tests/README.md b/tests/README.md index ce9aa4b1..a43c60d6 100644 --- a/tests/README.md +++ b/tests/README.md @@ -6,9 +6,11 @@ To run them locally: ```console $ npm install -$ npm test +$ ADMIN_API_TOKEN=123 npm test ``` +You'll need to adapt the `ADMIN_API_TOKEN` to the value you use in your `.env` file. + Alternatively, you can use docker-compose to run the tests: ```console diff --git a/tests/package-lock.json b/tests/package-lock.json index 65b53bf4..7c012c1f 100644 --- a/tests/package-lock.json +++ b/tests/package-lock.json @@ -11,7 +11,7 @@ }, "devDependencies": { "dockerode": "^3.3.1", - "testcafe": "^1.17.1" + "testcafe": "^1.18.0" } }, "node_modules/@babel/code-frame": { @@ -2457,6 +2457,12 @@ "ieee754": "^1.1.13" } }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=", + "dev": true + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -2955,6 +2961,15 @@ "tar-stream": "^2.0.0" } }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, "node_modules/electron-to-chromium": { "version": "1.3.906", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.906.tgz", @@ -3028,6 +3043,12 @@ "stackframe": "^0.3.1" } }, + "node_modules/es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "dev": true + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -3177,12 +3198,32 @@ } } }, + "node_modules/fp-ts": { + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-2.11.5.tgz", + "integrity": "sha512-OqlwJq1BdpB83BZXTqI+dNcA6uYk6qk4u9Cgnt64Y+XS7dwdbp/mobx8S2KXf2AXH+scNmA/UVK3SEFHR3vHZA==", + "dev": true + }, "node_modules/fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", "dev": true }, + "node_modules/fs-extra": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", + "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3502,6 +3543,27 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "node_modules/io-ts": { + "version": "2.2.16", + "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-2.2.16.tgz", + "integrity": "sha512-y5TTSa6VP6le0hhmIyN0dqEXkrZeJLeC5KApJq6VLci3UEKF80lZ+KuoUs02RhBxNWlrqSNxzfI7otLX1Euv8Q==", + "dev": true, + "peerDependencies": { + "fp-ts": "^2.5.0" + } + }, + "node_modules/io-ts-types": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/io-ts-types/-/io-ts-types-0.5.16.tgz", + "integrity": "sha512-h9noYVfY9rlbmKI902SJdnV/06jgiT2chxG6lYDxaYNp88HscPi+SBCtmcU+m0E7WT5QSwt7sIMj93+qu0FEwQ==", + "dev": true, + "peerDependencies": { + "fp-ts": "^2.0.0", + "io-ts": "^2.0.0", + "monocle-ts": "^2.0.0", + "newtype-ts": "^0.3.2" + } + }, "node_modules/ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", @@ -3676,6 +3738,16 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "node_modules/isomorphic-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", + "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", + "dev": true, + "dependencies": { + "node-fetch": "^2.6.1", + "whatwg-fetch": "^3.4.1" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3709,6 +3781,61 @@ "node": ">=6" } }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/jsonwebtoken": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "dev": true, + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=4", + "npm": ">=1.4.28" + } + }, + "node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dev": true, + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dev": true, + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, "node_modules/linux-platform-info": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/linux-platform-info/-/linux-platform-info-0.0.3.tgz", @@ -3743,6 +3870,48 @@ "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", "dev": true }, + "node_modules/lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=", + "dev": true + }, + "node_modules/lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=", + "dev": true + }, + "node_modules/lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=", + "dev": true + }, + "node_modules/lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=", + "dev": true + }, + "node_modules/lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, + "node_modules/lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", + "dev": true + }, + "node_modules/lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=", + "dev": true + }, "node_modules/log-update-async-hook": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/log-update-async-hook/-/log-update-async-hook-2.0.2.tgz", @@ -3921,6 +4090,15 @@ "integrity": "sha512-KhKZRH21/+ihNRWrmdNFOyBptFi7nAWZFeFsRRpXkzgk/Yublb4fxyP0jU6EY1VDxUL/VUPdCmm/wAnpbfXdfw==", "dev": true }, + "node_modules/monocle-ts": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/monocle-ts/-/monocle-ts-2.3.11.tgz", + "integrity": "sha512-YJQdpDeKU0NNAecDjFgDDnDoivmf2nXsJZTRQdKh5jsPKG2lT/15dFnSuUcQoKB/VZN1z7jQ0B0bffbRFUtLmg==", + "dev": true, + "peerDependencies": { + "fp-ts": "^2.5.0" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -3952,6 +4130,28 @@ "integrity": "sha512-4ug4BsuHxiVHoRUe1ud6rUFT3WUMmjXt1W0quL0CviZQANdan7D8kqN5/maw53hmAApY/jfzMRkC57BNNs60ZQ==", "dev": true }, + "node_modules/newtype-ts": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/newtype-ts/-/newtype-ts-0.3.4.tgz", + "integrity": "sha512-lFJnWAt0oXX1j1ErNy9RU5+FPNtVyzugHW2MchaaMiOeeS9LEmqAAOqyHPFQ0Uw895jStSYGSCslrByzYxFJYQ==", + "dev": true, + "peerDependencies": { + "fp-ts": "^2.0.0", + "monocle-ts": "^2.0.0" + } + }, + "node_modules/node-fetch": { + "version": "2.6.6", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", + "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + } + }, "node_modules/node-releases": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", @@ -4774,9 +4974,9 @@ } }, "node_modules/testcafe": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/testcafe/-/testcafe-1.17.1.tgz", - "integrity": "sha512-G+IqL28PE9wzNKcLjLCjX3z3/KXpzNs0FNC63Y7dXcXx23qlx+yz+Abyh91CIzeiwtXDZX+xMXDYYLtPQLfhlQ==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/testcafe/-/testcafe-1.18.0.tgz", + "integrity": "sha512-yM/d62TaJPzFri4LrCSvKlpDaBra3Ag4yvNyLKh0l0MJmctFz6jZpdWBkOPzuCQyQXE9rx3DWn8V0AFBZApCjA==", "dev": true, "dependencies": { "@babel/core": "^7.12.1", @@ -4854,14 +5054,15 @@ "semver": "^5.6.0", "source-map-support": "^0.5.16", "strip-bom": "^2.0.0", - "testcafe-browser-tools": "2.0.16", - "testcafe-hammerhead": "24.5.7", + "testcafe-browser-tools": "2.0.19", + "testcafe-hammerhead": "24.5.9", "testcafe-legacy-api": "5.1.2", + "testcafe-reporter-dashboard": "0.2.5", "testcafe-reporter-json": "^2.1.0", "testcafe-reporter-list": "^2.1.0", "testcafe-reporter-minimal": "^2.1.0", "testcafe-reporter-spec": "^2.1.1", - "testcafe-reporter-xunit": "^2.1.0", + "testcafe-reporter-xunit": "^2.2.1", "time-limit-promise": "^1.0.2", "tmp": "0.0.28", "tree-kill": "^1.2.2", @@ -4876,9 +5077,9 @@ } }, "node_modules/testcafe-browser-tools": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/testcafe-browser-tools/-/testcafe-browser-tools-2.0.16.tgz", - "integrity": "sha512-JljbS0FboABksIMEH1L7P4ZdI82AQ8saWb/7WsxkDCOtDuHID5ZSEb/w9tqLN1+4BQaCgS5veN3lWUnfb0saEA==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/testcafe-browser-tools/-/testcafe-browser-tools-2.0.19.tgz", + "integrity": "sha512-MjFiT5EMUcNstAfAXM64mRdQrxjV5lEkDLFirCh/kjJ/TQ/XwdgIt0jG/VWU/CplVuqHTtw6JL4OIy7+O4iK1g==", "dev": true, "dependencies": { "array-find": "^1.0.0", @@ -4886,6 +5087,7 @@ "dedent": "^0.7.0", "del": "^5.1.0", "execa": "^3.3.0", + "fs-extra": "^10.0.0", "graceful-fs": "^4.1.11", "linux-platform-info": "^0.0.3", "lodash": "^4.17.15", @@ -5040,9 +5242,9 @@ } }, "node_modules/testcafe-hammerhead": { - "version": "24.5.7", - "resolved": "https://registry.npmjs.org/testcafe-hammerhead/-/testcafe-hammerhead-24.5.7.tgz", - "integrity": "sha512-4pY6GQQaCZAlOolWB2vaYZ/MIpgtmOrZeh4BVbENkbh6DDiPeOxvC0K6yZS5JfINRau5S9mzuNkm2FS7G0urSA==", + "version": "24.5.9", + "resolved": "https://registry.npmjs.org/testcafe-hammerhead/-/testcafe-hammerhead-24.5.9.tgz", + "integrity": "sha512-MESj4PhjiYAjgxmQMvszUbKLHgcZFhXNGIJY4G5Jrdn9/gf3ah3xfWQAdbQ86TVXy0z4ZNNQdU3TATdIBfIsQw==", "dev": true, "dependencies": { "acorn-hammerhead": "0.5.0", @@ -5168,6 +5370,24 @@ "integrity": "sha1-DE/EHBAAxea5PUiwP4CDg3g06fY=", "dev": true }, + "node_modules/testcafe-reporter-dashboard": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/testcafe-reporter-dashboard/-/testcafe-reporter-dashboard-0.2.5.tgz", + "integrity": "sha512-vbK8XrpbcFAEgnfWJOfqAnlmj/wt5pXXER/OSYI9RzSw+uwu8voLWbKcUAcnjltk0AM4c0wvI0DhjKmops2y2Q==", + "dev": true, + "dependencies": { + "es6-promise": "^4.2.8", + "fp-ts": "^2.9.5", + "io-ts": "^2.2.14", + "io-ts-types": "^0.5.15", + "isomorphic-fetch": "^3.0.0", + "jsonwebtoken": "^8.5.1", + "monocle-ts": "^2.3.5", + "newtype-ts": "^0.3.4", + "semver": "^5.6.0", + "uuid": "3.3.3" + } + }, "node_modules/testcafe-reporter-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/testcafe-reporter-json/-/testcafe-reporter-json-2.2.0.tgz", @@ -5196,9 +5416,9 @@ "dev": true }, "node_modules/testcafe-reporter-xunit": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/testcafe-reporter-xunit/-/testcafe-reporter-xunit-2.1.0.tgz", - "integrity": "sha1-5tZsVyzhWvJmcGrw/WELKoQd1EM=", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/testcafe-reporter-xunit/-/testcafe-reporter-xunit-2.2.1.tgz", + "integrity": "sha512-ge1msi8RyNVyK0QrsmC79zedV7jHasKpBPeOUZd/ORpbYLeYDnprjIeOuIukw0knnTieeYsOK29/ZD+UI7/tdw==", "dev": true }, "node_modules/time-limit-promise": { @@ -5277,6 +5497,12 @@ "node": ">=0.8" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "dev": true + }, "node_modules/tree-kill": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", @@ -5375,6 +5601,15 @@ "node": ">=4" } }, + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true, + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/unquote": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", @@ -5400,6 +5635,16 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, + "node_modules/uuid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", + "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, "node_modules/webauth": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/webauth/-/webauth-1.1.0.tgz", @@ -5409,6 +5654,28 @@ "node": ">= 0.10.0" } }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "dev": true + }, + "node_modules/whatwg-fetch": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", + "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==", + "dev": true + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -7240,6 +7507,12 @@ "ieee754": "^1.1.13" } }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=", + "dev": true + }, "buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -7646,6 +7919,15 @@ } } }, + "ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, "electron-to-chromium": { "version": "1.3.906", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.906.tgz", @@ -7709,6 +7991,12 @@ "stackframe": "^0.3.1" } }, + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "dev": true + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -7816,12 +8104,29 @@ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.5.tgz", "integrity": "sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA==" }, + "fp-ts": { + "version": "2.11.5", + "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-2.11.5.tgz", + "integrity": "sha512-OqlwJq1BdpB83BZXTqI+dNcA6uYk6qk4u9Cgnt64Y+XS7dwdbp/mobx8S2KXf2AXH+scNmA/UVK3SEFHR3vHZA==", + "dev": true + }, "fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", "dev": true }, + "fs-extra": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", + "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -8059,6 +8364,20 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "io-ts": { + "version": "2.2.16", + "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-2.2.16.tgz", + "integrity": "sha512-y5TTSa6VP6le0hhmIyN0dqEXkrZeJLeC5KApJq6VLci3UEKF80lZ+KuoUs02RhBxNWlrqSNxzfI7otLX1Euv8Q==", + "dev": true, + "requires": {} + }, + "io-ts-types": { + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/io-ts-types/-/io-ts-types-0.5.16.tgz", + "integrity": "sha512-h9noYVfY9rlbmKI902SJdnV/06jgiT2chxG6lYDxaYNp88HscPi+SBCtmcU+m0E7WT5QSwt7sIMj93+qu0FEwQ==", + "dev": true, + "requires": {} + }, "ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", @@ -8185,6 +8504,16 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, + "isomorphic-fetch": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-3.0.0.tgz", + "integrity": "sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==", + "dev": true, + "requires": { + "node-fetch": "^2.6.1", + "whatwg-fetch": "^3.4.1" + } + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -8206,6 +8535,55 @@ "minimist": "^1.2.5" } }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "jsonwebtoken": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "dev": true, + "requires": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^5.6.0" + } + }, + "jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dev": true, + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dev": true, + "requires": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, "linux-platform-info": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/linux-platform-info/-/linux-platform-info-0.0.3.tgz", @@ -8237,6 +8615,48 @@ "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", "dev": true }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=", + "dev": true + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=", + "dev": true + }, + "lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=", + "dev": true + }, + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=", + "dev": true + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", + "dev": true + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=", + "dev": true + }, "log-update-async-hook": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/log-update-async-hook/-/log-update-async-hook-2.0.2.tgz", @@ -8380,6 +8800,13 @@ "integrity": "sha512-KhKZRH21/+ihNRWrmdNFOyBptFi7nAWZFeFsRRpXkzgk/Yublb4fxyP0jU6EY1VDxUL/VUPdCmm/wAnpbfXdfw==", "dev": true }, + "monocle-ts": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/monocle-ts/-/monocle-ts-2.3.11.tgz", + "integrity": "sha512-YJQdpDeKU0NNAecDjFgDDnDoivmf2nXsJZTRQdKh5jsPKG2lT/15dFnSuUcQoKB/VZN1z7jQ0B0bffbRFUtLmg==", + "dev": true, + "requires": {} + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -8405,6 +8832,22 @@ "integrity": "sha512-4ug4BsuHxiVHoRUe1ud6rUFT3WUMmjXt1W0quL0CviZQANdan7D8kqN5/maw53hmAApY/jfzMRkC57BNNs60ZQ==", "dev": true }, + "newtype-ts": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/newtype-ts/-/newtype-ts-0.3.4.tgz", + "integrity": "sha512-lFJnWAt0oXX1j1ErNy9RU5+FPNtVyzugHW2MchaaMiOeeS9LEmqAAOqyHPFQ0Uw895jStSYGSCslrByzYxFJYQ==", + "dev": true, + "requires": {} + }, + "node-fetch": { + "version": "2.6.6", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz", + "integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==", + "dev": true, + "requires": { + "whatwg-url": "^5.0.0" + } + }, "node-releases": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.1.tgz", @@ -9037,9 +9480,9 @@ } }, "testcafe": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/testcafe/-/testcafe-1.17.1.tgz", - "integrity": "sha512-G+IqL28PE9wzNKcLjLCjX3z3/KXpzNs0FNC63Y7dXcXx23qlx+yz+Abyh91CIzeiwtXDZX+xMXDYYLtPQLfhlQ==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/testcafe/-/testcafe-1.18.0.tgz", + "integrity": "sha512-yM/d62TaJPzFri4LrCSvKlpDaBra3Ag4yvNyLKh0l0MJmctFz6jZpdWBkOPzuCQyQXE9rx3DWn8V0AFBZApCjA==", "dev": true, "requires": { "@babel/core": "^7.12.1", @@ -9117,14 +9560,15 @@ "semver": "^5.6.0", "source-map-support": "^0.5.16", "strip-bom": "^2.0.0", - "testcafe-browser-tools": "2.0.16", - "testcafe-hammerhead": "24.5.7", + "testcafe-browser-tools": "2.0.19", + "testcafe-hammerhead": "24.5.9", "testcafe-legacy-api": "5.1.2", + "testcafe-reporter-dashboard": "0.2.5", "testcafe-reporter-json": "^2.1.0", "testcafe-reporter-list": "^2.1.0", "testcafe-reporter-minimal": "^2.1.0", "testcafe-reporter-spec": "^2.1.1", - "testcafe-reporter-xunit": "^2.1.0", + "testcafe-reporter-xunit": "^2.2.1", "time-limit-promise": "^1.0.2", "tmp": "0.0.28", "tree-kill": "^1.2.2", @@ -9133,9 +9577,9 @@ } }, "testcafe-browser-tools": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/testcafe-browser-tools/-/testcafe-browser-tools-2.0.16.tgz", - "integrity": "sha512-JljbS0FboABksIMEH1L7P4ZdI82AQ8saWb/7WsxkDCOtDuHID5ZSEb/w9tqLN1+4BQaCgS5veN3lWUnfb0saEA==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/testcafe-browser-tools/-/testcafe-browser-tools-2.0.19.tgz", + "integrity": "sha512-MjFiT5EMUcNstAfAXM64mRdQrxjV5lEkDLFirCh/kjJ/TQ/XwdgIt0jG/VWU/CplVuqHTtw6JL4OIy7+O4iK1g==", "dev": true, "requires": { "array-find": "^1.0.0", @@ -9143,6 +9587,7 @@ "dedent": "^0.7.0", "del": "^5.1.0", "execa": "^3.3.0", + "fs-extra": "^10.0.0", "graceful-fs": "^4.1.11", "linux-platform-info": "^0.0.3", "lodash": "^4.17.15", @@ -9266,9 +9711,9 @@ } }, "testcafe-hammerhead": { - "version": "24.5.7", - "resolved": "https://registry.npmjs.org/testcafe-hammerhead/-/testcafe-hammerhead-24.5.7.tgz", - "integrity": "sha512-4pY6GQQaCZAlOolWB2vaYZ/MIpgtmOrZeh4BVbENkbh6DDiPeOxvC0K6yZS5JfINRau5S9mzuNkm2FS7G0urSA==", + "version": "24.5.9", + "resolved": "https://registry.npmjs.org/testcafe-hammerhead/-/testcafe-hammerhead-24.5.9.tgz", + "integrity": "sha512-MESj4PhjiYAjgxmQMvszUbKLHgcZFhXNGIJY4G5Jrdn9/gf3ah3xfWQAdbQ86TVXy0z4ZNNQdU3TATdIBfIsQw==", "dev": true, "requires": { "acorn-hammerhead": "0.5.0", @@ -9378,6 +9823,24 @@ } } }, + "testcafe-reporter-dashboard": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/testcafe-reporter-dashboard/-/testcafe-reporter-dashboard-0.2.5.tgz", + "integrity": "sha512-vbK8XrpbcFAEgnfWJOfqAnlmj/wt5pXXER/OSYI9RzSw+uwu8voLWbKcUAcnjltk0AM4c0wvI0DhjKmops2y2Q==", + "dev": true, + "requires": { + "es6-promise": "^4.2.8", + "fp-ts": "^2.9.5", + "io-ts": "^2.2.14", + "io-ts-types": "^0.5.15", + "isomorphic-fetch": "^3.0.0", + "jsonwebtoken": "^8.5.1", + "monocle-ts": "^2.3.5", + "newtype-ts": "^0.3.4", + "semver": "^5.6.0", + "uuid": "3.3.3" + } + }, "testcafe-reporter-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/testcafe-reporter-json/-/testcafe-reporter-json-2.2.0.tgz", @@ -9403,9 +9866,9 @@ "dev": true }, "testcafe-reporter-xunit": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/testcafe-reporter-xunit/-/testcafe-reporter-xunit-2.1.0.tgz", - "integrity": "sha1-5tZsVyzhWvJmcGrw/WELKoQd1EM=", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/testcafe-reporter-xunit/-/testcafe-reporter-xunit-2.2.1.tgz", + "integrity": "sha512-ge1msi8RyNVyK0QrsmC79zedV7jHasKpBPeOUZd/ORpbYLeYDnprjIeOuIukw0knnTieeYsOK29/ZD+UI7/tdw==", "dev": true }, "time-limit-promise": { @@ -9468,6 +9931,12 @@ "punycode": "^1.4.1" } }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "dev": true + }, "tree-kill": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", @@ -9538,6 +10007,12 @@ "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", "dev": true }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "dev": true + }, "unquote": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", @@ -9562,12 +10037,40 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, + "uuid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", + "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==", + "dev": true + }, "webauth": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/webauth/-/webauth-1.1.0.tgz", "integrity": "sha1-ZHBPa4AmmGYFvDymKZUubib90QA=", "dev": true }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "dev": true + }, + "whatwg-fetch": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz", + "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==", + "dev": true + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "dev": true, + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/tests/package.json b/tests/package.json index 0db57f26..cf7087a4 100644 --- a/tests/package.json +++ b/tests/package.json @@ -1,7 +1,7 @@ { "devDependencies": { "dockerode": "^3.3.1", - "testcafe": "^1.17.1" + "testcafe": "^1.18.0" }, "scripts": { "test": "testcafe"