Skip to content

Commit

Permalink
Updated dependencies
Browse files Browse the repository at this point in the history
Added .then() to more Ably Channel.publish(...) usages
  • Loading branch information
hopperelec committed Apr 17, 2024
1 parent 8bdf5c9 commit 92c9f41
Show file tree
Hide file tree
Showing 7 changed files with 536 additions and 908 deletions.
1,382 changes: 501 additions & 881 deletions package-lock.json

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,46 +18,46 @@
"prisma:generate": "prisma generate"
},
"dependencies": {
"@prisma/client": "^5.11.0",
"@prisma/client": "^5.12.1",
"ably": "^2.0.2",
"google-auth-library": "^9.7.0",
"google-auth-library": "^9.8.0",
"html-minifier-terser": "^7.2.0",
"panzoom": "^9.4.3",
"uuid-buffer": "^1.0.3"
},
"devDependencies": {
"@playwright/test": "^1.42.1",
"@sveltejs/adapter-vercel": "^5.2.0",
"@sveltejs/kit": "^2.5.4",
"@sveltejs/vite-plugin-svelte": "^3.0.2",
"@playwright/test": "^1.43.1",
"@sveltejs/adapter-vercel": "^5.3.0",
"@sveltejs/kit": "^2.5.6",
"@sveltejs/vite-plugin-svelte": "^3.1.0",
"@types/html-minifier-terser": "^7.0.2",
"@types/node": "^20.11.30",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"autoprefixer": "^10.4.18",
"@types/node": "^20.12.7",
"@typescript-eslint/eslint-plugin": "^7.7.0",
"@typescript-eslint/parser": "^7.7.0",
"autoprefixer": "^10.4.19",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.35.1",
"eslint-plugin-svelte": "^2.37.0",
"espree": "^10.0.1",
"postcss-preset-env": "^9.5.2",
"postcss-preset-env": "^9.5.5",
"prettier": "3.1.0",
"prettier-plugin-prisma": "5.0.0",
"prettier-plugin-svelte": "3.1.0",
"prisma": "^5.11.0",
"sass": "^1.72.0",
"stylelint": "16.2.1",
"prisma": "^5.12.1",
"sass": "^1.75.0",
"stylelint": "16.3.1",
"stylelint-config-html": "1.1.0",
"stylelint-config-prettier-scss": "1.0.0",
"stylelint-config-standard": "36.0.0",
"stylelint-config-standard-scss": "13.0.0",
"stylelint-config-standard-scss": "13.1.0",
"stylelint-use-nesting": "5.1.1",
"svelte": "^4.2.12",
"svelte-check": "^3.6.8",
"svelte": "^4.2.14",
"svelte-check": "^3.6.9",
"tslib": "^2.6.2",
"typescript": "^5.4.3",
"vite": "^5.2.2",
"vitest": "^1.4.0"
"typescript": "^5.4.5",
"vite": "^5.2.9",
"vitest": "^1.5.0"
},
"type": "module"
}
3 changes: 2 additions & 1 deletion src/routes/game/[gameId=id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
currSvgRef: $positionsMessage.data.svgRef,
};
// fallthrough
case "move":
case "move": {
const svgRef = $positionsMessage.data.svgRef;
if (!data.claimedRooms.includes(svgRef)) {
data.claimedRooms.push(svgRef);
Expand All @@ -37,6 +37,7 @@
$positionsMessage.data.svgRef,
);
break;
}
case "unclaim":
data.claimedRooms = data.claimedRooms.filter(
Expand Down
3 changes: 2 additions & 1 deletion src/routes/game/[gameId=id]/end/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ async function endGame(gameId: number) {
});
ablyServer.channels
.get("game:" + gameId + ":announcements")
.publish("end", null);
.publish("end", null)
.then();
}

export const load = async ({ params, locals }) => {
Expand Down
3 changes: 2 additions & 1 deletion src/routes/game/[gameId=id]/kick/[userId=id]/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const POST = async ({ locals, params }) => {
});
ablyServer.channels
.get("game:" + gameId + ":announcements")
.publish("kick", { userId: requestedUserId });
.publish("kick", { userId: requestedUserId })
.then();
return new Response();
};
6 changes: 4 additions & 2 deletions src/routes/game/[gameId=id]/lobby/leave/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ async function assignHost(gameId: number, userId: number) {
});
ablyServer.channels
.get("game:" + gameId + ":lobby")
.publish("host", { userId });
.publish("host", { userId })
.then();
}

export const GET = async ({ params, locals }) => {
Expand Down Expand Up @@ -40,7 +41,8 @@ export const GET = async ({ params, locals }) => {
});
ablyServer.channels
.get("game:" + gameId + ":lobby")
.publish("leave", { userId: locals.user.id });
.publish("leave", { userId: locals.user.id })
.then();
if (
player.game.players.length != 0 &&
!player.game.players.some((player) => player.isHost)
Expand Down
5 changes: 4 additions & 1 deletion src/routes/game/[gameId=id]/lobby/start/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ async function startGame(gameId: number) {
where: { id: gameId },
data: { state: "ONGOING" },
});
ablyServer.channels.get("game:" + gameId + ":lobby").publish("start", null);
ablyServer.channels
.get("game:" + gameId + ":lobby")
.publish("start", null)
.then();
}

export const GET = async ({ params, locals }) => {
Expand Down

0 comments on commit 92c9f41

Please sign in to comment.