refactor: simplify imports for game session token and turn command modules

This commit is contained in:
2025-12-30 04:54:39 +00:00
parent 6fe6d54432
commit 648d186428
5 changed files with 22 additions and 15 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import type { GameSessionTokenPayload } from '@sammo-ts/common/auth/gameToken.js';
import { decryptGameSessionToken } from '@sammo-ts/common/auth/gameToken.js';
import type { GameSessionTokenPayload } from '@sammo-ts/common';
import { decryptGameSessionToken } from '@sammo-ts/common';
import { isAfter, isValid, parseISO } from 'date-fns';
import type { FlushStore } from './flushStore.js';
+1 -1
View File
@@ -1,4 +1,4 @@
import type { GameSessionTokenPayload } from '@sammo-ts/common/auth/gameToken.js';
import type { GameSessionTokenPayload } from '@sammo-ts/common';
import type { TurnDaemonTransport } from './daemon/transport.js';
+1 -4
View File
@@ -4,10 +4,7 @@ import { TRPCError } from '@trpc/server';
import { addHours, addSeconds, isAfter, isValid, parseISO } from 'date-fns';
import { z } from 'zod';
import {
decryptGameSessionToken,
encryptGameSessionToken,
} from '@sammo-ts/common/auth/gameToken.js';
import { decryptGameSessionToken, encryptGameSessionToken } from '@sammo-ts/common';
import { procedure, router } from './trpc.js';
import { toPublicUser } from './auth/userRepository.js';
@@ -5,12 +5,18 @@ export type GeneralTurnCommandKey =
| 'che_의병모집'
| '휴식';
import type * as CommerceInvestmentModule from './che_상업투자.js';
import type * as FireAttackModule from './che_화계.js';
import type * as TalentScoutModule from './che_인재탐색.js';
import type * as VolunteerRecruitModule from './che_의병모집.js';
import type * as RestModule from './휴식.js';
export type GeneralTurnCommandModule =
| typeof import('./che_상업투자.js')
| typeof import('./che_화계.js')
| typeof import('./che_인재탐색.js')
| typeof import('./che_의병모집.js')
| typeof import('./휴식.js');
| typeof CommerceInvestmentModule
| typeof FireAttackModule
| typeof TalentScoutModule
| typeof VolunteerRecruitModule
| typeof RestModule;
export type GeneralTurnCommandImporter = () => Promise<GeneralTurnCommandModule>;
@@ -1,9 +1,13 @@
export type NationTurnCommandKey = '휴식' | 'che_포상' | 'che_발령';
import type * as NationRestModule from './휴식.js';
import type * as AwardModule from './che_포상.js';
import type * as AssignmentModule from './che_발령.js';
export type NationTurnCommandModule =
| typeof import('./휴식.js')
| typeof import('./che_포상.js')
| typeof import('./che_발령.js');
| typeof NationRestModule
| typeof AwardModule
| typeof AssignmentModule;
export type NationTurnCommandImporter = () => Promise<NationTurnCommandModule>;