diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index a3aca84..c1924e1 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -1,9 +1,13 @@ -import { SOCKET_EVENTS, TPS, PlayerMoveDTO } from '@viper-vortex/shared'; +import { + SOCKET_EVENTS, + TPS, + PlayerMoveDTO, + orbsToPacket, +} from '@viper-vortex/shared'; import { Server } from 'socket.io'; import { Player } from './lib/Player.js'; import { Scene } from './lib/Scene.js'; import { SEND_SCORES_INTERVAL } from './lib/constants.js'; -import { orbsToPacket } from '@viper-vortex/shared/dist/protocol'; const io = new Server({ cors: { diff --git a/packages/server/src/lib/Orb.ts b/packages/server/src/lib/Orb.ts index b82f5d2..ff0b7d2 100644 --- a/packages/server/src/lib/Orb.ts +++ b/packages/server/src/lib/Orb.ts @@ -5,7 +5,7 @@ import { randomDarkColor, colors, } from '@viper-vortex/shared'; -import { uid } from './utils'; +import { uid } from './utils.js'; export class Orb { public readonly id: string; diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index b4ae2b5..47153a4 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts @@ -1,3 +1,4 @@ -export * from "./constants.js"; -export * from "./types.js"; -export * from "./utils.js"; +export * from './constants.js'; +export * from './types.js'; +export * from './utils.js'; +export * from './protocol.js'; diff --git a/packages/shared/src/protocol.ts b/packages/shared/src/protocol.ts index 6e3cfe2..97e913d 100644 --- a/packages/shared/src/protocol.ts +++ b/packages/shared/src/protocol.ts @@ -1,6 +1,6 @@ import { View } from 'structurae'; -import { colors } from './utils'; -import { OrbDTO } from './types'; +import { colors } from './utils.js'; +import { OrbDTO } from './types.js'; const view = new View(); diff --git a/packages/shared/src/utils.ts b/packages/shared/src/utils.ts index 91841c0..0365cb0 100644 --- a/packages/shared/src/utils.ts +++ b/packages/shared/src/utils.ts @@ -1,4 +1,4 @@ -import { PlayerDTO } from './types'; +import { PlayerDTO } from './types.js'; export const colors = [ '#FF0000',