socket io RAW testing

This commit is contained in:
NigeParis 2025-11-20 16:29:50 +01:00 committed by Maix0
parent b07040b61b
commit ffa7c305f1
5 changed files with 328 additions and 26 deletions

View file

@ -18,6 +18,6 @@
"devDependencies": {
"@redocly/cli": "^2.11.1",
"husky": "^9.1.7",
"vite": "^7.2.2"
"vite": "^7.2.4"
}
}

317
pnpm-lock.yaml generated
View file

@ -15,8 +15,8 @@ importers:
specifier: ^9.1.7
version: 9.1.7
vite:
specifier: ^7.2.2
version: 7.2.2(@types/node@24.10.1)(yaml@2.8.1)
specifier: ^7.2.4
version: 7.2.4(@types/node@24.10.1)(yaml@2.8.1)
src/@shared:
dependencies:
@ -105,7 +105,7 @@ importers:
version: 22.19.1
rollup-plugin-node-externals:
specifier: ^8.1.2
version: 8.1.2(rollup@4.53.2)
version: 8.1.2(rollup@4.53.3)
vite:
specifier: ^7.2.2
version: 7.2.2(@types/node@22.19.1)(yaml@2.8.1)
@ -145,6 +145,9 @@ importers:
fastify-plugin:
specifier: ^5.1.0
version: 5.1.0
fastify-socket.io:
specifier: ^5.1.0
version: 5.1.0(fastify@5.6.2)(socket.io@4.8.1)
socket.io:
specifier: ^4.8.1
version: 4.8.1
@ -154,7 +157,7 @@ importers:
version: 22.19.1
rollup-plugin-node-externals:
specifier: ^8.1.2
version: 8.1.2(rollup@4.53.2)
version: 8.1.2(rollup@4.53.3)
vite:
specifier: ^7.2.2
version: 7.2.2(@types/node@22.19.1)(yaml@2.8.1)
@ -200,7 +203,7 @@ importers:
version: 22.19.1
rollup-plugin-node-externals:
specifier: ^8.1.2
version: 8.1.2(rollup@4.53.2)
version: 8.1.2(rollup@4.53.3)
vite:
specifier: ^7.2.2
version: 7.2.2(@types/node@22.19.1)(yaml@2.8.1)
@ -243,7 +246,7 @@ importers:
version: 22.19.1
rollup-plugin-node-externals:
specifier: ^8.1.2
version: 8.1.2(rollup@4.53.2)
version: 8.1.2(rollup@4.53.3)
vite:
specifier: ^7.2.2
version: 7.2.2(@types/node@22.19.1)(yaml@2.8.1)
@ -820,111 +823,221 @@ packages:
cpu: [arm]
os: [android]
'@rollup/rollup-android-arm-eabi@4.53.3':
resolution: {integrity: sha512-mRSi+4cBjrRLoaal2PnqH82Wqyb+d3HsPUN/W+WslCXsZsyHa9ZeQQX/pQsZaVIWDkPcpV6jJ+3KLbTbgnwv8w==}
cpu: [arm]
os: [android]
'@rollup/rollup-android-arm64@4.53.2':
resolution: {integrity: sha512-k8FontTxIE7b0/OGKeSN5B6j25EuppBcWM33Z19JoVT7UTXFSo3D9CdU39wGTeb29NO3XxpMNauh09B+Ibw+9g==}
cpu: [arm64]
os: [android]
'@rollup/rollup-android-arm64@4.53.3':
resolution: {integrity: sha512-CbDGaMpdE9sh7sCmTrTUyllhrg65t6SwhjlMJsLr+J8YjFuPmCEjbBSx4Z/e4SmDyH3aB5hGaJUP2ltV/vcs4w==}
cpu: [arm64]
os: [android]
'@rollup/rollup-darwin-arm64@4.53.2':
resolution: {integrity: sha512-A6s4gJpomNBtJ2yioj8bflM2oogDwzUiMl2yNJ2v9E7++sHrSrsQ29fOfn5DM/iCzpWcebNYEdXpaK4tr2RhfQ==}
cpu: [arm64]
os: [darwin]
'@rollup/rollup-darwin-arm64@4.53.3':
resolution: {integrity: sha512-Nr7SlQeqIBpOV6BHHGZgYBuSdanCXuw09hon14MGOLGmXAFYjx1wNvquVPmpZnl0tLjg25dEdr4IQ6GgyToCUA==}
cpu: [arm64]
os: [darwin]
'@rollup/rollup-darwin-x64@4.53.2':
resolution: {integrity: sha512-e6XqVmXlHrBlG56obu9gDRPW3O3hLxpwHpLsBJvuI8qqnsrtSZ9ERoWUXtPOkY8c78WghyPHZdmPhHLWNdAGEw==}
cpu: [x64]
os: [darwin]
'@rollup/rollup-darwin-x64@4.53.3':
resolution: {integrity: sha512-DZ8N4CSNfl965CmPktJ8oBnfYr3F8dTTNBQkRlffnUarJ2ohudQD17sZBa097J8xhQ26AwhHJ5mvUyQW8ddTsQ==}
cpu: [x64]
os: [darwin]
'@rollup/rollup-freebsd-arm64@4.53.2':
resolution: {integrity: sha512-v0E9lJW8VsrwPux5Qe5CwmH/CF/2mQs6xU1MF3nmUxmZUCHazCjLgYvToOk+YuuUqLQBio1qkkREhxhc656ViA==}
cpu: [arm64]
os: [freebsd]
'@rollup/rollup-freebsd-arm64@4.53.3':
resolution: {integrity: sha512-yMTrCrK92aGyi7GuDNtGn2sNW+Gdb4vErx4t3Gv/Tr+1zRb8ax4z8GWVRfr3Jw8zJWvpGHNpss3vVlbF58DZ4w==}
cpu: [arm64]
os: [freebsd]
'@rollup/rollup-freebsd-x64@4.53.2':
resolution: {integrity: sha512-ClAmAPx3ZCHtp6ysl4XEhWU69GUB1D+s7G9YjHGhIGCSrsg00nEGRRZHmINYxkdoJehde8VIsDC5t9C0gb6yqA==}
cpu: [x64]
os: [freebsd]
'@rollup/rollup-freebsd-x64@4.53.3':
resolution: {integrity: sha512-lMfF8X7QhdQzseM6XaX0vbno2m3hlyZFhwcndRMw8fbAGUGL3WFMBdK0hbUBIUYcEcMhVLr1SIamDeuLBnXS+Q==}
cpu: [x64]
os: [freebsd]
'@rollup/rollup-linux-arm-gnueabihf@4.53.2':
resolution: {integrity: sha512-EPlb95nUsz6Dd9Qy13fI5kUPXNSljaG9FiJ4YUGU1O/Q77i5DYFW5KR8g1OzTcdZUqQQ1KdDqsTohdFVwCwjqg==}
cpu: [arm]
os: [linux]
'@rollup/rollup-linux-arm-gnueabihf@4.53.3':
resolution: {integrity: sha512-k9oD15soC/Ln6d2Wv/JOFPzZXIAIFLp6B+i14KhxAfnq76ajt0EhYc5YPeX6W1xJkAdItcVT+JhKl1QZh44/qw==}
cpu: [arm]
os: [linux]
'@rollup/rollup-linux-arm-musleabihf@4.53.2':
resolution: {integrity: sha512-BOmnVW+khAUX+YZvNfa0tGTEMVVEerOxN0pDk2E6N6DsEIa2Ctj48FOMfNDdrwinocKaC7YXUZ1pHlKpnkja/Q==}
cpu: [arm]
os: [linux]
'@rollup/rollup-linux-arm-musleabihf@4.53.3':
resolution: {integrity: sha512-vTNlKq+N6CK/8UktsrFuc+/7NlEYVxgaEgRXVUVK258Z5ymho29skzW1sutgYjqNnquGwVUObAaxae8rZ6YMhg==}
cpu: [arm]
os: [linux]
'@rollup/rollup-linux-arm64-gnu@4.53.2':
resolution: {integrity: sha512-Xt2byDZ+6OVNuREgBXr4+CZDJtrVso5woFtpKdGPhpTPHcNG7D8YXeQzpNbFRxzTVqJf7kvPMCub/pcGUWgBjA==}
cpu: [arm64]
os: [linux]
'@rollup/rollup-linux-arm64-gnu@4.53.3':
resolution: {integrity: sha512-RGrFLWgMhSxRs/EWJMIFM1O5Mzuz3Xy3/mnxJp/5cVhZ2XoCAxJnmNsEyeMJtpK+wu0FJFWz+QF4mjCA7AUQ3w==}
cpu: [arm64]
os: [linux]
'@rollup/rollup-linux-arm64-musl@4.53.2':
resolution: {integrity: sha512-+LdZSldy/I9N8+klim/Y1HsKbJ3BbInHav5qE9Iy77dtHC/pibw1SR/fXlWyAk0ThnpRKoODwnAuSjqxFRDHUQ==}
cpu: [arm64]
os: [linux]
'@rollup/rollup-linux-arm64-musl@4.53.3':
resolution: {integrity: sha512-kASyvfBEWYPEwe0Qv4nfu6pNkITLTb32p4yTgzFCocHnJLAHs+9LjUu9ONIhvfT/5lv4YS5muBHyuV84epBo/A==}
cpu: [arm64]
os: [linux]
'@rollup/rollup-linux-loong64-gnu@4.53.2':
resolution: {integrity: sha512-8ms8sjmyc1jWJS6WdNSA23rEfdjWB30LH8Wqj0Cqvv7qSHnvw6kgMMXRdop6hkmGPlyYBdRPkjJnj3KCUHV/uQ==}
cpu: [loong64]
os: [linux]
'@rollup/rollup-linux-loong64-gnu@4.53.3':
resolution: {integrity: sha512-JiuKcp2teLJwQ7vkJ95EwESWkNRFJD7TQgYmCnrPtlu50b4XvT5MOmurWNrCj3IFdyjBQ5p9vnrX4JM6I8OE7g==}
cpu: [loong64]
os: [linux]
'@rollup/rollup-linux-ppc64-gnu@4.53.2':
resolution: {integrity: sha512-3HRQLUQbpBDMmzoxPJYd3W6vrVHOo2cVW8RUo87Xz0JPJcBLBr5kZ1pGcQAhdZgX9VV7NbGNipah1omKKe23/g==}
cpu: [ppc64]
os: [linux]
'@rollup/rollup-linux-ppc64-gnu@4.53.3':
resolution: {integrity: sha512-EoGSa8nd6d3T7zLuqdojxC20oBfNT8nexBbB/rkxgKj5T5vhpAQKKnD+h3UkoMuTyXkP5jTjK/ccNRmQrPNDuw==}
cpu: [ppc64]
os: [linux]
'@rollup/rollup-linux-riscv64-gnu@4.53.2':
resolution: {integrity: sha512-fMjKi+ojnmIvhk34gZP94vjogXNNUKMEYs+EDaB/5TG/wUkoeua7p7VCHnE6T2Tx+iaghAqQX8teQzcvrYpaQA==}
cpu: [riscv64]
os: [linux]
'@rollup/rollup-linux-riscv64-gnu@4.53.3':
resolution: {integrity: sha512-4s+Wped2IHXHPnAEbIB0YWBv7SDohqxobiiPA1FIWZpX+w9o2i4LezzH/NkFUl8LRci/8udci6cLq+jJQlh+0g==}
cpu: [riscv64]
os: [linux]
'@rollup/rollup-linux-riscv64-musl@4.53.2':
resolution: {integrity: sha512-XuGFGU+VwUUV5kLvoAdi0Wz5Xbh2SrjIxCtZj6Wq8MDp4bflb/+ThZsVxokM7n0pcbkEr2h5/pzqzDYI7cCgLQ==}
cpu: [riscv64]
os: [linux]
'@rollup/rollup-linux-riscv64-musl@4.53.3':
resolution: {integrity: sha512-68k2g7+0vs2u9CxDt5ktXTngsxOQkSEV/xBbwlqYcUrAVh6P9EgMZvFsnHy4SEiUl46Xf0IObWVbMvPrr2gw8A==}
cpu: [riscv64]
os: [linux]
'@rollup/rollup-linux-s390x-gnu@4.53.2':
resolution: {integrity: sha512-w6yjZF0P+NGzWR3AXWX9zc0DNEGdtvykB03uhonSHMRa+oWA6novflo2WaJr6JZakG2ucsyb+rvhrKac6NIy+w==}
cpu: [s390x]
os: [linux]
'@rollup/rollup-linux-s390x-gnu@4.53.3':
resolution: {integrity: sha512-VYsFMpULAz87ZW6BVYw3I6sWesGpsP9OPcyKe8ofdg9LHxSbRMd7zrVrr5xi/3kMZtpWL/wC+UIJWJYVX5uTKg==}
cpu: [s390x]
os: [linux]
'@rollup/rollup-linux-x64-gnu@4.53.2':
resolution: {integrity: sha512-yo8d6tdfdeBArzC7T/PnHd7OypfI9cbuZzPnzLJIyKYFhAQ8SvlkKtKBMbXDxe1h03Rcr7u++nFS7tqXz87Gtw==}
cpu: [x64]
os: [linux]
'@rollup/rollup-linux-x64-gnu@4.53.3':
resolution: {integrity: sha512-3EhFi1FU6YL8HTUJZ51imGJWEX//ajQPfqWLI3BQq4TlvHy4X0MOr5q3D2Zof/ka0d5FNdPwZXm3Yyib/UEd+w==}
cpu: [x64]
os: [linux]
'@rollup/rollup-linux-x64-musl@4.53.2':
resolution: {integrity: sha512-ah59c1YkCxKExPP8O9PwOvs+XRLKwh/mV+3YdKqQ5AMQ0r4M4ZDuOrpWkUaqO7fzAHdINzV9tEVu8vNw48z0lA==}
cpu: [x64]
os: [linux]
'@rollup/rollup-linux-x64-musl@4.53.3':
resolution: {integrity: sha512-eoROhjcc6HbZCJr+tvVT8X4fW3/5g/WkGvvmwz/88sDtSJzO7r/blvoBDgISDiCjDRZmHpwud7h+6Q9JxFwq1Q==}
cpu: [x64]
os: [linux]
'@rollup/rollup-openharmony-arm64@4.53.2':
resolution: {integrity: sha512-4VEd19Wmhr+Zy7hbUsFZ6YXEiP48hE//KPLCSVNY5RMGX2/7HZ+QkN55a3atM1C/BZCGIgqN+xrVgtdak2S9+A==}
cpu: [arm64]
os: [openharmony]
'@rollup/rollup-openharmony-arm64@4.53.3':
resolution: {integrity: sha512-OueLAWgrNSPGAdUdIjSWXw+u/02BRTcnfw9PN41D2vq/JSEPnJnVuBgw18VkN8wcd4fjUs+jFHVM4t9+kBSNLw==}
cpu: [arm64]
os: [openharmony]
'@rollup/rollup-win32-arm64-msvc@4.53.2':
resolution: {integrity: sha512-IlbHFYc/pQCgew/d5fslcy1KEaYVCJ44G8pajugd8VoOEI8ODhtb/j8XMhLpwHCMB3yk2J07ctup10gpw2nyMA==}
cpu: [arm64]
os: [win32]
'@rollup/rollup-win32-arm64-msvc@4.53.3':
resolution: {integrity: sha512-GOFuKpsxR/whszbF/bzydebLiXIHSgsEUp6M0JI8dWvi+fFa1TD6YQa4aSZHtpmh2/uAlj/Dy+nmby3TJ3pkTw==}
cpu: [arm64]
os: [win32]
'@rollup/rollup-win32-ia32-msvc@4.53.2':
resolution: {integrity: sha512-lNlPEGgdUfSzdCWU176ku/dQRnA7W+Gp8d+cWv73jYrb8uT7HTVVxq62DUYxjbaByuf1Yk0RIIAbDzp+CnOTFg==}
cpu: [ia32]
os: [win32]
'@rollup/rollup-win32-ia32-msvc@4.53.3':
resolution: {integrity: sha512-iah+THLcBJdpfZ1TstDFbKNznlzoxa8fmnFYK4V67HvmuNYkVdAywJSoteUszvBQ9/HqN2+9AZghbajMsFT+oA==}
cpu: [ia32]
os: [win32]
'@rollup/rollup-win32-x64-gnu@4.53.2':
resolution: {integrity: sha512-S6YojNVrHybQis2lYov1sd+uj7K0Q05NxHcGktuMMdIQ2VixGwAfbJ23NnlvvVV1bdpR2m5MsNBViHJKcA4ADw==}
cpu: [x64]
os: [win32]
'@rollup/rollup-win32-x64-gnu@4.53.3':
resolution: {integrity: sha512-J9QDiOIZlZLdcot5NXEepDkstocktoVjkaKUtqzgzpt2yWjGlbYiKyp05rWwk4nypbYUNoFAztEgixoLaSETkg==}
cpu: [x64]
os: [win32]
'@rollup/rollup-win32-x64-msvc@4.53.2':
resolution: {integrity: sha512-k+/Rkcyx//P6fetPoLMb8pBeqJBNGx81uuf7iljX9++yNBVRDQgD04L+SVXmXmh5ZP4/WOp4mWF0kmi06PW2tA==}
cpu: [x64]
os: [win32]
'@rollup/rollup-win32-x64-msvc@4.53.3':
resolution: {integrity: sha512-UhTd8u31dXadv0MopwGgNOBpUVROFKWVQgAg5N1ESyCz8AuBcMqm4AuTjrwgQKGDfoFuz02EuMRHQIw/frmYKQ==}
cpu: [x64]
os: [win32]
'@sinclair/typebox@0.34.41':
resolution: {integrity: sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==}
@ -1349,9 +1462,18 @@ packages:
resolution: {integrity: sha512-7Jsfj2uLuGWvnxjrGDrHWpSm65+OcVx0ZbTD2wwkz6Wt6KjGm6+ZYwwpdXdwAlzbJYq+LCEMNvDJc4485AQ1vQ==}
hasBin: true
fastify-plugin@4.5.1:
resolution: {integrity: sha512-stRHYGeuqpEZTL1Ef0Ovr2ltazUT9g844X5z/zEBFLG8RYlpDiOCIG+ATvYEp+/zmc7sN29mcIMp8gvYplYPIQ==}
fastify-plugin@5.1.0:
resolution: {integrity: sha512-FAIDA8eovSt5qcDgcBvDuX/v0Cjz0ohGhENZ/wpc3y+oZCY2afZ9Baqql3g/lC+OHRnciQol4ww7tuthOb9idw==}
fastify-socket.io@5.1.0:
resolution: {integrity: sha512-GC1gjrxBGeTbMWV779XHF4uw3AtgKwSQJ9MnjGiMp91ZBuPXEdBYa7NnAMDEl3oZPgK9JO4BlNncTV+UAN+1kg==}
peerDependencies:
fastify: 4.x.x
socket.io: '>=4'
fastify@5.6.2:
resolution: {integrity: sha512-dPugdGnsvYkBlENLhCgX8yhyGCsCPrpA8lFWbTNU428l+YOnLgYHR69hzV8HWPC79n536EqzqQtvhtdaCE0dKg==}
@ -1395,8 +1517,8 @@ packages:
resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==}
engines: {node: '>=14'}
form-data@4.0.4:
resolution: {integrity: sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==}
form-data@4.0.5:
resolution: {integrity: sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==}
engines: {node: '>= 6'}
forwarded@0.2.0:
@ -1442,6 +1564,11 @@ packages:
engines: {node: 20 || >=22}
hasBin: true
glob@11.1.0:
resolution: {integrity: sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==}
engines: {node: 20 || >=22}
hasBin: true
globrex@0.1.2:
resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==}
@ -1995,6 +2122,11 @@ packages:
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
hasBin: true
rollup@4.53.3:
resolution: {integrity: sha512-w8GmOxZfBmKknvdXU1sdM9NHcoQejwF/4mNgj2JuEEdRaHwwF12K7e9eXn1nLZ07ad+du76mkVsyeb2rKGllsA==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
hasBin: true
safe-buffer@5.2.1:
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
@ -2318,6 +2450,46 @@ packages:
yaml:
optional: true
vite@7.2.4:
resolution: {integrity: sha512-NL8jTlbo0Tn4dUEXEsUg8KeyG/Lkmc4Fnzb8JXN/Ykm9G4HNImjtABMJgkQoVjOBN/j2WAwDTRytdqJbZsah7w==}
engines: {node: ^20.19.0 || >=22.12.0}
hasBin: true
peerDependencies:
'@types/node': ^20.19.0 || >=22.12.0
jiti: '>=1.21.0'
less: ^4.0.0
lightningcss: ^1.21.0
sass: ^1.70.0
sass-embedded: ^1.70.0
stylus: '>=0.54.8'
sugarss: ^5.0.0
terser: ^5.16.0
tsx: ^4.8.1
yaml: ^2.4.2
peerDependenciesMeta:
'@types/node':
optional: true
jiti:
optional: true
less:
optional: true
lightningcss:
optional: true
sass:
optional: true
sass-embedded:
optional: true
stylus:
optional: true
sugarss:
optional: true
terser:
optional: true
tsx:
optional: true
yaml:
optional: true
walker@1.0.8:
resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==}
@ -2893,8 +3065,8 @@ snapshots:
colorette: 1.4.0
cookie: 0.7.2
dotenv: 16.4.7
form-data: 4.0.4
glob: 11.0.3
form-data: 4.0.5
glob: 11.1.0
handlebars: 4.7.8
https-proxy-agent: 7.0.6
mobx: 6.15.0
@ -2970,69 +3142,135 @@ snapshots:
'@rollup/rollup-android-arm-eabi@4.53.2':
optional: true
'@rollup/rollup-android-arm-eabi@4.53.3':
optional: true
'@rollup/rollup-android-arm64@4.53.2':
optional: true
'@rollup/rollup-android-arm64@4.53.3':
optional: true
'@rollup/rollup-darwin-arm64@4.53.2':
optional: true
'@rollup/rollup-darwin-arm64@4.53.3':
optional: true
'@rollup/rollup-darwin-x64@4.53.2':
optional: true
'@rollup/rollup-darwin-x64@4.53.3':
optional: true
'@rollup/rollup-freebsd-arm64@4.53.2':
optional: true
'@rollup/rollup-freebsd-arm64@4.53.3':
optional: true
'@rollup/rollup-freebsd-x64@4.53.2':
optional: true
'@rollup/rollup-freebsd-x64@4.53.3':
optional: true
'@rollup/rollup-linux-arm-gnueabihf@4.53.2':
optional: true
'@rollup/rollup-linux-arm-gnueabihf@4.53.3':
optional: true
'@rollup/rollup-linux-arm-musleabihf@4.53.2':
optional: true
'@rollup/rollup-linux-arm-musleabihf@4.53.3':
optional: true
'@rollup/rollup-linux-arm64-gnu@4.53.2':
optional: true
'@rollup/rollup-linux-arm64-gnu@4.53.3':
optional: true
'@rollup/rollup-linux-arm64-musl@4.53.2':
optional: true
'@rollup/rollup-linux-arm64-musl@4.53.3':
optional: true
'@rollup/rollup-linux-loong64-gnu@4.53.2':
optional: true
'@rollup/rollup-linux-loong64-gnu@4.53.3':
optional: true
'@rollup/rollup-linux-ppc64-gnu@4.53.2':
optional: true
'@rollup/rollup-linux-ppc64-gnu@4.53.3':
optional: true
'@rollup/rollup-linux-riscv64-gnu@4.53.2':
optional: true
'@rollup/rollup-linux-riscv64-gnu@4.53.3':
optional: true
'@rollup/rollup-linux-riscv64-musl@4.53.2':
optional: true
'@rollup/rollup-linux-riscv64-musl@4.53.3':
optional: true
'@rollup/rollup-linux-s390x-gnu@4.53.2':
optional: true
'@rollup/rollup-linux-s390x-gnu@4.53.3':
optional: true
'@rollup/rollup-linux-x64-gnu@4.53.2':
optional: true
'@rollup/rollup-linux-x64-gnu@4.53.3':
optional: true
'@rollup/rollup-linux-x64-musl@4.53.2':
optional: true
'@rollup/rollup-linux-x64-musl@4.53.3':
optional: true
'@rollup/rollup-openharmony-arm64@4.53.2':
optional: true
'@rollup/rollup-openharmony-arm64@4.53.3':
optional: true
'@rollup/rollup-win32-arm64-msvc@4.53.2':
optional: true
'@rollup/rollup-win32-arm64-msvc@4.53.3':
optional: true
'@rollup/rollup-win32-ia32-msvc@4.53.2':
optional: true
'@rollup/rollup-win32-ia32-msvc@4.53.3':
optional: true
'@rollup/rollup-win32-x64-gnu@4.53.2':
optional: true
'@rollup/rollup-win32-x64-gnu@4.53.3':
optional: true
'@rollup/rollup-win32-x64-msvc@4.53.2':
optional: true
'@rollup/rollup-win32-x64-msvc@4.53.3':
optional: true
'@sinclair/typebox@0.34.41': {}
'@socket.io/component-emitter@3.1.2': {}
@ -3472,8 +3710,17 @@ snapshots:
semver: 7.7.3
yargs-parser: 22.0.0
fastify-plugin@4.5.1: {}
fastify-plugin@5.1.0: {}
fastify-socket.io@5.1.0(fastify@5.6.2)(socket.io@4.8.1):
dependencies:
fastify: 5.6.2
fastify-plugin: 4.5.1
socket.io: 4.8.1
tslib: 2.8.1
fastify@5.6.2:
dependencies:
'@fastify/ajv-compiler': 4.0.5
@ -3533,7 +3780,7 @@ snapshots:
cross-spawn: 7.0.6
signal-exit: 4.1.0
form-data@4.0.4:
form-data@4.0.5:
dependencies:
asynckit: 0.4.0
combined-stream: 1.0.8
@ -3592,6 +3839,15 @@ snapshots:
package-json-from-dist: 1.0.1
path-scurry: 2.0.1
glob@11.1.0:
dependencies:
foreground-child: 3.3.1
jackspeak: 4.1.1
minimatch: 10.1.1
minipass: 7.1.2
package-json-from-dist: 1.0.1
path-scurry: 2.0.1
globrex@0.1.2: {}
gopd@1.2.0: {}
@ -4128,9 +4384,9 @@ snapshots:
rfdc@1.4.1: {}
rollup-plugin-node-externals@8.1.2(rollup@4.53.2):
rollup-plugin-node-externals@8.1.2(rollup@4.53.3):
dependencies:
rollup: 4.53.2
rollup: 4.53.3
rollup@4.53.2:
dependencies:
@ -4160,6 +4416,34 @@ snapshots:
'@rollup/rollup-win32-x64-msvc': 4.53.2
fsevents: 2.3.3
rollup@4.53.3:
dependencies:
'@types/estree': 1.0.8
optionalDependencies:
'@rollup/rollup-android-arm-eabi': 4.53.3
'@rollup/rollup-android-arm64': 4.53.3
'@rollup/rollup-darwin-arm64': 4.53.3
'@rollup/rollup-darwin-x64': 4.53.3
'@rollup/rollup-freebsd-arm64': 4.53.3
'@rollup/rollup-freebsd-x64': 4.53.3
'@rollup/rollup-linux-arm-gnueabihf': 4.53.3
'@rollup/rollup-linux-arm-musleabihf': 4.53.3
'@rollup/rollup-linux-arm64-gnu': 4.53.3
'@rollup/rollup-linux-arm64-musl': 4.53.3
'@rollup/rollup-linux-loong64-gnu': 4.53.3
'@rollup/rollup-linux-ppc64-gnu': 4.53.3
'@rollup/rollup-linux-riscv64-gnu': 4.53.3
'@rollup/rollup-linux-riscv64-musl': 4.53.3
'@rollup/rollup-linux-s390x-gnu': 4.53.3
'@rollup/rollup-linux-x64-gnu': 4.53.3
'@rollup/rollup-linux-x64-musl': 4.53.3
'@rollup/rollup-openharmony-arm64': 4.53.3
'@rollup/rollup-win32-arm64-msvc': 4.53.3
'@rollup/rollup-win32-ia32-msvc': 4.53.3
'@rollup/rollup-win32-x64-gnu': 4.53.3
'@rollup/rollup-win32-x64-msvc': 4.53.3
fsevents: 2.3.3
safe-buffer@5.2.1: {}
safe-regex2@5.0.0:
@ -4440,8 +4724,7 @@ snapshots:
tslib@2.6.2: {}
tslib@2.8.1:
optional: true
tslib@2.8.1: {}
tunnel-agent@0.6.0:
dependencies:
@ -4503,13 +4786,13 @@ snapshots:
fsevents: 2.3.3
yaml: 2.8.1
vite@7.2.2(@types/node@24.10.1)(yaml@2.8.1):
vite@7.2.4(@types/node@24.10.1)(yaml@2.8.1):
dependencies:
esbuild: 0.25.12
fdir: 6.5.0(picomatch@4.0.3)
picomatch: 4.0.3
postcss: 8.5.6
rollup: 4.53.2
rollup: 4.53.3
tinyglobby: 0.2.15
optionalDependencies:
'@types/node': 24.10.1

View file

@ -38,6 +38,9 @@ const app: FastifyPluginAsync = async (fastify, opts): Promise<void> => {
void fastify.register(fastifyMultipart, {});
fastify.get('/monitoring', () => 'Ok');
// Setup Socket.io
setupSocketIo(fastify);
};

View file

@ -1,7 +1,7 @@
import { FastifyPluginAsync } from 'fastify';
import { MakeStaticResponse, typeResponse } from '@shared/utils';
import { Type } from '@sinclair/typebox';
import * as fsocketio from 'fastify-socket.io';
import * as fsocketio from 'socket.io';
export const ChatRes = {
200: typeResponse('success', 'chat.success', {
@ -14,7 +14,6 @@ export const ChatRes = {
export type ChatResType = MakeStaticResponse<typeof ChatRes>;
const route: FastifyPluginAsync = async (fastify): Promise<void> => {
await fastify.register(fsocketio.default);
// fastify.get(
// '/api/chat/test',

View file

@ -1,3 +1,4 @@
import Fastify from "fastify";
import { Server, Socket } from 'socket.io';
export const color = {
@ -26,10 +27,26 @@ declare module 'fastify' {
}
};
export function setupSocketIo(fastify: import('fastify').FastifyInstance): void {
const fastify = Fastify({
logger: true
});
fastify.ready((err) => {
if (err) throw err;
export async function setupSocketIo() {
// Wait for Fastify to be ready so .server exists
await fastify.ready();
const io = new Server(fastify.server, {
cors: {
origin: "*"
}
});
// export function setupSocketIo(fastify: import('fastify').FastifyInstance): void {
// fastify.ready((err) => {
// if (err) throw err;
// Broadcast function to send messages to all connected clients except the sender
function broadcast(data: ClientMessage, sender?: string) {
@ -51,7 +68,7 @@ export function setupSocketIo(fastify: import('fastify').FastifyInstance): void
});
};
// console.log(Object.getOwnPropertyNames(Object.getPrototypeOf(fastify.io)));
fastify.io.on('connection', (socket : Socket) => {
io.on('connection', (socket : Socket) => {
console.info(color.blue, 'Socket connected!', color.reset, socket.id);
socket.on('message', (message: string) => {
console.log(color.blue, 'Received message from client', color.reset, message);
@ -69,5 +86,5 @@ export function setupSocketIo(fastify: import('fastify').FastifyInstance): void
console.log('Socket AAAAAAAActing because:', socket.connected);
});
});
});
// });
};