Removed TSC in favour of node's own Typescript exec.
This commit is contained in:
@ -1,17 +1,17 @@
|
||||
import { randomUUID } from 'node:crypto'
|
||||
|
||||
import { Collection, Entity, ManyToOne, OneToMany, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
import { Collection, ManyToOne, OneToMany, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
|
||||
import type { UUID } from '#application/types'
|
||||
import type { CharacterEquipment } from '#entities/characterEquipment'
|
||||
import type { CharacterHair } from '#entities/characterHair'
|
||||
import type { CharacterItem } from '#entities/characterItem'
|
||||
import type { CharacterType } from '#entities/characterType'
|
||||
import type { Chat } from '#entities/chat'
|
||||
import type { Map } from '#entities/map'
|
||||
import type { User } from '#entities/user'
|
||||
|
||||
import { BaseEntity } from '#application/base/baseEntity'
|
||||
import { CharacterEquipment } from '#entities/characterEquipment'
|
||||
import { CharacterHair } from '#entities/characterHair'
|
||||
import { CharacterItem } from '#entities/characterItem'
|
||||
import { CharacterType } from '#entities/characterType'
|
||||
import { Chat } from '#entities/chat'
|
||||
import { Map } from '#entities/map'
|
||||
import { User } from '#entities/user'
|
||||
|
||||
export class BaseCharacter extends BaseEntity {
|
||||
@PrimaryKey()
|
||||
@ -29,7 +29,7 @@ export class BaseCharacter extends BaseEntity {
|
||||
@Property()
|
||||
role = 'player'
|
||||
|
||||
@OneToMany(() => Chat, (chat) => chat.character)
|
||||
@OneToMany({ mappedBy: 'character' })
|
||||
chats = new Collection<Chat>(this)
|
||||
|
||||
// Position - @TODO: Update to spawn point when current map is not found
|
||||
|
@ -3,11 +3,11 @@ import { randomUUID } from 'node:crypto'
|
||||
import { Enum, ManyToOne, PrimaryKey } from '@mikro-orm/core'
|
||||
|
||||
import type { UUID } from '#application/types'
|
||||
import type { Character } from '#entities/character'
|
||||
import type { CharacterItem } from '#entities/characterItem'
|
||||
|
||||
import { BaseEntity } from '#application/base/baseEntity'
|
||||
import { CharacterEquipmentSlotType } from '#application/enums'
|
||||
import { Character } from '#entities/character'
|
||||
import { CharacterItem } from '#entities/characterItem'
|
||||
|
||||
export class BaseCharacterEquipment extends BaseEntity {
|
||||
@PrimaryKey()
|
||||
|
@ -1,13 +1,12 @@
|
||||
import { randomUUID } from 'node:crypto'
|
||||
|
||||
import { Collection, Entity, ManyToOne, OneToMany, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
import { ManyToOne, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
|
||||
import type { UUID } from '#application/types'
|
||||
import type { Character } from '#entities/character'
|
||||
import type { Item } from '#entities/item'
|
||||
|
||||
import { BaseEntity } from '#application/base/baseEntity'
|
||||
import { Character } from '#entities/character'
|
||||
import { CharacterEquipment } from '#entities/characterEquipment'
|
||||
import { Item } from '#entities/item'
|
||||
|
||||
export class BaseCharacterItem extends BaseEntity {
|
||||
@PrimaryKey()
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { randomUUID } from 'node:crypto'
|
||||
|
||||
import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
import { ManyToOne, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
|
||||
import type { UUID } from '#application/types'
|
||||
import type { Character } from '#entities/character'
|
||||
import type { Map } from '#entities/map'
|
||||
|
||||
import { BaseEntity } from '#application/base/baseEntity'
|
||||
import { Character } from '#entities/character'
|
||||
import { Map } from '#entities/map'
|
||||
|
||||
export class BaseChat extends BaseEntity {
|
||||
@PrimaryKey()
|
||||
|
@ -1,13 +1,13 @@
|
||||
import { randomUUID } from 'node:crypto'
|
||||
|
||||
import { Collection, Entity, OneToMany, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
import { Collection, OneToMany, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
|
||||
import type { UUID } from '#application/types'
|
||||
import type { MapEffect } from '#entities/mapEffect'
|
||||
import type { MapEventTile } from '#entities/mapEventTile'
|
||||
import type { PlacedMapObject } from '#entities/placedMapObject'
|
||||
|
||||
import { BaseEntity } from '#application/base/baseEntity'
|
||||
import { MapEffect } from '#entities/mapEffect'
|
||||
import { MapEventTile } from '#entities/mapEventTile'
|
||||
import { PlacedMapObject } from '#entities/placedMapObject'
|
||||
|
||||
export class BaseMap extends BaseEntity {
|
||||
@PrimaryKey()
|
||||
@ -34,13 +34,13 @@ export class BaseMap extends BaseEntity {
|
||||
@Property()
|
||||
updatedAt = new Date()
|
||||
|
||||
@OneToMany(() => MapEffect, (effect) => effect.map, { orphanRemoval: true })
|
||||
@OneToMany({ mappedBy: 'map', orphanRemoval: true })
|
||||
mapEffects = new Collection<MapEffect>(this)
|
||||
|
||||
@OneToMany(() => MapEventTile, (tile) => tile.map, { orphanRemoval: true })
|
||||
@OneToMany({ mappedBy: 'map', orphanRemoval: true })
|
||||
mapEventTiles = new Collection<MapEventTile>(this)
|
||||
|
||||
@OneToMany(() => PlacedMapObject, (placedMapObject) => placedMapObject.map, { orphanRemoval: true })
|
||||
@OneToMany({ mappedBy: 'map', orphanRemoval: true })
|
||||
placedMapObjects = new Collection<PlacedMapObject>(this)
|
||||
|
||||
setId(id: UUID) {
|
||||
|
@ -3,9 +3,9 @@ import { randomUUID } from 'node:crypto'
|
||||
import { ManyToOne, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
|
||||
import type { UUID } from '#application/types'
|
||||
import type { Map } from '#entities/map'
|
||||
|
||||
import { BaseEntity } from '#application/base/baseEntity'
|
||||
import { Map } from '#entities/map'
|
||||
|
||||
export class BaseMapEffect extends BaseEntity {
|
||||
@PrimaryKey()
|
||||
|
@ -1,13 +1,13 @@
|
||||
import { randomUUID } from 'node:crypto'
|
||||
|
||||
import { Entity, Enum, ManyToOne, OneToOne, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
import { Enum, ManyToOne, OneToOne, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
|
||||
import type { UUID } from '#application/types'
|
||||
import type { Map } from '#entities/map'
|
||||
import type { MapEventTileTeleport } from '#entities/mapEventTileTeleport'
|
||||
|
||||
import { BaseEntity } from '#application/base/baseEntity'
|
||||
import { MapEventTileType } from '#application/enums'
|
||||
import { Map } from '#entities/map'
|
||||
import { MapEventTileTeleport } from '#entities/mapEventTileTeleport'
|
||||
|
||||
export class BaseMapEventTile extends BaseEntity {
|
||||
@PrimaryKey()
|
||||
@ -25,7 +25,7 @@ export class BaseMapEventTile extends BaseEntity {
|
||||
@Property()
|
||||
positionY!: number
|
||||
|
||||
@OneToOne(() => MapEventTileTeleport, (teleport) => teleport.mapEventTile, { eager: true })
|
||||
@OneToOne({ eager: true })
|
||||
teleport?: MapEventTileTeleport
|
||||
|
||||
setId(id: UUID) {
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { randomUUID } from 'node:crypto'
|
||||
|
||||
import { Entity, ManyToOne, OneToOne, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
import { ManyToOne, OneToOne, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
|
||||
import type { UUID } from '#application/types'
|
||||
import type { Map } from '#entities/map'
|
||||
import type { MapEventTile } from '#entities/mapEventTile'
|
||||
|
||||
import { BaseEntity } from '#application/base/baseEntity'
|
||||
import { Map } from '#entities/map'
|
||||
import { MapEventTile } from '#entities/mapEventTile'
|
||||
|
||||
export class BaseMapEventTileTeleport extends BaseEntity {
|
||||
@PrimaryKey()
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { randomUUID } from 'node:crypto'
|
||||
|
||||
import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
import { ManyToOne, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
|
||||
import type { UUID } from '#application/types'
|
||||
import type { User } from '#entities/user'
|
||||
|
||||
import { BaseEntity } from '#application/base/baseEntity'
|
||||
import { User } from '#entities/user'
|
||||
|
||||
export class BasePasswordResetToken extends BaseEntity {
|
||||
@PrimaryKey()
|
||||
|
@ -1,14 +1,12 @@
|
||||
import { randomUUID } from 'node:crypto'
|
||||
|
||||
import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
import { ManyToOne, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
|
||||
import type { UUID } from '#application/types'
|
||||
import type { Map } from '#entities/map'
|
||||
import type { MapObject } from '#entities/mapObject'
|
||||
|
||||
import { BaseEntity } from '#application/base/baseEntity'
|
||||
import { Map } from '#entities/map'
|
||||
import { MapObject } from '#entities/mapObject'
|
||||
|
||||
//@TODO : Rename mapObject
|
||||
|
||||
export class BasePlacedMapObject extends BaseEntity {
|
||||
@PrimaryKey()
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { randomUUID } from 'node:crypto'
|
||||
|
||||
import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
import { ManyToOne, PrimaryKey, Property } from '@mikro-orm/core'
|
||||
|
||||
import type { UUID } from '#application/types'
|
||||
import type { Sprite } from '#entities/sprite'
|
||||
|
||||
import { BaseEntity } from '#application/base/baseEntity'
|
||||
import { Sprite } from '#entities/sprite'
|
||||
|
||||
export interface SpriteImage {
|
||||
url: string
|
||||
|
Reference in New Issue
Block a user