@flexmatch-dev/interface
v0.1.9
Published
Shared API interfaces and constants for FlexMatch platform services.
Maintainers
Readme
@flexmatch-dev/interface
FlexMatch 프로젝트의 프론트엔드와 백엔드가 공유하는 API 타입, 페이로드, 상수를 관리하는 경량 패키지입니다.
스크립트
npm run build– TypeScript를dist/폴더로 컴파일합니다.npm run build:watch– 변경 사항을 감지하며 빌드를 실행합니다.
패키지는 prepare 스크립트에 build가 연결되어 있으므로 다른 프로젝트(예: frontend, backend)에서 npm install 시 자동으로 빌드됩니다.
사용 방법
import { USER_ROLES, type LoginRequest } from '@flexmatch-dev/interface';
const request: LoginRequest = {
email: '[email protected]',
password: 'secret',
targetRole: USER_ROLES.ADMIN,
};설치
npm install @flexmatch-dev/interface규칙
constant– 공통으로 사용하는 상수request– API request에 사용하는 body 혹은 query셋response– API response에 사용하는 bodyerror– HTTP exception에 사용하는 에러 코드 및 response의 bodymessage– 소켓 통신에 사용하는 메시지 페이로드interface– 그 외에 공통 인터페이스
배포 가이드
- 버전 태깅
npm version <major|minor|patch> - 빌드 확인
npm run build - 패키지 발행
npm publish --access public
패키지에는 dist/ 산출물만 포함되며, 불필요한 파일은 .npmignore 및 package.json의 files 필드를 통해 제외됩니다.
