Skip to content

Commit 9684e22

Browse files
committed
update deps
1 parent 95587d2 commit 9684e22

File tree

11 files changed

+59
-103
lines changed

11 files changed

+59
-103
lines changed

package-lock.json

Lines changed: 38 additions & 84 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"@mikro-orm/migrations": "^6.3.9",
5555
"@mikro-orm/mysql": "^6.3.9",
5656
"@mikro-orm/reflection": "^6.3.9",
57-
"@sendgrid/mail": "^7.6.2",
57+
"@sendgrid/mail": "^8.1.3",
5858
"@sentry/node": "^7.47.0",
5959
"@sentry/utils": "^7.47.0",
6060
"adm-zip": "^0.5.6",
@@ -70,14 +70,11 @@
7070
"jsonwebtoken": "^9.0.0",
7171
"koa": "^2.13.4",
7272
"koa-bodyparser": "^4.3.0",
73-
"koa-clay": "^6.5.0",
73+
"koa-clay": "^6.6.1",
7474
"koa-helmet": "^7.0.0",
7575
"koa-jwt": "^4.0.4",
7676
"koa-logger": "^3.2.1",
77-
"lodash.get": "^4.4.2",
78-
"lodash.groupby": "^4.6.0",
79-
"lodash.pick": "^4.4.0",
80-
"lodash.uniqwith": "^4.5.0",
77+
"lodash": "^4.17.21",
8178
"otplib": "^12.0.1",
8279
"qrcode": "^1.5.0",
8380
"qs": "^6.11.0",

src/entities/integration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { decrypt, encrypt } from '../lib/crypto/string-encryption'
44
import Game from './game'
55
import { createSteamworksLeaderboard, createSteamworksLeaderboardEntry, deleteSteamworksLeaderboard, deleteSteamworksLeaderboardEntry, setSteamworksStat, syncSteamworksLeaderboards, syncSteamworksStats } from '../lib/integrations/steamworks-integration'
66
import Leaderboard from './leaderboard'
7-
import pick from 'lodash.pick'
7+
import { pick } from 'lodash'
88
import LeaderboardEntry from './leaderboard-entry'
99
import { PlayerAliasService } from './player-alias'
1010
import PlayerGameStat from './player-game-stat'
@@ -90,7 +90,7 @@ export default class Integration {
9090
}
9191
}
9292

93-
getConfig(): IntegrationConfig {
93+
getConfig(): Omit<IntegrationConfig, 'apiKey'> {
9494
switch (this.type) {
9595
case IntegrationType.STEAMWORKS:
9696
return pick(this.config, ['appId', 'syncLeaderboards', 'syncStats'])

src/services/api-key.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { HasPermission, Service, Request, Response, Routes, Validate } from 'koa
33
import APIKey, { APIKeyScope } from '../entities/api-key'
44
import jwt from 'jsonwebtoken'
55
import APIKeyPolicy from '../policies/api-key.policy'
6-
import groupBy from 'lodash.groupby'
6+
import { groupBy } from 'lodash'
77
import { promisify } from 'util'
88
import createGameActivity from '../lib/logging/createGameActivity'
99
import { GameActivityType } from '../entities/game-activity'

src/services/api/player-api.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import GameSave from '../../entities/game-save'
66
import PlayerAlias, { PlayerAliasService } from '../../entities/player-alias'
77
import PlayerAPIPolicy from '../../policies/api/player-api.policy'
88
import APIService from './api-service'
9-
import uniqWith from 'lodash.uniqwith'
9+
import { uniqWith } from 'lodash'
1010
import PlayerAPIDocs from '../../docs/player-api.docs'
1111
import PlayerProp from '../../entities/player-prop'
1212
import PlayerGameStat from '../../entities/player-game-stat'

src/services/data-export.service.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import DataExport, { DataExportAvailableEntities, DataExportStatus } from '../en
44
import DataExportPolicy from '../policies/data-export.policy'
55
import Event, { ClickhouseEvent, createEventFromClickhouse } from '../entities/event'
66
import AdmZip from 'adm-zip'
7-
import get from 'lodash.get'
7+
import { get } from 'lodash'
88
import Prop from '../entities/prop'
99
import Player from '../entities/player'
1010
import PlayerAlias from '../entities/player-alias'
@@ -22,7 +22,7 @@ import handlePricingPlanAction from '../lib/billing/handlePricingPlanAction'
2222
import { PricingPlanActionType } from '../entities/pricing-plan-action'
2323
import queueEmail from '../lib/messaging/queueEmail'
2424
import OrganisationPricingPlanAction from '../entities/organisation-pricing-plan-action'
25-
import pick from 'lodash.pick'
25+
import { pick } from 'lodash'
2626
import PlayerProp from '../entities/player-prop'
2727
import { Job, Queue } from 'bullmq'
2828
import createEmailQueue from '../lib/queues/createEmailQueue'
@@ -346,7 +346,8 @@ export default class DataExportService extends Service {
346346
value = get(object, 'extra')
347347
return `"${JSON.stringify(value).replace(/"/g, '\'')}"`
348348
case 'globalValue':
349-
return get(object, 'hydratedGlobalValue') ?? 'N/A'
349+
value = get(object, 'hydratedGlobalValue')
350+
return value ? String(value) : 'N/A'
350351
case 'playerAlias.id':
351352
case 'playerAlias.service':
352353
case 'playerAlias.identifier':

src/services/game.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { EntityManager } from '@mikro-orm/mysql'
22
import { HasPermission, Service, Request, Response, Validate } from 'koa-clay'
3-
import uniqWith from 'lodash.uniqwith'
3+
import { uniqWith } from 'lodash'
44
import Game from '../entities/game'
55
import { GameActivityType } from '../entities/game-activity'
66
import GameSecret from '../entities/game-secret'

src/services/integration.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { EntityManager, MikroORM } from '@mikro-orm/mysql'
22
import { HasPermission, Request, Response, Routes, Service, Validate } from 'koa-clay'
3-
import pick from 'lodash.pick'
3+
import { pick } from 'lodash'
44
import { GameActivityType } from '../entities/game-activity'
55
import Integration, { IntegrationConfig, IntegrationType } from '../entities/integration'
66
import createGameActivity from '../lib/logging/createGameActivity'
@@ -91,7 +91,7 @@ export default class IntegrationService extends Service {
9191

9292
// todo, prevent if has one of type already
9393

94-
const integration = new Integration(type, req.ctx.state.game, pick(config, configKeys[type]))
94+
const integration = new Integration(type, req.ctx.state.game, pick(config, configKeys[type]) as IntegrationConfig)
9595

9696
createGameActivity(em, {
9797
user: req.ctx.state.user,

src/services/player.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import sanitiseProps from '../lib/props/sanitiseProps'
77
import { ClickhouseEvent, createEventFromClickhouse } from '../entities/event'
88
import { EntityManager } from '@mikro-orm/mysql'
99
import { QueryOrder } from '@mikro-orm/mysql'
10-
import uniqWith from 'lodash.uniqwith'
10+
import { uniqWith } from 'lodash'
1111
import createGameActivity from '../lib/logging/createGameActivity'
1212
import { GameActivityType } from '../entities/game-activity'
1313
import PlayerGameStat from '../entities/player-game-stat'

tests/middlewares/player-auth-middleware.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ describe('Player auth middleware', () => {
1111
const em: EntityManager = global.em
1212

1313
const [apiKey, token] = await createAPIKeyAndToken([APIKeyScope.WRITE_GAME_STATS])
14-
const stat = await new GameStatFactory([apiKey.game]).one()
14+
const stat = await new GameStatFactory([apiKey.game]).state(() => ({
15+
defaultValue: 0,
16+
maxChange: 1,
17+
maxValue: 1000
18+
})).one()
1519
const player = await new PlayerFactory([apiKey.game]).withTaloAlias().one()
1620

1721
await em.persistAndFlush([stat, player])

0 commit comments

Comments
 (0)