Skip to content

Commit 04b2a07

Browse files
committed
Merge branch 'dev' of https://github.com/uzh-bf/gbl-uzh into dev
2 parents 546ccc5 + 9b8c5ee commit 04b2a07

File tree

8 files changed

+15
-8
lines changed

8 files changed

+15
-8
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [0.4.46](https://github.com/uzh-bf/gbl-uzh/compare/v0.4.45...v0.4.46) (2026-03-07)
6+
7+
8+
### Enhancements
9+
10+
* pass validated facts to roleAssigner callback ([#134](https://github.com/uzh-bf/gbl-uzh/issues/134)) ([609cdd5](https://github.com/uzh-bf/gbl-uzh/commit/609cdd51624d80308369b5d7ce35c92ed2b79208))
11+
512
### [0.4.45](https://github.com/uzh-bf/gbl-uzh/compare/v0.4.44...v0.4.45) (2026-03-06)
613

714
### [0.4.44](https://github.com/uzh-bf/gbl-uzh/compare/v0.4.43...v0.4.44) (2026-03-06)

apps/advisor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@gbl-uzh/advisor",
33
"description": "",
4-
"version": "0.4.45",
4+
"version": "0.4.46",
55
"license": "AGPL-3.0",
66
"main": "tailwind.config.js",
77
"scripts": {

apps/demo-game/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "@gbl-uzh/demo-game",
4-
"version": "0.4.45",
4+
"version": "0.4.46",
55
"license": "AGPL-3.0",
66
"dependencies": {
77
"@apollo/client": "3.11.10",

apps/website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gbl-uzh/website",
3-
"version": "0.4.45",
3+
"version": "0.4.46",
44
"license": "AGPL-3.0",
55
"dependencies": {
66
"@fortawesome/fontawesome-svg-core": "6.6.0",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"teaching",
88
"university"
99
],
10-
"version": "0.4.45",
10+
"version": "0.4.46",
1111
"repository": "uzh-bf/gbl-uzh.git",
1212
"homepage": "https://www.gbl.uzh.ch",
1313
"maintainers": [

packages/platform/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gbl-uzh/platform",
3-
"version": "0.4.45",
3+
"version": "0.4.46",
44
"license": "LGPL-3.0",
55
"repository": {
66
"type": "git",

packages/platform/src/services/GameService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export async function createGame<TFacts>(
2828
{
2929
schema,
3030
roleAssigner,
31-
}: { schema: yup.Schema<TFacts>; roleAssigner?: (ix: number) => any }
31+
}: { schema: yup.Schema<TFacts>; roleAssigner?: (ix: number, facts: any) => any }
3232
) {
3333
const validatedFacts = schema.validateSync(facts) as any
3434

@@ -46,7 +46,7 @@ export async function createGame<TFacts>(
4646
return {
4747
facts: {},
4848
token: nanoid(),
49-
role: roleAssigner ? roleAssigner(ix) : undefined,
49+
role: roleAssigner ? roleAssigner(ix, validatedFacts) : undefined,
5050
number: playerCount - ix,
5151
name: `Team ${playerCount - ix}`,
5252
level: {

packages/platform/src/types/Mutation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface GenerateBaseMutationsArgs {
2727
schemas?: any
2828
inputTypes?: any
2929
// TODO(JJ): return value should be unknown
30-
roleAssigner?: (ix: number) => any
30+
roleAssigner?: (ix: number, facts: any) => any
3131
}
3232

3333
function hasCompletedCompanySetup(

0 commit comments

Comments
 (0)