Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
root: true,
ignorePatterns: ['packages/server/upload', 'packages/server/upload_test', '**/*.js', 'packages/projects/projects/**'],
rules: {
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'warn',
Expand Down
1 change: 0 additions & 1 deletion packages/common/declarations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@ Ethereal Engine. All Rights Reserved.

import '@feathersjs/transport-commons'

// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ServiceTypes {}
1 change: 0 additions & 1 deletion packages/common/src/DeepReadonly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export type DeepReadonly<T> = T extends (infer R)[]
? DeepReadonlyObject<T>
: T

// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface DeepReadonlyArray<T> extends ReadonlyArray<DeepReadonly<T>> {}

export type DeepReadonlyObject<T> = {
Expand Down
8 changes: 4 additions & 4 deletions packages/engine/src/schemas/analytics/analytics.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,19 @@ export const analyticsSchema = Type.Object(
},
{ $id: 'analytics', additionalProperties: false }
)
export type AnalyticsType = Static<typeof analyticsSchema>
export interface AnalyticsType extends Static<typeof analyticsSchema> {}

// Schema for creating new entries
export const analyticsDataSchema = Type.Pick(analyticsSchema, ['count', 'type'], {
$id: 'analyticsData'
})
export type AnalyticsData = Static<typeof analyticsDataSchema>
export interface AnalyticsData extends Static<typeof analyticsDataSchema> {}

// Schema for updating existing entries
export const analyticsPatchSchema = Type.Partial(analyticsSchema, {
$id: 'analyticsPatch'
})
export type AnalyticsPatch = Static<typeof analyticsPatchSchema>
export interface AnalyticsPatch extends Static<typeof analyticsPatchSchema> {}

// Schema for allowed query properties
export const analyticsQueryProperties = Type.Pick(analyticsSchema, ['id', 'count', 'type', 'createdAt'])
Expand All @@ -69,7 +69,7 @@ export const analyticsQuerySchema = Type.Intersect(
],
{ additionalProperties: false }
)
export type AnalyticsQuery = Static<typeof analyticsQuerySchema>
export interface AnalyticsQuery extends Static<typeof analyticsQuerySchema> {}

export const analyticsValidator = getValidator(analyticsSchema, dataValidator)
export const analyticsDataValidator = getValidator(analyticsDataSchema, dataValidator)
Expand Down
8 changes: 4 additions & 4 deletions packages/engine/src/schemas/bot/bot-command.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ export const botCommandSchema = Type.Object(
},
{ $id: 'BotCommand', additionalProperties: false }
)
export type BotCommandType = Static<typeof botCommandSchema>
export interface BotCommandType extends Static<typeof botCommandSchema> {}

// Schema for creating new entries
export const botCommandDataSchema = Type.Partial(botCommandSchema, {
$id: 'BotCommandData'
})
export type BotCommandData = Static<typeof botCommandDataSchema>
export interface BotCommandData extends Static<typeof botCommandDataSchema> {}

// Schema for updating existing entries
export const botCommandPatchSchema = Type.Partial(botCommandSchema, {
$id: 'BotCommandPatch'
})
export type BotCommandPatch = Static<typeof botCommandPatchSchema>
export interface BotCommandPatch extends Static<typeof botCommandPatchSchema> {}

// Schema for allowed query properties
export const botCommandQueryProperties = Type.Pick(botCommandSchema, ['id', 'name', 'description', 'botId'])
Expand All @@ -72,7 +72,7 @@ export const botCommandQuerySchema = Type.Intersect(
],
{ additionalProperties: false }
)
export type BotCommandQuery = Static<typeof botCommandQuerySchema>
export interface BotCommandQuery extends Static<typeof botCommandQuerySchema> {}

export const botCommandValidator = getValidator(botCommandSchema, dataValidator)
export const botCommandDataValidator = getValidator(botCommandDataSchema, dataValidator)
Expand Down
8 changes: 4 additions & 4 deletions packages/engine/src/schemas/bot/bot.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const botSchema = Type.Object(
},
{ $id: 'Bot', additionalProperties: false }
)
export type BotType = Static<typeof botSchema>
export interface BotType extends Static<typeof botSchema> {}

// Schema for creating new entries
export const botDataSchema = Type.Pick(
Expand All @@ -72,13 +72,13 @@ export const botDataSchema = Type.Pick(
$id: 'BotData'
}
)
export type BotData = Static<typeof botDataSchema>
export interface BotData extends Static<typeof botDataSchema> {}

// Schema for updating existing entries
export const botPatchSchema = Type.Partial(botSchema, {
$id: 'BotPatch'
})
export type BotPatch = Static<typeof botPatchSchema>
export interface BotPatch extends Static<typeof botPatchSchema> {}

// Schema for allowed query properties
export const botQueryProperties = Type.Pick(botSchema, [
Expand All @@ -97,7 +97,7 @@ export const botQuerySchema = Type.Intersect(
],
{ additionalProperties: false }
)
export type BotQuery = Static<typeof botQuerySchema>
export interface BotQuery extends Static<typeof botQuerySchema> {}

export const botValidator = getValidator(botSchema, dataValidator)
export const botDataValidator = getValidator(botDataSchema, dataValidator)
Expand Down
8 changes: 4 additions & 4 deletions packages/engine/src/schemas/cluster/api-job.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ export const apiJobSchema = Type.Object(
},
{ $id: 'ApiJob', additionalProperties: false }
)
export type ApiJobType = Static<typeof apiJobSchema>
export interface ApiJobType extends Static<typeof apiJobSchema> {}

// Schema for creating new entries
export const apiJobDataSchema = Type.Pick(apiJobSchema, ['name', 'startTime', 'endTime', 'status', 'returnData'], {
$id: 'ApiJobData'
})
export type ApiJobData = Static<typeof apiJobDataSchema>
export interface ApiJobData extends Static<typeof apiJobDataSchema> {}

// Schema for updating existing entries
export const apiJobPatchSchema = Type.Partial(apiJobSchema, {
$id: 'ApiJobPatch'
})
export type ApiJobPatch = Static<typeof apiJobPatchSchema>
export interface ApiJobPatch extends Static<typeof apiJobPatchSchema> {}

// Schema for allowed query properties
export const apiJobQueryProperties = Type.Pick(apiJobSchema, [
Expand All @@ -79,7 +79,7 @@ export const apiJobQuerySchema = Type.Intersect(
],
{ additionalProperties: false }
)
export type ApiJobQuery = Static<typeof apiJobQuerySchema>
export interface ApiJobQuery extends Static<typeof apiJobQuerySchema> {}

export const apiJobValidator = getValidator(apiJobSchema, dataValidator)
export const apiJobDataValidator = getValidator(apiJobDataSchema, dataValidator)
Expand Down
8 changes: 4 additions & 4 deletions packages/engine/src/schemas/cluster/build-status.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const buildStatusSchema = Type.Object(
},
{ $id: 'BuildStatus', additionalProperties: false }
)
export type BuildStatusType = Static<typeof buildStatusSchema>
export interface BuildStatusType extends Static<typeof buildStatusSchema> {}

// Schema for creating new entries
export const buildStatusDataSchema = Type.Pick(
Expand All @@ -56,13 +56,13 @@ export const buildStatusDataSchema = Type.Pick(
$id: 'BuildStatusData'
}
)
export type BuildStatusData = Static<typeof buildStatusDataSchema>
export interface BuildStatusData extends Static<typeof buildStatusDataSchema> {}

// Schema for updating existing entries
export const buildStatusPatchSchema = Type.Partial(buildStatusSchema, {
$id: 'BuildStatusPatch'
})
export type BuildStatusPatch = Static<typeof buildStatusPatchSchema>
export interface BuildStatusPatch extends Static<typeof buildStatusPatchSchema> {}

// Schema for allowed query properties
export const buildStatusQueryProperties = Type.Pick(buildStatusSchema, [
Expand All @@ -81,7 +81,7 @@ export const buildStatusQuerySchema = Type.Intersect(
],
{ additionalProperties: false }
)
export type BuildStatusQuery = Static<typeof buildStatusQuerySchema>
export interface BuildStatusQuery extends Static<typeof buildStatusQuerySchema> {}

export const buildStatusValidator = getValidator(buildStatusSchema, dataValidator)
export const buildStatusDataValidator = getValidator(buildStatusDataSchema, dataValidator)
Expand Down
6 changes: 3 additions & 3 deletions packages/engine/src/schemas/cluster/pods.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const serverContainerInfoSchema = Type.Object(
},
{ $id: 'ServerContainerInfo', additionalProperties: false }
)
export type ServerContainerInfoType = Static<typeof serverContainerInfoSchema>
export interface ServerContainerInfoType extends Static<typeof serverContainerInfoSchema> {}

export const serverPodInfoSchema = Type.Object(
{
Expand All @@ -64,7 +64,7 @@ export const serverPodInfoSchema = Type.Object(
},
{ $id: 'ServerPodInfo', additionalProperties: false }
)
export type ServerPodInfoType = Static<typeof serverPodInfoSchema>
export interface ServerPodInfoType extends Static<typeof serverPodInfoSchema> {}

// Main data model schema
export const podsSchema = Type.Object(
Expand All @@ -75,7 +75,7 @@ export const podsSchema = Type.Object(
},
{ $id: 'Pods', additionalProperties: false }
)
export type PodsType = Static<typeof podsSchema>
export interface PodsType extends Static<typeof podsSchema> {}

export const serverContainerInfoValidator = getValidator(serverContainerInfoSchema, dataValidator)
export const serverPodInfoValidator = getValidator(serverPodInfoSchema, dataValidator)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ export const matchInstanceSchema = Type.Object(
},
{ $id: 'MatchInstance', additionalProperties: false }
)
export type MatchInstanceType = Static<typeof matchInstanceSchema>
export interface MatchInstanceType extends Static<typeof matchInstanceSchema> {}

// Schema for creating new entries
export const matchInstanceDataSchema = Type.Pick(matchInstanceSchema, ['connection', 'gameMode', 'instanceServer'], {
$id: 'MatchInstanceData'
})
export type MatchInstanceData = Static<typeof matchInstanceDataSchema>
export interface MatchInstanceData extends Static<typeof matchInstanceDataSchema> {}

// Schema for updating existing entries
export const matchInstancePatchSchema = Type.Partial(matchInstanceSchema, {
$id: 'MatchInstancePatch'
})
export type MatchInstancePatch = Static<typeof matchInstancePatchSchema>
export interface MatchInstancePatch extends Static<typeof matchInstancePatchSchema> {}

// Schema for allowed query properties
export const matchInstanceQueryProperties = Type.Pick(matchInstanceSchema, [
Expand All @@ -79,7 +79,7 @@ export const matchInstanceQuerySchema = Type.Intersect(
],
{ additionalProperties: false }
)
export type MatchInstanceQuery = Static<typeof matchInstanceQuerySchema>
export interface MatchInstanceQuery extends Static<typeof matchInstanceQuerySchema> {}

export const matchInstanceValidator = getValidator(matchInstanceSchema, dataValidator)
export const matchInstanceDataValidator = getValidator(matchInstanceDataSchema, dataValidator)
Expand Down
8 changes: 4 additions & 4 deletions packages/engine/src/schemas/matchmaking/match-user.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,19 @@ export const matchUserSchema = Type.Object(
},
{ $id: 'MatchUser', additionalProperties: false }
)
export type MatchUserType = Static<typeof matchUserSchema>
export interface MatchUserType extends Static<typeof matchUserSchema> {}

// Schema for creating new entries
export const matchUserDataSchema = Type.Pick(matchUserSchema, ['ticketId', 'gameMode', 'connection'], {
$id: 'MatchUserData'
})
export type MatchUserData = Static<typeof matchUserDataSchema>
export interface MatchUserData extends Static<typeof matchUserDataSchema> {}

// Schema for updating existing entries
export const matchUserPatchSchema = Type.Partial(matchUserSchema, {
$id: 'MatchUserPatch'
})
export type MatchUserPatch = Static<typeof matchUserPatchSchema>
export interface MatchUserPatch extends Static<typeof matchUserPatchSchema> {}

// Schema for allowed query properties
export const matchUserQueryProperties = Type.Pick(matchUserSchema, ['id', 'ticketId', 'gameMode', 'connection'])
Expand All @@ -77,7 +77,7 @@ export const matchUserQuerySchema = Type.Intersect(
],
{ additionalProperties: false }
)
export type MatchUserQuery = Static<typeof matchUserQuerySchema>
export interface MatchUserQuery extends Static<typeof matchUserQuerySchema> {}

export const matchUserValidator = getValidator(matchUserSchema, dataValidator)
export const matchUserDataValidator = getValidator(matchUserDataSchema, dataValidator)
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/src/schemas/media/archiver.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ export const archiverQuerySchema = Type.Intersect(
],
{ additionalProperties: false }
)
export type ArchiverQuery = Static<typeof archiverQuerySchema>
export interface ArchiverQuery extends Static<typeof archiverQuerySchema> {}
6 changes: 3 additions & 3 deletions packages/engine/src/schemas/media/file-browser.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const fileBrowserContentSchema = Type.Object(
$id: 'FileBrowserContent'
}
)
export type FileBrowserContentType = Static<typeof fileBrowserContentSchema>
export interface FileBrowserContentType extends Static<typeof fileBrowserContentSchema> {}

export const fileBrowserUpdateSchema = Type.Object(
{
Expand All @@ -57,7 +57,7 @@ export const fileBrowserUpdateSchema = Type.Object(
$id: 'FileBrowserUpdate'
}
)
export type FileBrowserUpdate = Static<typeof fileBrowserUpdateSchema>
export interface FileBrowserUpdate extends Static<typeof fileBrowserUpdateSchema> {}

export const fileBrowserPatchSchema = Type.Object(
{
Expand All @@ -71,7 +71,7 @@ export const fileBrowserPatchSchema = Type.Object(
$id: 'FileBrowserPatch'
}
)
export type FileBrowserPatch = Static<typeof fileBrowserPatchSchema>
export interface FileBrowserPatch extends Static<typeof fileBrowserPatchSchema> {}

export const fileBrowserContentValidator = getValidator(fileBrowserContentSchema, dataValidator)
export const fileBrowserUpdateValidator = getValidator(fileBrowserUpdateSchema, dataValidator)
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/src/schemas/media/oembed.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ export const oembedSchema = Type.Object(
$id: 'Oembed'
}
)
export type OembedType = Static<typeof oembedSchema>
export interface OembedType extends Static<typeof oembedSchema> {}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const staticResourceFiltersSchema = Type.Object(
},
{ $id: 'StaticResourceFilters', additionalProperties: false }
)
export type StaticResourceFiltersType = Static<typeof staticResourceFiltersSchema>
export interface StaticResourceFiltersType extends Static<typeof staticResourceFiltersSchema> {}

// Schema for allowed query properties
export const staticResourceFiltersQueryProperties = Type.Pick(staticResourceFiltersSchema, ['mimeTypes'])
Expand All @@ -46,7 +46,7 @@ export const staticResourceFiltersQuerySchema = Type.Intersect(
],
{ additionalProperties: false }
)
export type StaticResourceFiltersQuery = Static<typeof staticResourceFiltersQuerySchema>
export interface StaticResourceFiltersQuery extends Static<typeof staticResourceFiltersQuerySchema> {}

export const staticResourceFiltersValidator = getValidator(staticResourceFiltersSchema, dataValidator)
export const staticResourceFiltersQueryValidator = getValidator(staticResourceFiltersQuerySchema, queryValidator)
10 changes: 5 additions & 5 deletions packages/engine/src/schemas/media/static-resource.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,23 @@ export const staticResourceSchema = Type.Object(
},
{ $id: 'StaticResource', additionalProperties: false }
)
export type StaticResourceType = Static<typeof staticResourceSchema>
export interface StaticResourceType extends Static<typeof staticResourceSchema> {}

export type StaticResourceDatabaseType = Omit<StaticResourceType, 'metadata' | 'tags' | 'stats'> & {
export interface StaticResourceDatabaseType extends Omit<StaticResourceType, 'metadata' | 'tags' | 'stats'> {
metadata: string
tags: string
stats: string
}

// Schema for creating new entries
export const staticResourceDataSchema = Type.Partial(staticResourceSchema, { $id: 'StaticResourceData' })
export type StaticResourceData = Static<typeof staticResourceDataSchema>
export interface StaticResourceData extends Static<typeof staticResourceDataSchema> {}

// Schema for updating existing entries
export const staticResourcePatchSchema = Type.Partial(staticResourceSchema, {
$id: 'StaticResourcePatch'
})
export type StaticResourcePatch = Static<typeof staticResourcePatchSchema>
export interface StaticResourcePatch extends Static<typeof staticResourcePatchSchema> {}

// Schema for allowed query properties
export const staticResourceQueryProperties = Type.Pick(staticResourceSchema, [
Expand Down Expand Up @@ -110,7 +110,7 @@ export const staticResourceQuerySchema = Type.Intersect(
],
{ additionalProperties: false }
)
export type StaticResourceQuery = Static<typeof staticResourceQuerySchema>
export interface StaticResourceQuery extends Static<typeof staticResourceQuerySchema> {}

export const staticResourceValidator = getValidator(staticResourceSchema, dataValidator)
export const staticResourceDataValidator = getValidator(staticResourceDataSchema, dataValidator)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const instanceActiveSchema = Type.Pick(

{ $id: 'InstanceActive', additionalProperties: false }
)
export type InstanceActiveType = Static<typeof instanceActiveSchema>
export interface InstanceActiveType extends Static<typeof instanceActiveSchema> {}

// Schema for allowed query properties
export const instanceActiveQueryProperties = Type.Pick(instanceActiveSchema, ['id', 'locationId', 'currentUsers'])
Expand All @@ -61,7 +61,7 @@ export const instanceActiveQuerySchema = Type.Intersect(
],
{ additionalProperties: false }
)
export type InstanceActiveQuery = Static<typeof instanceActiveQuerySchema>
export interface InstanceActiveQuery extends Static<typeof instanceActiveQuerySchema> {}

export const instanceActiveValidator = getValidator(instanceActiveSchema, dataValidator)
export const instanceActiveQueryValidator = getValidator(instanceActiveQuerySchema, queryValidator)
Loading