diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..9bc4705b9 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,15 @@ +node_modules/ +**/node_modules/ + +files/** +dist/** +coverage/** + +REST API test/** +.env +.env.test + +README.md +.gitignore +.dockerignore +.github/** diff --git a/.github/sprint-mission-11_git-action-history.png b/.github/sprint-mission-11_git-action-history.png new file mode 100644 index 000000000..89eb4796a Binary files /dev/null and b/.github/sprint-mission-11_git-action-history.png differ diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml new file mode 100644 index 000000000..c8f5e69c5 --- /dev/null +++ b/.github/workflows/action.yml @@ -0,0 +1,76 @@ +# 자동화 작업 이름 +name : Panda Market CI/CD Test + +# 작업 시점 +on: + push : # 브랜치에 코드가 푸시될 때 + branches : # 1차 : "김지선" 브랜치 / 2차(최종) : "main" 브랜치 설정 + - 김지선-sprint11 # action test용 + - 김지선 + - main + pull_request : # 브랜치에 코드가 머지될 때 + branches : + - 김지선-sprint11 # action test용 + - 김지선 + - main + +# 작업 내용 +jobs: + + test: + # run 환경 + runs-on: ubuntu-latest + + # DB 환경 + services: + postgres: + image: postgres:15 + env: + POSTGRES_USER: ${{ secrets.TEST_DB_USER || 'postgres' }} + POSTGRES_PASSWORD: ${{ secrets.TEST_DB_PASSWORD || 'passwordnd6!' }} + POSTGRES_DB: ${{ secrets.TEST_DB_NAME || 'panda_market' }} + ports: + - 5432:5432 + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + # 공통 환경변수 + env: + # 테스트용 DB : 정보는 git secrets 저장 + # PR 전송을 위해 테스트용 DB 연결 정보 추가 + DATABASE_URL: ${{ secrets.TEST_DATABASE_URL || 'postgresql://postgres:passwordnd6!@localhost:5432/panda_market?schema=public' }} + NODE_ENV: test + + # 테스트용 임시 키 설정 + JWT_ACCESS_TOKEN_SECRET: "test_secret_key_12345" + JWT_REFRESH_TOKEN_SECRET: "test_secret_key_12345" + + # 최종 작업에서는 git secret 사용, 현재는 규격만 맞춤 + AWS_REGION: "ap-northeast-2" + AWS_ACCESS_KEY_ID: "dummy_key" + AWS_SECRET_ACCESS_KEY: "dummy_secret" + AWS_BUCKET_NAME: "test-bucket" + + # test 작업 순서 + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 'lts/*' + + - name: Install dependencies + run: npm install + + - name: Type Check + run: npm run typecheck + + - name: Run Tests + run: | + npx prisma migrate deploy + npm run test \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..a4376f10e --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,60 @@ +# 자동화 작업 이름 +name : Deploy to EC2 panda-market + +# 작업 시점 +on: + push : + branches : + - 김지선 # 1차 : 상위 브랜치 + - main # 2차 : 최종 브랜치 + # pull_request : + # branches : + # - main + +# 작업 내용 +jobs: + + deploy: + # run 환경 + if: github.repository == 'KimDay366/6-sprint-mission' # 현재 개인 레포지토리에만 secret 설정이 되어있어 해당 조건을 추가하였습니다 + runs-on: ubuntu-latest + + # 환경변수 + env: + # DB 정보 + DATABASE_URL: ${{ secrets.DATABASE_URL }} + NODE_ENV: production + + # JWT 설정 + JWT_ACCESS_TOKEN_SECRET: ${{ secrets.JWT_ACCESS_TOKEN_SECRET }} + JWT_REFRESH_TOKEN_SECRET: ${{ secrets.JWT_REFRESH_TOKEN_SECRET }} + + # AWS 설정 + AWS_REGION: ${{ secrets.AWS_REGION }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_BUCKET_NAME: ${{ secrets.AWS_BUCKET_NAME }} + + # EC2 설정 + EC2_HOST: ${{ secrets.EC2_HOST }} + EC2_USER: ${{ secrets.EC2_USER }} + EC2_PRIVATE_KEY: ${{ secrets.EC2_PRIVATE_KEY }} + + + # deploy 작업 순서 + steps: + - name: Deploy to EC2 + uses: appleboy/ssh-action@v0.1.6 + with: + host: ${{ env.EC2_HOST }} + username: ${{ env.EC2_USER }} + key: ${{ env.EC2_PRIVATE_KEY }} + port: 22 + script: | + cd /home/ec2-user/6-sprint-mission + git pull origin ${{ github.ref_name }} # 최신 브랜치 자동 인식 + npm install + npm run build + npm run prisma:deploy + pm2 reload panda-market || pm2 start dist/src/server.js --name "panda-market" + echo "Deployment successful!" \ No newline at end of file diff --git a/.github/workflows/github_Action_workflow.md b/.github/workflows/github_Action_workflow.md new file mode 100644 index 000000000..681cdc851 --- /dev/null +++ b/.github/workflows/github_Action_workflow.md @@ -0,0 +1,14 @@ +### Action push / pull_request 동작 방식 + +1. push : 브랜치에 코드가 푸시될 때 +2. pull_request : 브랜치에 코드가 머지될 때 + + +### 현재 구현 방식에서의 워크플로우 + +1. 로컬에서 git 저장 : git add . & git commit -m "..." +2. 원격 레포지토리로 로컬 저장 내용을 Push : action.yml에 설정 해 둔 "on.push"에 의해 Action이 실행 +3. 공용 레포(학원 레포)로 PR 생성 : action.yml에 설정 해 둔 "on.pull_request"에 의해 Action이 실행 +4. 멘토님의 PR 리뷰 후 승인 시, 공용 레포에 머지 -> deploy.yml에 설정 해 둔 "on.push"에 의해 Action이 실행 + + diff --git a/.gitignore b/.gitignore index 57ecb32fd..91d744470 100644 --- a/.gitignore +++ b/.gitignore @@ -2,13 +2,12 @@ node_modules/ **/node_modules/ -.github/** +# .github/** files/** - -.env - -dist +dist/** +coverage/** REST API test/** .env -.env.test \ No newline at end of file +.env.test + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..232e3d75c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +# Base Build image + +# node 버전 설정 +ARG NODE_VERSION=22.19.0 +FROM node:${NODE_VERSION} + +# 서버 포트 설정 +ENV SERVER_PORT=3000 + +# 디렉토리 설정 +WORKDIR /app + +# 복사할 작업 분할(레이어 캐싱) +# 1) package.json, package-lock.json 복사 +COPY package*.json ./ +RUN npm install + +# 2) prisma 복사 +COPY prisma ./prisma/ +RUN npx prisma generate + +# 3) 나머지 파일 복사 및 빌드 +COPY . . +RUN npm run build + +# 서버 실행 명령어 +CMD ["node", "dist/src/server.js"] \ No newline at end of file diff --git a/README.md b/README.md index 167fa4874..f4e788e58 100644 --- a/README.md +++ b/README.md @@ -2,61 +2,28 @@ ### [ 목표 ] -- 판다마켓 서비스를 AWS로 배포하기 -- AWS S3 적용 -- AWS RDS 적용 -- AWS EC2에 Express 서버 배포하기 -- (심화) 프로세스 매니저 적용 -- (심화) 리버스 프록시 적용 +- Github Actions로 테스트, 배포 자동화 +- Docker 이미지 만들기 ### [ 작업 내용 ] ### 1. 기본 요구사항 -- [x] 프로젝트에 프로덕션 배포를 위한 환경 변수 설정 +1) Github Actions 활용 + - [x] 브랜치에 pull request가 발생하면 테스트를 실행하는 액션을 구현 + - [x] main 브랜치에 push가 발생하면 AWS 배포를 진행하는 액션을 구현 : 현재 개발 환경을 고려하여 main 브랜치 뿐만 아니라 개별 브랜치인 "김지선" 브랜치에도 동일하게 적용 + - [x] 개인 Github 리포지터리에서 Actions 동작을 확인 : ![GitHub Actions 전체 동작 내용](/.github/sprint-mission-11_git-action-history.png) -1) AWS S3 적용 - - [x] AWS S3 버킷 생성 및 퍼블릭 액세스 허용 - - [x] 일반 사용자가 S3 업로드된 파일에 접근할 수 있도록 S3 버킷 정책 설정 - - [x] AWS EC2에서 AWS S3를 사용하기 위한 액세스 키를 AWS IAM에서 발급 - - [x] 프로덕션 환경에서는 파일 업로드에 AWS S3를 사용하도록 구현 수정 : /src/controllers/image.s3.controller.ts -2) AWS RDS 적용 - - [x] AWS RDS 프리티어에 해당하는 인스턴스 생성 - - [x] RDS 인스턴스에 대한 보안 그룹 설정 - - [x] 프로덕션 환경에서는 Prisma에 프로젝트 데이터베이스와 연결하도록 수정 -3) AWS EC2에 Express 서버 배포하기 - - [x] AWS EC2 프리티어에 해당하는 인스턴스 생성 - - [x] SSH를 사용해 EC2 인스턴스에 접속해 Express 서버 배포 +2) Docker 이미지 만들기 + - [x] Dockerfile 작성 + - [x] Docker의 Volume을 활용하여 파일 업로드 처리 : ![Docker Volume을 활용한 파일 업로드 처리](infra/docker/sprint-mission-11_docker_volume.png) + - [x] 데이터베이스는 Postgres 이미지를 사용해 연결 : ![Postgres 이미지 사용](infra/docker/sprint-mission-11_docker_terminal.png) + - [x] 실행된 Express 서버 컨테이너는 호스트 머신에서 3000번 포트로 접근 가능하도록 구현 : ![Express 서버 컨테이너](infra/docker/sprint-mission-11_docker_localhost.png) -### 2. 심화 요구사항 - -- [x] EC2 인스턴스에서 pm2 프로세스 매니저를 사용하여 애플리케이션을 실행 -- [x] EC2 인스턴스에서 nginx 리버스 프록시를 80번 포트로 설정 - - -## [제출 파일 목록] - -- [x] 접속 가능한 API 엔드포인트 주소 : http://13.125.62.54 -- [x] AWS S3 버킷의 정책 설정 : /infra/S3/policy.png -- [x] AWS RDS 인스턴스의 보안 그룹 설정 - 1. 인바운드 : /infra/RDS/secure-group-inbound.png - 2. 아웃바운드 : /infra/RDS/secure-group-outbound.png -- [x] AWS EC2 인스턴스의 보안 그룹 설정 - 1. 인바운드 : /infra/EC2/secure-group-inbound.png - 2. 아웃바운드 : /infra/EC2/secure-group-outbound.png - 3. 초기 / 최종 URL 비교 : /infra/EC2/secure-group-url.png -- [x] pm2 실행 명령어 : /infra/ec2/start.sh -- [ ] pm2 실행 설정 파일 : /infra/ec2/ecosystem.config.js -> 별도의 설정 없이 실행 -- [x] nginx 실행 설정 파일 : /infra/ec2/nginx.conf - -



+
## 멘토에게 -- 이번 미션은 전적으로 AI의 도움을 받아 진행하였으며, images.s3.controller.ts 파일은 Ai가 작성하고 검토만 진행하였습니다 (파일 라우터를 초급 프로젝트 때부터 공부하고 있지만, 여전히 전체 로직이 이해가지 않습니다 😭ㅎㅎ) -- 제출 요청 파일 외에도 S3 테스트를 진행한 결과를 함께 제출합니다(자랑용입니다. 작업 도중 문제가 생겨서 좀 헤멧지만 그래도 성공 했다는게 좀 뿌듯해서요😁) - 1. 터미널을 사용하여 이미지 업로드 : /infra/S3/img_test_terminal.png - 2. 터미널 명령어 : /infra/S3/imgUpload.s3.sh - 3. AWS S3 버킷에 업로드된 이미지 목록 : /infra/S3/img_test_s3.png -- 개인적인 일도 있고해서 미션 8,9에 대한 멘토님 코멘트를 신규 코드에 적용 할 시간이 없네요. 신경 써서 알려주셨는데 죄송합니다😢 +- 미션 8, 9, 10에 대한 멘토님 코멘트를 적용하며, 전체 코드를 다시 확인하여 리팩토링 진행하였습니다 😁 +- 수업을 많이 빠져서 진짜 정신없이 작업 했습니다. 특히, Docker 부분은 정말 개념만 간단히 알고 작업한거라 LMS 강의를 여러번 복습 해야할거 같습니다. \ No newline at end of file diff --git a/coverage/clover.xml b/coverage/clover.xml deleted file mode 100644 index f95fa7c91..000000000 --- a/coverage/clover.xml +++ /dev/null @@ -1,1028 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/coverage/coverage-final.json b/coverage/coverage-final.json deleted file mode 100644 index 0cfa71df3..000000000 --- a/coverage/coverage-final.json +++ /dev/null @@ -1,52 +0,0 @@ -{"/home/kimjs9105/nb6-sprint-mission/src/app.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/app.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":30}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":24}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":24}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":41}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":58}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":54}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":54}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":54}},"8":{"start":{"line":9,"column":0},"end":{"line":9,"column":50}},"9":{"start":{"line":10,"column":0},"end":{"line":10,"column":47}},"10":{"start":{"line":11,"column":0},"end":{"line":11,"column":48}},"11":{"start":{"line":12,"column":0},"end":{"line":12,"column":63}},"12":{"start":{"line":13,"column":0},"end":{"line":13,"column":92}},"13":{"start":{"line":15,"column":12},"end":{"line":15,"column":21}},"14":{"start":{"line":17,"column":0},"end":{"line":17,"column":16}},"15":{"start":{"line":18,"column":0},"end":{"line":18,"column":24}},"16":{"start":{"line":19,"column":0},"end":{"line":19,"column":24}},"17":{"start":{"line":20,"column":0},"end":{"line":20,"column":79}},"18":{"start":{"line":22,"column":0},"end":{"line":22,"column":37}},"19":{"start":{"line":23,"column":0},"end":{"line":23,"column":37}},"20":{"start":{"line":24,"column":0},"end":{"line":24,"column":37}},"21":{"start":{"line":25,"column":0},"end":{"line":25,"column":33}},"22":{"start":{"line":26,"column":0},"end":{"line":26,"column":29}},"23":{"start":{"line":27,"column":0},"end":{"line":27,"column":31}},"24":{"start":{"line":28,"column":0},"end":{"line":28,"column":46}},"25":{"start":{"line":30,"column":0},"end":{"line":30,"column":32}},"26":{"start":{"line":31,"column":0},"end":{"line":31,"column":28}},"27":{"start":{"line":33,"column":0},"end":{"line":33,"column":19}}},"fnMap":{},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":5,"8":5,"9":5,"10":5,"11":5,"12":5,"13":5,"14":5,"15":5,"16":5,"17":5,"18":5,"19":5,"20":5,"21":5,"22":5,"23":5,"24":5,"25":5,"26":5,"27":5},"f":{},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/controllers/article.controller.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/controllers/article.controller.ts","statementMap":{"0":{"start":{"line":14,"column":0},"end":{"line":14,"column":22}},"1":{"start":{"line":23,"column":0},"end":{"line":23,"column":22}},"2":{"start":{"line":29,"column":0},"end":{"line":29,"column":22}},"3":{"start":{"line":39,"column":0},"end":{"line":39,"column":22}},"4":{"start":{"line":45,"column":0},"end":{"line":45,"column":22}},"5":{"start":{"line":51,"column":0},"end":{"line":51,"column":22}},"6":{"start":{"line":62,"column":0},"end":{"line":62,"column":22}},"7":{"start":{"line":72,"column":0},"end":{"line":72,"column":22}},"8":{"start":{"line":78,"column":0},"end":{"line":78,"column":22}},"9":{"start":{"line":2,"column":0},"end":{"line":2,"column":37}},"10":{"start":{"line":3,"column":0},"end":{"line":3,"column":58}},"11":{"start":{"line":4,"column":0},"end":{"line":4,"column":null}},"12":{"start":{"line":9,"column":0},"end":{"line":9,"column":95}},"13":{"start":{"line":10,"column":0},"end":{"line":10,"column":61}},"14":{"start":{"line":11,"column":0},"end":{"line":11,"column":61}},"15":{"start":{"line":12,"column":0},"end":{"line":12,"column":55}},"16":{"start":{"line":15,"column":15},"end":{"line":15,"column":56}},"17":{"start":{"line":16,"column":18},"end":{"line":18,"column":null}},"18":{"start":{"line":20,"column":2},"end":{"line":20,"column":32}},"19":{"start":{"line":24,"column":17},"end":{"line":24,"column":51}},"20":{"start":{"line":25,"column":18},"end":{"line":25,"column":54}},"21":{"start":{"line":26,"column":2},"end":{"line":26,"column":20}},"22":{"start":{"line":30,"column":17},"end":{"line":30,"column":51}},"23":{"start":{"line":31,"column":15},"end":{"line":31,"column":56}},"24":{"start":{"line":32,"column":25},"end":{"line":34,"column":null}},"25":{"start":{"line":36,"column":2},"end":{"line":36,"column":27}},"26":{"start":{"line":40,"column":17},"end":{"line":40,"column":51}},"27":{"start":{"line":41,"column":2},"end":{"line":41,"column":55}},"28":{"start":{"line":42,"column":2},"end":{"line":42,"column":25}},"29":{"start":{"line":46,"column":17},"end":{"line":46,"column":62}},"30":{"start":{"line":47,"column":17},"end":{"line":47,"column":61}},"31":{"start":{"line":48,"column":2},"end":{"line":48,"column":19}},"32":{"start":{"line":52,"column":28},"end":{"line":52,"column":62}},"33":{"start":{"line":53,"column":22},"end":{"line":53,"column":63}},"34":{"start":{"line":54,"column":25},"end":{"line":58,"column":4}},"35":{"start":{"line":59,"column":2},"end":{"line":59,"column":39}},"36":{"start":{"line":63,"column":28},"end":{"line":63,"column":62}},"37":{"start":{"line":64,"column":28},"end":{"line":64,"column":73}},"38":{"start":{"line":65,"column":17},"end":{"line":68,"column":4}},"39":{"start":{"line":69,"column":2},"end":{"line":69,"column":19}},"40":{"start":{"line":73,"column":28},"end":{"line":73,"column":62}},"41":{"start":{"line":74,"column":2},"end":{"line":74,"column":56}},"42":{"start":{"line":75,"column":2},"end":{"line":75,"column":25}},"43":{"start":{"line":79,"column":28},"end":{"line":79,"column":62}},"44":{"start":{"line":80,"column":2},"end":{"line":80,"column":56}},"45":{"start":{"line":81,"column":2},"end":{"line":81,"column":25}}},"fnMap":{"0":{"name":"createArticle","decl":{"start":{"line":14,"column":22},"end":{"line":14,"column":35}},"loc":{"start":{"line":14,"column":63},"end":{"line":21,"column":null}}},"1":{"name":"getArticle","decl":{"start":{"line":23,"column":22},"end":{"line":23,"column":32}},"loc":{"start":{"line":23,"column":60},"end":{"line":27,"column":null}}},"2":{"name":"updateArticle","decl":{"start":{"line":29,"column":22},"end":{"line":29,"column":35}},"loc":{"start":{"line":29,"column":63},"end":{"line":37,"column":null}}},"3":{"name":"deleteArticle","decl":{"start":{"line":39,"column":22},"end":{"line":39,"column":35}},"loc":{"start":{"line":39,"column":63},"end":{"line":43,"column":null}}},"4":{"name":"getArticleList","decl":{"start":{"line":45,"column":22},"end":{"line":45,"column":36}},"loc":{"start":{"line":45,"column":64},"end":{"line":49,"column":null}}},"5":{"name":"createComment","decl":{"start":{"line":51,"column":22},"end":{"line":51,"column":35}},"loc":{"start":{"line":51,"column":63},"end":{"line":60,"column":null}}},"6":{"name":"getCommentList","decl":{"start":{"line":62,"column":22},"end":{"line":62,"column":36}},"loc":{"start":{"line":62,"column":64},"end":{"line":70,"column":null}}},"7":{"name":"createLike","decl":{"start":{"line":72,"column":22},"end":{"line":72,"column":32}},"loc":{"start":{"line":72,"column":60},"end":{"line":76,"column":null}}},"8":{"name":"deleteLike","decl":{"start":{"line":78,"column":22},"end":{"line":78,"column":32}},"loc":{"start":{"line":78,"column":60},"end":{"line":82,"column":null}}}},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":5,"8":5,"9":5,"10":5,"11":5,"12":5,"13":5,"14":5,"15":5,"16":14,"17":12,"18":12,"19":4,"20":4,"21":2,"22":5,"23":5,"24":5,"25":3,"26":3,"27":3,"28":1,"29":8,"30":8,"31":8,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0},"f":{"0":14,"1":4,"2":5,"3":3,"4":8,"5":0,"6":0,"7":0,"8":0},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/controllers/auth.controller.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/controllers/auth.controller.ts","statementMap":{"0":{"start":{"line":8,"column":0},"end":{"line":8,"column":22}},"1":{"start":{"line":14,"column":0},"end":{"line":14,"column":22}},"2":{"start":{"line":21,"column":0},"end":{"line":21,"column":22}},"3":{"start":{"line":26,"column":0},"end":{"line":26,"column":22}},"4":{"start":{"line":2,"column":0},"end":{"line":2,"column":37}},"5":{"start":{"line":3,"column":0},"end":{"line":3,"column":97}},"6":{"start":{"line":4,"column":0},"end":{"line":4,"column":77}},"7":{"start":{"line":5,"column":0},"end":{"line":5,"column":54}},"8":{"start":{"line":6,"column":0},"end":{"line":6,"column":53}},"9":{"start":{"line":9,"column":15},"end":{"line":9,"column":51}},"10":{"start":{"line":10,"column":15},"end":{"line":10,"column":47}},"11":{"start":{"line":11,"column":2},"end":{"line":11,"column":46}},"12":{"start":{"line":15,"column":15},"end":{"line":15,"column":48}},"13":{"start":{"line":16,"column":40},"end":{"line":16,"column":69}},"14":{"start":{"line":17,"column":2},"end":{"line":17,"column":50}},"15":{"start":{"line":18,"column":2},"end":{"line":18,"column":25}},"16":{"start":{"line":22,"column":2},"end":{"line":22,"column":25}},"17":{"start":{"line":23,"column":2},"end":{"line":23,"column":25}},"18":{"start":{"line":27,"column":23},"end":{"line":27,"column":61}},"19":{"start":{"line":29,"column":4},"end":{"line":29,"column":48}},"20":{"start":{"line":30,"column":2},"end":{"line":30,"column":53}},"21":{"start":{"line":31,"column":2},"end":{"line":31,"column":25}},"22":{"start":{"line":35,"column":2},"end":{"line":39,"column":5}},"23":{"start":{"line":40,"column":2},"end":{"line":45,"column":5}},"24":{"start":{"line":49,"column":2},"end":{"line":49,"column":44}},"25":{"start":{"line":50,"column":2},"end":{"line":50,"column":45}}},"fnMap":{"0":{"name":"register","decl":{"start":{"line":8,"column":22},"end":{"line":8,"column":30}},"loc":{"start":{"line":8,"column":58},"end":{"line":12,"column":null}}},"1":{"name":"login","decl":{"start":{"line":14,"column":22},"end":{"line":14,"column":27}},"loc":{"start":{"line":14,"column":55},"end":{"line":19,"column":null}}},"2":{"name":"logout","decl":{"start":{"line":21,"column":22},"end":{"line":21,"column":28}},"loc":{"start":{"line":21,"column":56},"end":{"line":24,"column":null}}},"3":{"name":"refreshToken","decl":{"start":{"line":26,"column":22},"end":{"line":26,"column":34}},"loc":{"start":{"line":26,"column":62},"end":{"line":32,"column":null}}},"4":{"name":"setTokenCookies","decl":{"start":{"line":34,"column":9},"end":{"line":34,"column":24}},"loc":{"start":{"line":34,"column":81},"end":{"line":46,"column":1}}},"5":{"name":"clearTokenCookies","decl":{"start":{"line":48,"column":9},"end":{"line":48,"column":26}},"loc":{"start":{"line":48,"column":40},"end":{"line":51,"column":1}}}},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":5,"8":5,"9":90,"10":86,"11":85,"12":76,"13":73,"14":71,"15":71,"16":1,"17":1,"18":0,"19":0,"20":0,"21":0,"22":71,"23":71,"24":1,"25":1},"f":{"0":90,"1":76,"2":1,"3":0,"4":71,"5":1},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/controllers/comment.controller.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/controllers/comment.controller.ts","statementMap":{"0":{"start":{"line":7,"column":0},"end":{"line":7,"column":22}},"1":{"start":{"line":14,"column":0},"end":{"line":14,"column":22}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":37}},"3":{"start":{"line":3,"column":0},"end":{"line":3,"column":67}},"4":{"start":{"line":4,"column":0},"end":{"line":4,"column":58}},"5":{"start":{"line":5,"column":0},"end":{"line":5,"column":61}},"6":{"start":{"line":8,"column":17},"end":{"line":8,"column":51}},"7":{"start":{"line":9,"column":22},"end":{"line":9,"column":63}},"8":{"start":{"line":10,"column":25},"end":{"line":10,"column":86}},"9":{"start":{"line":11,"column":2},"end":{"line":11,"column":27}},"10":{"start":{"line":15,"column":17},"end":{"line":15,"column":51}},"11":{"start":{"line":16,"column":2},"end":{"line":16,"column":55}},"12":{"start":{"line":17,"column":2},"end":{"line":17,"column":25}}},"fnMap":{"0":{"name":"updateComment","decl":{"start":{"line":7,"column":22},"end":{"line":7,"column":35}},"loc":{"start":{"line":7,"column":63},"end":{"line":12,"column":null}}},"1":{"name":"deleteComment","decl":{"start":{"line":14,"column":22},"end":{"line":14,"column":35}},"loc":{"start":{"line":14,"column":63},"end":{"line":18,"column":null}}}},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0},"f":{"0":0,"1":0},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/controllers/error.controller.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/controllers/error.controller.ts","statementMap":{"0":{"start":{"line":8,"column":0},"end":{"line":8,"column":16}},"1":{"start":{"line":16,"column":0},"end":{"line":16,"column":16}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":42}},"3":{"start":{"line":3,"column":0},"end":{"line":3,"column":58}},"4":{"start":{"line":4,"column":0},"end":{"line":4,"column":54}},"5":{"start":{"line":5,"column":0},"end":{"line":5,"column":62}},"6":{"start":{"line":6,"column":0},"end":{"line":6,"column":56}},"7":{"start":{"line":13,"column":2},"end":{"line":13,"column":49}},"8":{"start":{"line":23,"column":2},"end":{"line":26,"column":3}},"9":{"start":{"line":24,"column":4},"end":{"line":24,"column":51}},"10":{"start":{"line":25,"column":4},"end":{"line":25,"column":11}},"11":{"start":{"line":29,"column":2},"end":{"line":32,"column":3}},"12":{"start":{"line":30,"column":4},"end":{"line":30,"column":54}},"13":{"start":{"line":31,"column":4},"end":{"line":31,"column":11}},"14":{"start":{"line":35,"column":2},"end":{"line":39,"column":3}},"15":{"start":{"line":36,"column":4},"end":{"line":36,"column":23}},"16":{"start":{"line":37,"column":4},"end":{"line":37,"column":64}},"17":{"start":{"line":38,"column":4},"end":{"line":38,"column":11}},"18":{"start":{"line":42,"column":2},"end":{"line":45,"column":3}},"19":{"start":{"line":43,"column":4},"end":{"line":43,"column":51}},"20":{"start":{"line":44,"column":4},"end":{"line":44,"column":11}},"21":{"start":{"line":47,"column":2},"end":{"line":50,"column":3}},"22":{"start":{"line":48,"column":4},"end":{"line":48,"column":51}},"23":{"start":{"line":49,"column":4},"end":{"line":49,"column":11}},"24":{"start":{"line":52,"column":2},"end":{"line":55,"column":3}},"25":{"start":{"line":53,"column":4},"end":{"line":53,"column":51}},"26":{"start":{"line":54,"column":4},"end":{"line":54,"column":11}},"27":{"start":{"line":57,"column":2},"end":{"line":57,"column":21}},"28":{"start":{"line":58,"column":2},"end":{"line":58,"column":61}}},"fnMap":{"0":{"name":"defaultNotFoundHandler","decl":{"start":{"line":8,"column":16},"end":{"line":8,"column":38}},"loc":{"start":{"line":11,"column":20},"end":{"line":14,"column":1}}},"1":{"name":"globalErrorHandler","decl":{"start":{"line":16,"column":16},"end":{"line":16,"column":34}},"loc":{"start":{"line":20,"column":20},"end":{"line":59,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":23,"column":2},"end":{"line":26,"column":3}},"type":"if","locations":[{"start":{"line":23,"column":2},"end":{"line":26,"column":3}},{"start":{},"end":{}}]},"1":{"loc":{"start":{"line":23,"column":6},"end":{"line":23,"column":66}},"type":"binary-expr","locations":[{"start":{"line":23,"column":6},"end":{"line":23,"column":32}},{"start":{"line":23,"column":36},"end":{"line":23,"column":66}}]},"2":{"loc":{"start":{"line":29,"column":2},"end":{"line":32,"column":3}},"type":"if","locations":[{"start":{"line":29,"column":2},"end":{"line":32,"column":3}},{"start":{},"end":{}}]},"3":{"loc":{"start":{"line":29,"column":6},"end":{"line":29,"column":49}},"type":"binary-expr","locations":[{"start":{"line":29,"column":6},"end":{"line":29,"column":32}},{"start":{"line":29,"column":36},"end":{"line":29,"column":49}}]},"4":{"loc":{"start":{"line":35,"column":2},"end":{"line":39,"column":3}},"type":"if","locations":[{"start":{"line":35,"column":2},"end":{"line":39,"column":3}},{"start":{},"end":{}}]},"5":{"loc":{"start":{"line":42,"column":2},"end":{"line":45,"column":3}},"type":"if","locations":[{"start":{"line":42,"column":2},"end":{"line":45,"column":3}},{"start":{},"end":{}}]},"6":{"loc":{"start":{"line":47,"column":2},"end":{"line":50,"column":3}},"type":"if","locations":[{"start":{"line":47,"column":2},"end":{"line":50,"column":3}},{"start":{},"end":{}}]},"7":{"loc":{"start":{"line":52,"column":2},"end":{"line":55,"column":3}},"type":"if","locations":[{"start":{"line":52,"column":2},"end":{"line":55,"column":3}},{"start":{},"end":{}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":0,"8":27,"9":15,"10":15,"11":12,"12":0,"13":0,"14":12,"15":0,"16":0,"17":0,"18":12,"19":8,"20":8,"21":4,"22":0,"23":0,"24":4,"25":4,"26":4,"27":0,"28":0},"f":{"0":0,"1":27},"b":{"0":[15,12],"1":[27,15],"2":[0,12],"3":[12,0],"4":[0,12],"5":[8,4],"6":[0,4],"7":[4,0]}} -,"/home/kimjs9105/nb6-sprint-mission/src/controllers/image.controller.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/controllers/image.controller.ts","statementMap":{"0":{"start":{"line":37,"column":0},"end":{"line":37,"column":22}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":28}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":24}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":36}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":58}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":58}},"6":{"start":{"line":8,"column":27},"end":{"line":8,"column":67}},"7":{"start":{"line":9,"column":24},"end":{"line":9,"column":39}},"8":{"start":{"line":11,"column":13},"end":{"line":35,"column":3}},"9":{"start":{"line":14,"column":6},"end":{"line":14,"column":28}},"10":{"start":{"line":17,"column":18},"end":{"line":17,"column":49}},"11":{"start":{"line":18,"column":23},"end":{"line":18,"column":42}},"12":{"start":{"line":19,"column":6},"end":{"line":19,"column":25}},"13":{"start":{"line":28,"column":4},"end":{"line":31,"column":5}},"14":{"start":{"line":29,"column":18},"end":{"line":29,"column":76}},"15":{"start":{"line":30,"column":6},"end":{"line":30,"column":21}},"16":{"start":{"line":33,"column":4},"end":{"line":33,"column":19}},"17":{"start":{"line":38,"column":15},"end":{"line":38,"column":30}},"18":{"start":{"line":39,"column":2},"end":{"line":41,"column":3}},"19":{"start":{"line":40,"column":4},"end":{"line":40,"column":50}},"20":{"start":{"line":42,"column":2},"end":{"line":44,"column":3}},"21":{"start":{"line":43,"column":4},"end":{"line":43,"column":50}},"22":{"start":{"line":45,"column":19},"end":{"line":45,"column":66}},"23":{"start":{"line":46,"column":14},"end":{"line":46,"column":34}},"24":{"start":{"line":47,"column":2},"end":{"line":47,"column":20}}},"fnMap":{"0":{"name":"(anonymous_8)","decl":{"start":{"line":13,"column":4},"end":{"line":13,"column":15}},"loc":{"start":{"line":13,"column":29},"end":{"line":15,"column":5}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":16,"column":4},"end":{"line":16,"column":12}},"loc":{"start":{"line":16,"column":26},"end":{"line":20,"column":5}}},"2":{"name":"(anonymous_10)","decl":{"start":{"line":27,"column":14},"end":{"line":27,"column":24}},"loc":{"start":{"line":27,"column":37},"end":{"line":34,"column":3}}},"3":{"name":"uploadImage","decl":{"start":{"line":37,"column":22},"end":{"line":37,"column":33}},"loc":{"start":{"line":37,"column":61},"end":{"line":48,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":28,"column":4},"end":{"line":31,"column":5}},"type":"if","locations":[{"start":{"line":28,"column":4},"end":{"line":31,"column":5}},{"start":{},"end":{}}]},"1":{"loc":{"start":{"line":39,"column":2},"end":{"line":41,"column":3}},"type":"if","locations":[{"start":{"line":39,"column":2},"end":{"line":41,"column":3}},{"start":{},"end":{}}]},"2":{"loc":{"start":{"line":42,"column":2},"end":{"line":44,"column":3}},"type":"if","locations":[{"start":{"line":42,"column":2},"end":{"line":44,"column":3}},{"start":{},"end":{}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":5,"8":5,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0},"f":{"0":0,"1":0,"2":0,"3":0},"b":{"0":[0,0],"1":[0,0],"2":[0,0]}} -,"/home/kimjs9105/nb6-sprint-mission/src/controllers/notification.controller.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/controllers/notification.controller.ts","statementMap":{"0":{"start":{"line":6,"column":0},"end":{"line":6,"column":22}},"1":{"start":{"line":13,"column":0},"end":{"line":13,"column":22}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":37}},"3":{"start":{"line":3,"column":0},"end":{"line":3,"column":58}},"4":{"start":{"line":4,"column":0},"end":{"line":4,"column":70}},"5":{"start":{"line":7,"column":17},"end":{"line":7,"column":28}},"6":{"start":{"line":8,"column":28},"end":{"line":8,"column":81}},"7":{"start":{"line":10,"column":2},"end":{"line":10,"column":42}},"8":{"start":{"line":14,"column":17},"end":{"line":14,"column":51}},"9":{"start":{"line":15,"column":2},"end":{"line":15,"column":18}},"10":{"start":{"line":16,"column":33},"end":{"line":16,"column":85}},"11":{"start":{"line":18,"column":2},"end":{"line":18,"column":47}}},"fnMap":{"0":{"name":"getNotifications","decl":{"start":{"line":6,"column":22},"end":{"line":6,"column":38}},"loc":{"start":{"line":6,"column":66},"end":{"line":11,"column":null}}},"1":{"name":"updateNotification","decl":{"start":{"line":13,"column":22},"end":{"line":13,"column":40}},"loc":{"start":{"line":13,"column":68},"end":{"line":19,"column":null}}}},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0},"f":{"0":0,"1":0},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/controllers/product.controller.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/controllers/product.controller.ts","statementMap":{"0":{"start":{"line":14,"column":0},"end":{"line":14,"column":22}},"1":{"start":{"line":23,"column":0},"end":{"line":23,"column":22}},"2":{"start":{"line":29,"column":0},"end":{"line":29,"column":22}},"3":{"start":{"line":39,"column":0},"end":{"line":39,"column":22}},"4":{"start":{"line":45,"column":0},"end":{"line":45,"column":22}},"5":{"start":{"line":53,"column":0},"end":{"line":53,"column":22}},"6":{"start":{"line":64,"column":0},"end":{"line":64,"column":22}},"7":{"start":{"line":71,"column":0},"end":{"line":71,"column":22}},"8":{"start":{"line":77,"column":0},"end":{"line":77,"column":22}},"9":{"start":{"line":2,"column":0},"end":{"line":2,"column":37}},"10":{"start":{"line":3,"column":0},"end":{"line":3,"column":58}},"11":{"start":{"line":4,"column":0},"end":{"line":4,"column":null}},"12":{"start":{"line":9,"column":0},"end":{"line":9,"column":95}},"13":{"start":{"line":10,"column":0},"end":{"line":10,"column":61}},"14":{"start":{"line":11,"column":0},"end":{"line":11,"column":61}},"15":{"start":{"line":12,"column":0},"end":{"line":12,"column":63}},"16":{"start":{"line":15,"column":15},"end":{"line":15,"column":56}},"17":{"start":{"line":16,"column":25},"end":{"line":18,"column":null}},"18":{"start":{"line":20,"column":2},"end":{"line":20,"column":39}},"19":{"start":{"line":24,"column":17},"end":{"line":24,"column":51}},"20":{"start":{"line":25,"column":18},"end":{"line":25,"column":54}},"21":{"start":{"line":26,"column":2},"end":{"line":26,"column":32}},"22":{"start":{"line":30,"column":17},"end":{"line":30,"column":51}},"23":{"start":{"line":31,"column":15},"end":{"line":31,"column":56}},"24":{"start":{"line":32,"column":25},"end":{"line":34,"column":null}},"25":{"start":{"line":36,"column":2},"end":{"line":36,"column":39}},"26":{"start":{"line":40,"column":17},"end":{"line":40,"column":51}},"27":{"start":{"line":41,"column":2},"end":{"line":41,"column":55}},"28":{"start":{"line":42,"column":2},"end":{"line":42,"column":25}},"29":{"start":{"line":46,"column":17},"end":{"line":46,"column":62}},"30":{"start":{"line":47,"column":17},"end":{"line":49,"column":4}},"31":{"start":{"line":50,"column":2},"end":{"line":50,"column":31}},"32":{"start":{"line":54,"column":28},"end":{"line":54,"column":62}},"33":{"start":{"line":55,"column":22},"end":{"line":55,"column":63}},"34":{"start":{"line":56,"column":25},"end":{"line":60,"column":4}},"35":{"start":{"line":61,"column":2},"end":{"line":61,"column":39}},"36":{"start":{"line":65,"column":28},"end":{"line":65,"column":62}},"37":{"start":{"line":66,"column":17},"end":{"line":66,"column":62}},"38":{"start":{"line":67,"column":17},"end":{"line":67,"column":83}},"39":{"start":{"line":68,"column":2},"end":{"line":68,"column":19}},"40":{"start":{"line":72,"column":28},"end":{"line":72,"column":62}},"41":{"start":{"line":73,"column":2},"end":{"line":73,"column":64}},"42":{"start":{"line":74,"column":2},"end":{"line":74,"column":25}},"43":{"start":{"line":78,"column":28},"end":{"line":78,"column":62}},"44":{"start":{"line":79,"column":2},"end":{"line":79,"column":64}},"45":{"start":{"line":80,"column":2},"end":{"line":80,"column":25}}},"fnMap":{"0":{"name":"createProduct","decl":{"start":{"line":14,"column":22},"end":{"line":14,"column":35}},"loc":{"start":{"line":14,"column":63},"end":{"line":21,"column":null}}},"1":{"name":"getProduct","decl":{"start":{"line":23,"column":22},"end":{"line":23,"column":32}},"loc":{"start":{"line":23,"column":60},"end":{"line":27,"column":null}}},"2":{"name":"updateProduct","decl":{"start":{"line":29,"column":22},"end":{"line":29,"column":35}},"loc":{"start":{"line":29,"column":63},"end":{"line":37,"column":null}}},"3":{"name":"deleteProduct","decl":{"start":{"line":39,"column":22},"end":{"line":39,"column":35}},"loc":{"start":{"line":39,"column":63},"end":{"line":43,"column":null}}},"4":{"name":"getProductList","decl":{"start":{"line":45,"column":22},"end":{"line":45,"column":36}},"loc":{"start":{"line":45,"column":64},"end":{"line":51,"column":null}}},"5":{"name":"createComment","decl":{"start":{"line":53,"column":22},"end":{"line":53,"column":35}},"loc":{"start":{"line":53,"column":63},"end":{"line":62,"column":null}}},"6":{"name":"getCommentList","decl":{"start":{"line":64,"column":22},"end":{"line":64,"column":36}},"loc":{"start":{"line":64,"column":64},"end":{"line":69,"column":null}}},"7":{"name":"createFavorite","decl":{"start":{"line":71,"column":22},"end":{"line":71,"column":36}},"loc":{"start":{"line":71,"column":64},"end":{"line":75,"column":null}}},"8":{"name":"deleteFavorite","decl":{"start":{"line":77,"column":22},"end":{"line":77,"column":36}},"loc":{"start":{"line":77,"column":64},"end":{"line":81,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":48,"column":12},"end":{"line":48,"column":24}},"type":"cond-expr","locations":[{"start":{"line":48,"column":20},"end":{"line":48,"column":22}},{"start":{"line":48,"column":20},"end":{"line":48,"column":24}}]},"1":{"loc":{"start":{"line":48,"column":12},"end":{"line":48,"column":22}},"type":"binary-expr","locations":[{"start":{"line":48,"column":12},"end":{"line":48,"column":22}},{"start":{"line":48,"column":20},"end":{"line":48,"column":22}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":5,"8":5,"9":5,"10":5,"11":5,"12":5,"13":5,"14":5,"15":5,"16":17,"17":14,"18":14,"19":4,"20":4,"21":2,"22":7,"23":7,"24":7,"25":5,"26":3,"27":3,"28":1,"29":8,"30":8,"31":8,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0},"f":{"0":17,"1":4,"2":7,"3":3,"4":8,"5":0,"6":0,"7":0,"8":0},"b":{"0":[6,2],"1":[8,8]}} -,"/home/kimjs9105/nb6-sprint-mission/src/controllers/user.controller.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/controllers/user.controller.ts","statementMap":{"0":{"start":{"line":13,"column":0},"end":{"line":13,"column":22}},"1":{"start":{"line":18,"column":0},"end":{"line":18,"column":22}},"2":{"start":{"line":24,"column":0},"end":{"line":24,"column":22}},"3":{"start":{"line":30,"column":0},"end":{"line":30,"column":22}},"4":{"start":{"line":45,"column":0},"end":{"line":45,"column":22}},"5":{"start":{"line":2,"column":0},"end":{"line":2,"column":37}},"6":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"7":{"start":{"line":9,"column":0},"end":{"line":9,"column":55}},"8":{"start":{"line":10,"column":0},"end":{"line":10,"column":54}},"9":{"start":{"line":11,"column":0},"end":{"line":11,"column":53}},"10":{"start":{"line":14,"column":15},"end":{"line":14,"column":54}},"11":{"start":{"line":15,"column":2},"end":{"line":15,"column":34}},"12":{"start":{"line":19,"column":15},"end":{"line":19,"column":51}},"13":{"start":{"line":20,"column":22},"end":{"line":20,"column":70}},"14":{"start":{"line":21,"column":2},"end":{"line":21,"column":53}},"15":{"start":{"line":25,"column":36},"end":{"line":25,"column":78}},"16":{"start":{"line":26,"column":2},"end":{"line":26,"column":73}},"17":{"start":{"line":27,"column":2},"end":{"line":27,"column":25}},"18":{"start":{"line":31,"column":47},"end":{"line":31,"column":94}},"19":{"start":{"line":32,"column":31},"end":{"line":37,"column":4}},"20":{"start":{"line":39,"column":2},"end":{"line":42,"column":5}},"21":{"start":{"line":46,"column":47},"end":{"line":46,"column":95}},"22":{"start":{"line":47,"column":31},"end":{"line":52,"column":4}},"23":{"start":{"line":54,"column":2},"end":{"line":57,"column":5}}},"fnMap":{"0":{"name":"getMe","decl":{"start":{"line":13,"column":22},"end":{"line":13,"column":27}},"loc":{"start":{"line":13,"column":55},"end":{"line":16,"column":null}}},"1":{"name":"updateMe","decl":{"start":{"line":18,"column":22},"end":{"line":18,"column":30}},"loc":{"start":{"line":18,"column":58},"end":{"line":22,"column":null}}},"2":{"name":"updateMyPassword","decl":{"start":{"line":24,"column":22},"end":{"line":24,"column":38}},"loc":{"start":{"line":24,"column":66},"end":{"line":28,"column":null}}},"3":{"name":"getMyProductList","decl":{"start":{"line":30,"column":22},"end":{"line":30,"column":38}},"loc":{"start":{"line":30,"column":66},"end":{"line":43,"column":null}}},"4":{"name":"getMyFavoriteList","decl":{"start":{"line":45,"column":22},"end":{"line":45,"column":39}},"loc":{"start":{"line":45,"column":67},"end":{"line":58,"column":null}}}},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":5,"8":5,"9":5,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/dto/userResponse.dto.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/dto/userResponse.dto.ts","statementMap":{"0":{"start":{"line":3,"column":24},"end":{"line":6,"column":1}},"1":{"start":{"line":4,"column":47},"end":{"line":4,"column":51}},"2":{"start":{"line":4,"column":42},"end":{"line":4,"column":47}},"3":{"start":{"line":5,"column":2},"end":{"line":5,"column":29}},"4":{"start":{"line":8,"column":0},"end":{"line":8,"column":31}}},"fnMap":{"0":{"name":"(anonymous_1)","decl":{"start":{"line":3,"column":24},"end":{"line":3,"column":25}},"loc":{"start":{"line":3,"column":39},"end":{"line":6,"column":1}}}},"branchMap":{},"s":{"0":5,"1":85,"2":85,"3":85,"4":5},"f":{"0":85},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/lib/constants.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/lib/constants.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":28}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":16}},"2":{"start":{"line":4,"column":13},"end":{"line":4,"column":55}},"3":{"start":{"line":5,"column":13},"end":{"line":5,"column":57}},"4":{"start":{"line":6,"column":13},"end":{"line":6,"column":59}},"5":{"start":{"line":7,"column":13},"end":{"line":7,"column":100}},"6":{"start":{"line":8,"column":13},"end":{"line":9,"column":65}},"7":{"start":{"line":10,"column":13},"end":{"line":10,"column":62}},"8":{"start":{"line":11,"column":13},"end":{"line":11,"column":45}},"9":{"start":{"line":12,"column":13},"end":{"line":12,"column":38}},"10":{"start":{"line":13,"column":13},"end":{"line":13,"column":37}}},"fnMap":{},"branchMap":{"0":{"loc":{"start":{"line":6,"column":28},"end":{"line":6,"column":58}},"type":"binary-expr","locations":[{"start":{"line":6,"column":28},"end":{"line":6,"column":52}},{"start":{"line":6,"column":56},"end":{"line":6,"column":58}}]},"1":{"loc":{"start":{"line":7,"column":39},"end":{"line":7,"column":99}},"type":"binary-expr","locations":[{"start":{"line":7,"column":39},"end":{"line":7,"column":74}},{"start":{"line":7,"column":78},"end":{"line":7,"column":99}}]},"2":{"loc":{"start":{"line":9,"column":2},"end":{"line":9,"column":64}},"type":"binary-expr","locations":[{"start":{"line":9,"column":2},"end":{"line":9,"column":38}},{"start":{"line":9,"column":42},"end":{"line":9,"column":64}}]},"3":{"loc":{"start":{"line":10,"column":24},"end":{"line":10,"column":61}},"type":"binary-expr","locations":[{"start":{"line":10,"column":24},"end":{"line":10,"column":44}},{"start":{"line":10,"column":48},"end":{"line":10,"column":61}}]},"4":{"loc":{"start":{"line":11,"column":20},"end":{"line":11,"column":44}},"type":"binary-expr","locations":[{"start":{"line":11,"column":20},"end":{"line":11,"column":36}},{"start":{"line":11,"column":40},"end":{"line":11,"column":44}}]}},"s":{"0":6,"1":6,"2":6,"3":6,"4":6,"5":6,"6":6,"7":6,"8":6,"9":6,"10":6},"f":{},"b":{"0":[6,0],"1":[6,0],"2":[6,0],"3":[6,0],"4":[6,0]}} -,"/home/kimjs9105/nb6-sprint-mission/src/lib/prismaClient.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/lib/prismaClient.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":46}},"1":{"start":{"line":3,"column":13},"end":{"line":3,"column":47}}},"fnMap":{},"branchMap":{},"s":{"0":8,"1":8},"f":{},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/lib/token.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/lib/token.ts","statementMap":{"0":{"start":{"line":7,"column":0},"end":{"line":7,"column":16}},"1":{"start":{"line":17,"column":0},"end":{"line":17,"column":16}},"2":{"start":{"line":25,"column":0},"end":{"line":25,"column":16}},"3":{"start":{"line":1,"column":0},"end":{"line":1,"column":31}},"4":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"5":{"start":{"line":8,"column":22},"end":{"line":10,"column":4}},"6":{"start":{"line":11,"column":23},"end":{"line":13,"column":4}},"7":{"start":{"line":14,"column":2},"end":{"line":14,"column":39}},"8":{"start":{"line":18,"column":18},"end":{"line":18,"column":60}},"9":{"start":{"line":19,"column":2},"end":{"line":21,"column":3}},"10":{"start":{"line":20,"column":4},"end":{"line":20,"column":37}},"11":{"start":{"line":22,"column":2},"end":{"line":22,"column":32}},"12":{"start":{"line":26,"column":18},"end":{"line":26,"column":61}},"13":{"start":{"line":27,"column":2},"end":{"line":29,"column":3}},"14":{"start":{"line":28,"column":4},"end":{"line":28,"column":37}},"15":{"start":{"line":30,"column":2},"end":{"line":30,"column":32}}},"fnMap":{"0":{"name":"generateTokens","decl":{"start":{"line":7,"column":16},"end":{"line":7,"column":30}},"loc":{"start":{"line":7,"column":45},"end":{"line":15,"column":1}}},"1":{"name":"verifyAccessToken","decl":{"start":{"line":17,"column":16},"end":{"line":17,"column":33}},"loc":{"start":{"line":17,"column":47},"end":{"line":23,"column":1}}},"2":{"name":"verifyRefreshToken","decl":{"start":{"line":25,"column":16},"end":{"line":25,"column":34}},"loc":{"start":{"line":25,"column":48},"end":{"line":31,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":19,"column":2},"end":{"line":21,"column":3}},"type":"if","locations":[{"start":{"line":19,"column":2},"end":{"line":21,"column":3}},{"start":{},"end":{}}]},"1":{"loc":{"start":{"line":27,"column":2},"end":{"line":29,"column":3}},"type":"if","locations":[{"start":{"line":27,"column":2},"end":{"line":29,"column":3}},{"start":{},"end":{}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":71,"6":71,"7":71,"8":57,"9":57,"10":0,"11":57,"12":0,"13":0,"14":0,"15":0},"f":{"0":71,"1":57,"2":0},"b":{"0":[0,57],"1":[0,0]}} -,"/home/kimjs9105/nb6-sprint-mission/src/lib/websocket.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/lib/websocket.ts","statementMap":{"0":{"start":{"line":9,"column":0},"end":{"line":9,"column":16}},"1":{"start":{"line":56,"column":0},"end":{"line":56,"column":16}},"2":{"start":{"line":1,"column":0},"end":{"line":1,"column":35}},"3":{"start":{"line":3,"column":0},"end":{"line":3,"column":31}},"4":{"start":{"line":4,"column":0},"end":{"line":4,"column":57}},"5":{"start":{"line":10,"column":2},"end":{"line":10,"column":44}},"6":{"start":{"line":12,"column":13},"end":{"line":20,"column":4}},"7":{"start":{"line":23,"column":2},"end":{"line":23,"column":13}},"8":{"start":{"line":25,"column":2},"end":{"line":36,"column":5}},"9":{"start":{"line":26,"column":18},"end":{"line":26,"column":51}},"10":{"start":{"line":27,"column":4},"end":{"line":27,"column":49}},"11":{"start":{"line":27,"column":16},"end":{"line":27,"column":49}},"12":{"start":{"line":29,"column":4},"end":{"line":35,"column":5}},"13":{"start":{"line":30,"column":22},"end":{"line":30,"column":64}},"14":{"start":{"line":31,"column":7},"end":{"line":31,"column":37}},"15":{"start":{"line":32,"column":6},"end":{"line":32,"column":13}},"16":{"start":{"line":34,"column":6},"end":{"line":34,"column":35}},"17":{"start":{"line":38,"column":2},"end":{"line":49,"column":5}},"18":{"start":{"line":39,"column":4},"end":{"line":39,"column":33}},"19":{"start":{"line":42,"column":4},"end":{"line":42,"column":49}},"20":{"start":{"line":43,"column":4},"end":{"line":43,"column":59}},"21":{"start":{"line":46,"column":4},"end":{"line":48,"column":7}},"22":{"start":{"line":47,"column":6},"end":{"line":47,"column":41}},"23":{"start":{"line":51,"column":2},"end":{"line":53,"column":5}},"24":{"start":{"line":52,"column":4},"end":{"line":52,"column":51}},"25":{"start":{"line":57,"column":2},"end":{"line":57,"column":48}}},"fnMap":{"0":{"name":"setupWebSocket","decl":{"start":{"line":9,"column":16},"end":{"line":9,"column":30}},"loc":{"start":{"line":9,"column":50},"end":{"line":54,"column":1}}},"1":{"name":"(anonymous_2)","decl":{"start":{"line":25,"column":9},"end":{"line":25,"column":10}},"loc":{"start":{"line":25,"column":26},"end":{"line":36,"column":3}}},"2":{"name":"(anonymous_3)","decl":{"start":{"line":38,"column":22},"end":{"line":38,"column":23}},"loc":{"start":{"line":38,"column":33},"end":{"line":49,"column":3}}},"3":{"name":"(anonymous_4)","decl":{"start":{"line":46,"column":28},"end":{"line":46,"column":31}},"loc":{"start":{"line":46,"column":33},"end":{"line":48,"column":5}}},"4":{"name":"(anonymous_5)","decl":{"start":{"line":51,"column":17},"end":{"line":51,"column":18}},"loc":{"start":{"line":51,"column":27},"end":{"line":53,"column":3}}},"5":{"name":"notifyToUser","decl":{"start":{"line":56,"column":16},"end":{"line":56,"column":28}},"loc":{"start":{"line":56,"column":72},"end":{"line":58,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":27,"column":4},"end":{"line":27,"column":49}},"type":"if","locations":[{"start":{"line":27,"column":4},"end":{"line":27,"column":49}},{"start":{},"end":{}}]}},"s":{"0":6,"1":6,"2":6,"3":6,"4":6,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0},"b":{"0":[0,0]}} -,"/home/kimjs9105/nb6-sprint-mission/src/lib/withAsync.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/lib/withAsync.ts","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":3,"column":16}},"1":{"start":{"line":4,"column":2},"end":{"line":10,"column":4}},"2":{"start":{"line":5,"column":4},"end":{"line":9,"column":5}},"3":{"start":{"line":6,"column":6},"end":{"line":6,"column":36}},"4":{"start":{"line":8,"column":6},"end":{"line":8,"column":14}}},"fnMap":{"0":{"name":"withAsync","decl":{"start":{"line":3,"column":16},"end":{"line":3,"column":25}},"loc":{"start":{"line":3,"column":49},"end":{"line":11,"column":1}}},"1":{"name":"(anonymous_8)","decl":{"start":{"line":4,"column":9},"end":{"line":4,"column":25}},"loc":{"start":{"line":4,"column":72},"end":{"line":10,"column":4}}}},"branchMap":{},"s":{"0":5,"1":160,"2":240,"3":240,"4":27},"f":{"0":160,"1":240},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/lib/errors/BadRequestError.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/lib/errors/BadRequestError.ts","statementMap":{"0":{"start":{"line":3,"column":4},"end":{"line":3,"column":19}},"1":{"start":{"line":4,"column":4},"end":{"line":4,"column":34}},"2":{"start":{"line":8,"column":0},"end":{"line":8,"column":31}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":2},"end":{"line":2,"column":14}},"loc":{"start":{"line":2,"column":29},"end":{"line":5,"column":3}}}},"branchMap":{},"s":{"0":3,"1":3,"2":5},"f":{"0":3},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/lib/errors/ForbiddenError.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/lib/errors/ForbiddenError.ts","statementMap":{"0":{"start":{"line":3,"column":4},"end":{"line":3,"column":19}},"1":{"start":{"line":4,"column":4},"end":{"line":4,"column":33}},"2":{"start":{"line":8,"column":0},"end":{"line":8,"column":30}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":2},"end":{"line":2,"column":14}},"loc":{"start":{"line":2,"column":29},"end":{"line":5,"column":3}}}},"branchMap":{},"s":{"0":6,"1":6,"2":6},"f":{"0":6},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/lib/errors/NotFoundError.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/lib/errors/NotFoundError.ts","statementMap":{"0":{"start":{"line":3,"column":4},"end":{"line":3,"column":50}},"1":{"start":{"line":4,"column":4},"end":{"line":4,"column":32}},"2":{"start":{"line":8,"column":0},"end":{"line":8,"column":29}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":2},"end":{"line":2,"column":14}},"loc":{"start":{"line":2,"column":43},"end":{"line":5,"column":3}}}},"branchMap":{},"s":{"0":11,"1":11,"2":6},"f":{"0":11},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/lib/errors/UnauthorizedError.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/lib/errors/UnauthorizedError.ts","statementMap":{"0":{"start":{"line":3,"column":4},"end":{"line":3,"column":19}},"1":{"start":{"line":4,"column":4},"end":{"line":4,"column":36}},"2":{"start":{"line":8,"column":0},"end":{"line":8,"column":33}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":2,"column":2},"end":{"line":2,"column":14}},"loc":{"start":{"line":2,"column":29},"end":{"line":5,"column":3}}}},"branchMap":{},"s":{"0":16,"1":16,"2":5},"f":{"0":16},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/middleware/authenticate.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/middleware/authenticate.ts","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":58}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":54}},"2":{"start":{"line":6,"column":2},"end":{"line":20,"column":4}},"3":{"start":{"line":6,"column":67},"end":{"line":20,"column":4}},"4":{"start":{"line":7,"column":24},"end":{"line":7,"column":61}},"5":{"start":{"line":8,"column":4},"end":{"line":18,"column":5}},"6":{"start":{"line":9,"column":19},"end":{"line":9,"column":62}},"7":{"start":{"line":10,"column":6},"end":{"line":10,"column":22}},"8":{"start":{"line":12,"column":6},"end":{"line":15,"column":7}},"9":{"start":{"line":13,"column":8},"end":{"line":13,"column":15}},"10":{"start":{"line":14,"column":8},"end":{"line":14,"column":15}},"11":{"start":{"line":16,"column":6},"end":{"line":16,"column":18}},"12":{"start":{"line":17,"column":6},"end":{"line":17,"column":13}},"13":{"start":{"line":19,"column":4},"end":{"line":19,"column":11}},"14":{"start":{"line":23,"column":0},"end":{"line":23,"column":28}}},"fnMap":{"0":{"name":"authenticate","decl":{"start":{"line":5,"column":9},"end":{"line":5,"column":21}},"loc":{"start":{"line":5,"column":51},"end":{"line":21,"column":1}}},"1":{"name":"(anonymous_17)","decl":{"start":{"line":6,"column":9},"end":{"line":6,"column":16}},"loc":{"start":{"line":6,"column":67},"end":{"line":20,"column":4}}},"2":{"name":"(anonymous_18)","decl":{"start":{"line":6,"column":67},"end":{"line":6,"column":null}},"loc":{"start":{"line":6,"column":67},"end":{"line":20,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":5,"column":22},"end":{"line":5,"column":51}},"type":"default-arg","locations":[{"start":{"line":5,"column":32},"end":{"line":5,"column":51}}]},"1":{"loc":{"start":{"line":12,"column":6},"end":{"line":15,"column":7}},"type":"if","locations":[{"start":{"line":12,"column":6},"end":{"line":15,"column":7}},{"start":{},"end":{}}]}},"s":{"0":5,"1":5,"2":125,"3":73,"4":73,"5":73,"6":73,"7":57,"8":16,"9":16,"10":16,"11":0,"12":0,"13":57,"14":5},"f":{"0":125,"1":73,"2":73},"b":{"0":[105],"1":[16,0]}} -,"/home/kimjs9105/nb6-sprint-mission/src/repository/article.repo.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/repository/article.repo.ts","statementMap":{"0":{"start":{"line":5,"column":0},"end":{"line":5,"column":22}},"1":{"start":{"line":12,"column":0},"end":{"line":12,"column":22}},"2":{"start":{"line":17,"column":0},"end":{"line":17,"column":22}},"3":{"start":{"line":37,"column":0},"end":{"line":37,"column":22}},"4":{"start":{"line":73,"column":0},"end":{"line":73,"column":22}},"5":{"start":{"line":90,"column":0},"end":{"line":90,"column":22}},"6":{"start":{"line":2,"column":0},"end":{"line":2,"column":49}},"7":{"start":{"line":6,"column":25},"end":{"line":8,"column":4}},"8":{"start":{"line":9,"column":2},"end":{"line":9,"column":24}},"9":{"start":{"line":13,"column":18},"end":{"line":13,"column":74}},"10":{"start":{"line":14,"column":2},"end":{"line":14,"column":17}},"11":{"start":{"line":17,"column":42},"end":{"line":35,"column":null}},"12":{"start":{"line":18,"column":18},"end":{"line":23,"column":4}},"13":{"start":{"line":25,"column":2},"end":{"line":27,"column":3}},"14":{"start":{"line":26,"column":4},"end":{"line":26,"column":16}},"15":{"start":{"line":29,"column":2},"end":{"line":33,"column":null}},"16":{"start":{"line":33,"column":51},"end":{"line":33,"column":73}},"17":{"start":{"line":38,"column":2},"end":{"line":71,"column":null}},"18":{"start":{"line":45,"column":16},"end":{"line":47,"column":4}},"19":{"start":{"line":49,"column":21},"end":{"line":49,"column":64}},"20":{"start":{"line":50,"column":19},"end":{"line":58,"column":4}},"21":{"start":{"line":60,"column":25},"end":{"line":65,"column":5}},"22":{"start":{"line":60,"column":51},"end":{"line":64,"column":null}},"23":{"start":{"line":64,"column":51},"end":{"line":64,"column":73}},"24":{"start":{"line":67,"column":2},"end":{"line":70,"column":4}},"25":{"start":{"line":74,"column":25},"end":{"line":80,"column":4}},"26":{"start":{"line":81,"column":2},"end":{"line":86,"column":null}},"27":{"start":{"line":85,"column":44},"end":{"line":85,"column":71}},"28":{"start":{"line":91,"column":2},"end":{"line":93,"column":5}}},"fnMap":{"0":{"name":"createArticle","decl":{"start":{"line":5,"column":22},"end":{"line":5,"column":35}},"loc":{"start":{"line":5,"column":89},"end":{"line":10,"column":null}}},"1":{"name":"getArticle","decl":{"start":{"line":12,"column":22},"end":{"line":12,"column":32}},"loc":{"start":{"line":12,"column":43},"end":{"line":15,"column":null}}},"2":{"name":"getArticleWithLikes","decl":{"start":{"line":17,"column":22},"end":{"line":17,"column":41}},"loc":{"start":{"line":17,"column":41},"end":{"line":35,"column":null}}},"3":{"name":"(anonymous_12)","decl":{"start":{"line":17,"column":42},"end":{"line":17,"column":52}},"loc":{"start":{"line":17,"column":90},"end":{"line":35,"column":1}}},"4":{"name":"(anonymous_13)","decl":{"start":{"line":33,"column":41},"end":{"line":33,"column":42}},"loc":{"start":{"line":33,"column":51},"end":{"line":33,"column":73}}},"5":{"name":"getArticleListWithLikes","decl":{"start":{"line":37,"column":22},"end":{"line":37,"column":45}},"loc":{"start":{"line":37,"column":45},"end":{"line":71,"column":null}}},"6":{"name":"(anonymous_15)","decl":{"start":{"line":38,"column":2},"end":{"line":38,"column":4}},"loc":{"start":{"line":43,"column":8},"end":{"line":71,"column":1}}},"7":{"name":"(anonymous_16)","decl":{"start":{"line":60,"column":38},"end":{"line":60,"column":39}},"loc":{"start":{"line":60,"column":51},"end":{"line":64,"column":null}}},"8":{"name":"(anonymous_17)","decl":{"start":{"line":64,"column":41},"end":{"line":64,"column":42}},"loc":{"start":{"line":64,"column":51},"end":{"line":64,"column":73}}},"9":{"name":"updateArticleWithLikes","decl":{"start":{"line":73,"column":22},"end":{"line":73,"column":44}},"loc":{"start":{"line":73,"column":79},"end":{"line":88,"column":null}}},"10":{"name":"(anonymous_20)","decl":{"start":{"line":85,"column":34},"end":{"line":85,"column":35}},"loc":{"start":{"line":85,"column":44},"end":{"line":85,"column":71}}},"11":{"name":"deleteArticle","decl":{"start":{"line":90,"column":22},"end":{"line":90,"column":35}},"loc":{"start":{"line":90,"column":46},"end":{"line":94,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":17,"column":54},"end":{"line":17,"column":90}},"type":"default-arg","locations":[{"start":{"line":17,"column":88},"end":{"line":17,"column":90}}]},"1":{"loc":{"start":{"line":25,"column":2},"end":{"line":27,"column":3}},"type":"if","locations":[{"start":{"line":25,"column":2},"end":{"line":27,"column":3}},{"start":{},"end":{}}]},"2":{"loc":{"start":{"line":33,"column":13},"end":{"line":33,"column":86}},"type":"cond-expr","locations":[{"start":{"line":33,"column":22},"end":{"line":33,"column":74}},{"start":{"line":33,"column":77},"end":{"line":33,"column":86}}]},"3":{"loc":{"start":{"line":39,"column":2},"end":{"line":43,"column":8}},"type":"default-arg","locations":[{"start":{"line":43,"column":6},"end":{"line":43,"column":8}}]},"4":{"loc":{"start":{"line":46,"column":11},"end":{"line":46,"column":54}},"type":"cond-expr","locations":[{"start":{"line":46,"column":21},"end":{"line":46,"column":42}},{"start":{"line":46,"column":45},"end":{"line":46,"column":54}}]},"5":{"loc":{"start":{"line":53,"column":13},"end":{"line":53,"column":73}},"type":"cond-expr","locations":[{"start":{"line":53,"column":36},"end":{"line":53,"column":57}},{"start":{"line":53,"column":60},"end":{"line":53,"column":73}}]},"6":{"loc":{"start":{"line":64,"column":13},"end":{"line":64,"column":86}},"type":"cond-expr","locations":[{"start":{"line":64,"column":22},"end":{"line":64,"column":74}},{"start":{"line":64,"column":77},"end":{"line":64,"column":86}}]},"7":{"loc":{"start":{"line":84,"column":13},"end":{"line":86,"column":17}},"type":"cond-expr","locations":[{"start":{"line":85,"column":8},"end":{"line":85,"column":72}},{"start":{"line":86,"column":8},"end":{"line":86,"column":17}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":12,"8":12,"9":8,"10":8,"11":4,"12":4,"13":4,"14":2,"15":2,"16":0,"17":8,"18":8,"19":8,"20":8,"21":8,"22":34,"23":0,"24":8,"25":3,"26":3,"27":0,"28":1},"f":{"0":12,"1":8,"2":4,"3":4,"4":0,"5":8,"6":8,"7":34,"8":0,"9":3,"10":0,"11":1},"b":{"0":[4],"1":[2,2],"2":[0,2],"3":[8],"4":[2,6],"5":[0,8],"6":[0,34],"7":[3,0]}} -,"/home/kimjs9105/nb6-sprint-mission/src/repository/comment.repo.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/repository/comment.repo.ts","statementMap":{"0":{"start":{"line":5,"column":0},"end":{"line":5,"column":22}},"1":{"start":{"line":14,"column":0},"end":{"line":14,"column":22}},"2":{"start":{"line":21,"column":0},"end":{"line":21,"column":22}},"3":{"start":{"line":41,"column":0},"end":{"line":41,"column":22}},"4":{"start":{"line":48,"column":0},"end":{"line":48,"column":22}},"5":{"start":{"line":2,"column":0},"end":{"line":2,"column":49}},"6":{"start":{"line":8,"column":25},"end":{"line":10,"column":4}},"7":{"start":{"line":11,"column":2},"end":{"line":11,"column":24}},"8":{"start":{"line":15,"column":18},"end":{"line":17,"column":4}},"9":{"start":{"line":18,"column":2},"end":{"line":18,"column":17}},"10":{"start":{"line":22,"column":2},"end":{"line":39,"column":null}},"11":{"start":{"line":25,"column":29},"end":{"line":30,"column":4}},"12":{"start":{"line":31,"column":19},"end":{"line":31,"column":53}},"13":{"start":{"line":32,"column":24},"end":{"line":32,"column":73}},"14":{"start":{"line":33,"column":21},"end":{"line":33,"column":60}},"15":{"start":{"line":35,"column":2},"end":{"line":38,"column":4}},"16":{"start":{"line":42,"column":2},"end":{"line":45,"column":5}},"17":{"start":{"line":49,"column":2},"end":{"line":51,"column":5}}},"fnMap":{"0":{"name":"createComment","decl":{"start":{"line":5,"column":22},"end":{"line":5,"column":35}},"loc":{"start":{"line":6,"column":55},"end":{"line":12,"column":null}}},"1":{"name":"getComment","decl":{"start":{"line":14,"column":22},"end":{"line":14,"column":32}},"loc":{"start":{"line":14,"column":43},"end":{"line":19,"column":null}}},"2":{"name":"getCommentList","decl":{"start":{"line":21,"column":22},"end":{"line":21,"column":36}},"loc":{"start":{"line":21,"column":36},"end":{"line":39,"column":null}}},"3":{"name":"(anonymous_12)","decl":{"start":{"line":22,"column":2},"end":{"line":22,"column":51}},"loc":{"start":{"line":23,"column":43},"end":{"line":39,"column":1}}},"4":{"name":"updateComment","decl":{"start":{"line":41,"column":22},"end":{"line":41,"column":35}},"loc":{"start":{"line":41,"column":70},"end":{"line":46,"column":null}}},"5":{"name":"deleteComment","decl":{"start":{"line":48,"column":22},"end":{"line":48,"column":35}},"loc":{"start":{"line":48,"column":46},"end":{"line":52,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":26,"column":12},"end":{"line":26,"column":47}},"type":"cond-expr","locations":[{"start":{"line":26,"column":21},"end":{"line":26,"column":35}},{"start":{"line":26,"column":38},"end":{"line":26,"column":47}}]},"1":{"loc":{"start":{"line":33,"column":21},"end":{"line":33,"column":60}},"type":"cond-expr","locations":[{"start":{"line":33,"column":37},"end":{"line":33,"column":53}},{"start":{"line":33,"column":56},"end":{"line":33,"column":60}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0},"b":{"0":[0,0],"1":[0,0]}} -,"/home/kimjs9105/nb6-sprint-mission/src/repository/favorite.repo.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/repository/favorite.repo.ts","statementMap":{"0":{"start":{"line":4,"column":0},"end":{"line":4,"column":22}},"1":{"start":{"line":11,"column":0},"end":{"line":11,"column":22}},"2":{"start":{"line":18,"column":0},"end":{"line":18,"column":22}},"3":{"start":{"line":24,"column":0},"end":{"line":24,"column":22}},"4":{"start":{"line":2,"column":0},"end":{"line":2,"column":49}},"5":{"start":{"line":5,"column":26},"end":{"line":7,"column":4}},"6":{"start":{"line":8,"column":2},"end":{"line":8,"column":25}},"7":{"start":{"line":12,"column":19},"end":{"line":14,"column":4}},"8":{"start":{"line":15,"column":2},"end":{"line":15,"column":18}},"9":{"start":{"line":19,"column":2},"end":{"line":21,"column":5}},"10":{"start":{"line":25,"column":2},"end":{"line":27,"column":5}}},"fnMap":{"0":{"name":"createFavorite","decl":{"start":{"line":4,"column":22},"end":{"line":4,"column":36}},"loc":{"start":{"line":4,"column":91},"end":{"line":9,"column":null}}},"1":{"name":"getFavorite","decl":{"start":{"line":11,"column":22},"end":{"line":11,"column":33}},"loc":{"start":{"line":11,"column":67},"end":{"line":16,"column":null}}},"2":{"name":"getFavoriteMember","decl":{"start":{"line":18,"column":22},"end":{"line":18,"column":39}},"loc":{"start":{"line":18,"column":57},"end":{"line":22,"column":null}}},"3":{"name":"deleteFavorite","decl":{"start":{"line":24,"column":22},"end":{"line":24,"column":36}},"loc":{"start":{"line":24,"column":47},"end":{"line":28,"column":null}}}},"branchMap":{},"s":{"0":6,"1":6,"2":6,"3":6,"4":6,"5":0,"6":0,"7":0,"8":0,"9":5,"10":0},"f":{"0":0,"1":0,"2":5,"3":0},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/repository/like.repo.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/repository/like.repo.ts","statementMap":{"0":{"start":{"line":4,"column":0},"end":{"line":4,"column":22}},"1":{"start":{"line":11,"column":0},"end":{"line":11,"column":22}},"2":{"start":{"line":18,"column":0},"end":{"line":18,"column":22}},"3":{"start":{"line":2,"column":0},"end":{"line":2,"column":49}},"4":{"start":{"line":5,"column":22},"end":{"line":7,"column":4}},"5":{"start":{"line":8,"column":2},"end":{"line":8,"column":21}},"6":{"start":{"line":12,"column":15},"end":{"line":14,"column":4}},"7":{"start":{"line":15,"column":2},"end":{"line":15,"column":14}},"8":{"start":{"line":19,"column":2},"end":{"line":21,"column":5}}},"fnMap":{"0":{"name":"createLike","decl":{"start":{"line":4,"column":22},"end":{"line":4,"column":32}},"loc":{"start":{"line":4,"column":83},"end":{"line":9,"column":null}}},"1":{"name":"getLike","decl":{"start":{"line":11,"column":22},"end":{"line":11,"column":29}},"loc":{"start":{"line":11,"column":63},"end":{"line":16,"column":null}}},"2":{"name":"deleteLike","decl":{"start":{"line":18,"column":22},"end":{"line":18,"column":32}},"loc":{"start":{"line":18,"column":43},"end":{"line":22,"column":null}}}},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":0,"5":0,"6":0,"7":0,"8":0},"f":{"0":0,"1":0,"2":0},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/repository/notification.repo.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/repository/notification.repo.ts","statementMap":{"0":{"start":{"line":5,"column":0},"end":{"line":5,"column":22}},"1":{"start":{"line":25,"column":0},"end":{"line":25,"column":22}},"2":{"start":{"line":37,"column":0},"end":{"line":37,"column":22}},"3":{"start":{"line":41,"column":0},"end":{"line":41,"column":22}},"4":{"start":{"line":1,"column":0},"end":{"line":1,"column":49}},"5":{"start":{"line":12,"column":58},"end":{"line":12,"column":62}},"6":{"start":{"line":14,"column":2},"end":{"line":22,"column":5}},"7":{"start":{"line":26,"column":39},"end":{"line":33,"column":4}},"8":{"start":{"line":34,"column":2},"end":{"line":34,"column":40}},"9":{"start":{"line":38,"column":2},"end":{"line":38,"column":87}},"10":{"start":{"line":42,"column":2},"end":{"line":45,"column":5}}},"fnMap":{"0":{"name":"createNotification","decl":{"start":{"line":5,"column":22},"end":{"line":5,"column":40}},"loc":{"start":{"line":11,"column":1},"end":{"line":23,"column":null}}},"1":{"name":"getNotificationList","decl":{"start":{"line":25,"column":22},"end":{"line":25,"column":41}},"loc":{"start":{"line":25,"column":56},"end":{"line":35,"column":null}}},"2":{"name":"getNotification","decl":{"start":{"line":37,"column":22},"end":{"line":37,"column":37}},"loc":{"start":{"line":37,"column":60},"end":{"line":39,"column":null}}},"3":{"name":"patchNotification","decl":{"start":{"line":41,"column":22},"end":{"line":41,"column":39}},"loc":{"start":{"line":41,"column":62},"end":{"line":46,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":19,"column":17},"end":{"line":19,"column":34}},"type":"cond-expr","locations":[{"start":{"line":19,"column":17},"end":{"line":19,"column":26}},{"start":{"line":19,"column":30},"end":{"line":19,"column":34}}]},"1":{"loc":{"start":{"line":19,"column":17},"end":{"line":19,"column":30}},"type":"binary-expr","locations":[{"start":{"line":19,"column":17},"end":{"line":19,"column":30}},{"start":{"line":19,"column":17},"end":{"line":19,"column":30}}]},"2":{"loc":{"start":{"line":20,"column":17},"end":{"line":20,"column":34}},"type":"cond-expr","locations":[{"start":{"line":20,"column":17},"end":{"line":20,"column":26}},{"start":{"line":20,"column":30},"end":{"line":20,"column":34}}]},"3":{"loc":{"start":{"line":20,"column":17},"end":{"line":20,"column":30}},"type":"binary-expr","locations":[{"start":{"line":20,"column":17},"end":{"line":20,"column":30}},{"start":{"line":20,"column":17},"end":{"line":20,"column":30}}]}},"s":{"0":6,"1":6,"2":6,"3":6,"4":6,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0},"f":{"0":0,"1":0,"2":0,"3":0},"b":{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0]}} -,"/home/kimjs9105/nb6-sprint-mission/src/repository/product.repo.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/repository/product.repo.ts","statementMap":{"0":{"start":{"line":5,"column":0},"end":{"line":5,"column":22}},"1":{"start":{"line":11,"column":0},"end":{"line":11,"column":22}},"2":{"start":{"line":18,"column":0},"end":{"line":18,"column":22}},"3":{"start":{"line":38,"column":0},"end":{"line":38,"column":22}},"4":{"start":{"line":82,"column":0},"end":{"line":82,"column":22}},"5":{"start":{"line":131,"column":0},"end":{"line":131,"column":22}},"6":{"start":{"line":150,"column":0},"end":{"line":150,"column":22}},"7":{"start":{"line":2,"column":0},"end":{"line":2,"column":49}},"8":{"start":{"line":6,"column":2},"end":{"line":8,"column":5}},"9":{"start":{"line":12,"column":18},"end":{"line":14,"column":4}},"10":{"start":{"line":15,"column":2},"end":{"line":15,"column":17}},"11":{"start":{"line":19,"column":18},"end":{"line":22,"column":4}},"12":{"start":{"line":23,"column":2},"end":{"line":25,"column":3}},"13":{"start":{"line":24,"column":4},"end":{"line":24,"column":16}},"14":{"start":{"line":27,"column":21},"end":{"line":33,"column":null}},"15":{"start":{"line":32,"column":45},"end":{"line":32,"column":71}},"16":{"start":{"line":35,"column":2},"end":{"line":35,"column":23}},"17":{"start":{"line":39,"column":2},"end":{"line":80,"column":null}},"18":{"start":{"line":46,"column":16},"end":{"line":50,"column":8}},"19":{"start":{"line":52,"column":21},"end":{"line":54,"column":4}},"20":{"start":{"line":56,"column":19},"end":{"line":64,"column":4}},"21":{"start":{"line":66,"column":25},"end":{"line":74,"column":5}},"22":{"start":{"line":66,"column":51},"end":{"line":73,"column":null}},"23":{"start":{"line":72,"column":47},"end":{"line":72,"column":73}},"24":{"start":{"line":76,"column":2},"end":{"line":79,"column":4}},"25":{"start":{"line":83,"column":2},"end":{"line":129,"column":null}},"26":{"start":{"line":86,"column":16},"end":{"line":90,"column":8}},"27":{"start":{"line":91,"column":21},"end":{"line":100,"column":4}},"28":{"start":{"line":101,"column":19},"end":{"line":116,"column":4}},"29":{"start":{"line":118,"column":25},"end":{"line":123,"column":5}},"30":{"start":{"line":118,"column":51},"end":{"line":122,"column":null}},"31":{"start":{"line":125,"column":2},"end":{"line":128,"column":4}},"32":{"start":{"line":132,"column":18},"end":{"line":138,"column":4}},"33":{"start":{"line":139,"column":21},"end":{"line":145,"column":null}},"34":{"start":{"line":144,"column":45},"end":{"line":144,"column":76}},"35":{"start":{"line":147,"column":2},"end":{"line":147,"column":23}},"36":{"start":{"line":151,"column":2},"end":{"line":153,"column":5}}},"fnMap":{"0":{"name":"createProduct","decl":{"start":{"line":5,"column":22},"end":{"line":5,"column":35}},"loc":{"start":{"line":5,"column":89},"end":{"line":9,"column":null}}},"1":{"name":"getProduct","decl":{"start":{"line":11,"column":22},"end":{"line":11,"column":32}},"loc":{"start":{"line":11,"column":43},"end":{"line":16,"column":null}}},"2":{"name":"getProductWithFavorites","decl":{"start":{"line":18,"column":22},"end":{"line":18,"column":45}},"loc":{"start":{"line":18,"column":73},"end":{"line":36,"column":null}}},"3":{"name":"(anonymous_13)","decl":{"start":{"line":32,"column":31},"end":{"line":32,"column":32}},"loc":{"start":{"line":32,"column":45},"end":{"line":32,"column":71}}},"4":{"name":"getProductListWithFavorites","decl":{"start":{"line":38,"column":22},"end":{"line":38,"column":49}},"loc":{"start":{"line":38,"column":49},"end":{"line":80,"column":null}}},"5":{"name":"(anonymous_15)","decl":{"start":{"line":39,"column":2},"end":{"line":39,"column":4}},"loc":{"start":{"line":44,"column":8},"end":{"line":80,"column":1}}},"6":{"name":"(anonymous_16)","decl":{"start":{"line":66,"column":38},"end":{"line":66,"column":39}},"loc":{"start":{"line":66,"column":51},"end":{"line":73,"column":null}}},"7":{"name":"(anonymous_17)","decl":{"start":{"line":72,"column":33},"end":{"line":72,"column":34}},"loc":{"start":{"line":72,"column":47},"end":{"line":72,"column":73}}},"8":{"name":"getFavoriteProductListByOwnerId","decl":{"start":{"line":82,"column":22},"end":{"line":82,"column":53}},"loc":{"start":{"line":82,"column":53},"end":{"line":129,"column":null}}},"9":{"name":"(anonymous_19)","decl":{"start":{"line":83,"column":2},"end":{"line":83,"column":17}},"loc":{"start":{"line":84,"column":60},"end":{"line":129,"column":1}}},"10":{"name":"(anonymous_20)","decl":{"start":{"line":118,"column":38},"end":{"line":118,"column":39}},"loc":{"start":{"line":118,"column":51},"end":{"line":122,"column":null}}},"11":{"name":"updateProductWithFavorites","decl":{"start":{"line":131,"column":22},"end":{"line":131,"column":48}},"loc":{"start":{"line":131,"column":83},"end":{"line":148,"column":null}}},"12":{"name":"(anonymous_23)","decl":{"start":{"line":144,"column":31},"end":{"line":144,"column":32}},"loc":{"start":{"line":144,"column":45},"end":{"line":144,"column":76}}},"13":{"name":"deleteProduct","decl":{"start":{"line":150,"column":22},"end":{"line":150,"column":35}},"loc":{"start":{"line":150,"column":46},"end":{"line":154,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":23,"column":2},"end":{"line":25,"column":3}},"type":"if","locations":[{"start":{"line":23,"column":2},"end":{"line":25,"column":3}},{"start":{},"end":{}}]},"1":{"loc":{"start":{"line":31,"column":17},"end":{"line":33,"column":17}},"type":"cond-expr","locations":[{"start":{"line":32,"column":8},"end":{"line":32,"column":72}},{"start":{"line":33,"column":8},"end":{"line":33,"column":17}}]},"2":{"loc":{"start":{"line":40,"column":2},"end":{"line":44,"column":8}},"type":"default-arg","locations":[{"start":{"line":44,"column":6},"end":{"line":44,"column":8}}]},"3":{"loc":{"start":{"line":46,"column":16},"end":{"line":50,"column":8}},"type":"cond-expr","locations":[{"start":{"line":47,"column":6},"end":{"line":49,"column":null}},{"start":{"line":50,"column":6},"end":{"line":50,"column":8}}]},"4":{"loc":{"start":{"line":59,"column":13},"end":{"line":59,"column":66}},"type":"cond-expr","locations":[{"start":{"line":59,"column":36},"end":{"line":59,"column":50}},{"start":{"line":59,"column":53},"end":{"line":59,"column":66}}]},"5":{"loc":{"start":{"line":71,"column":6},"end":{"line":73,"column":19}},"type":"cond-expr","locations":[{"start":{"line":72,"column":10},"end":{"line":72,"column":74}},{"start":{"line":73,"column":10},"end":{"line":73,"column":19}}]},"6":{"loc":{"start":{"line":86,"column":16},"end":{"line":90,"column":8}},"type":"cond-expr","locations":[{"start":{"line":87,"column":6},"end":{"line":89,"column":null}},{"start":{"line":90,"column":6},"end":{"line":90,"column":8}}]},"7":{"loc":{"start":{"line":104,"column":13},"end":{"line":104,"column":66}},"type":"cond-expr","locations":[{"start":{"line":104,"column":36},"end":{"line":104,"column":50}},{"start":{"line":104,"column":53},"end":{"line":104,"column":66}}]},"8":{"loc":{"start":{"line":143,"column":17},"end":{"line":145,"column":17}},"type":"cond-expr","locations":[{"start":{"line":144,"column":8},"end":{"line":144,"column":77}},{"start":{"line":145,"column":8},"end":{"line":145,"column":17}}]}},"s":{"0":6,"1":6,"2":6,"3":6,"4":6,"5":6,"6":6,"7":6,"8":14,"9":10,"10":10,"11":4,"12":4,"13":2,"14":2,"15":0,"16":2,"17":8,"18":8,"19":8,"20":8,"21":8,"22":38,"23":0,"24":8,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":5,"33":5,"34":0,"35":5,"36":1},"f":{"0":14,"1":10,"2":4,"3":0,"4":8,"5":8,"6":38,"7":0,"8":0,"9":0,"10":0,"11":5,"12":0,"13":1},"b":{"0":[2,2],"1":[0,2],"2":[0],"3":[2,6],"4":[0,8],"5":[10,28],"6":[0,0],"7":[0,0],"8":[5,0]}} -,"/home/kimjs9105/nb6-sprint-mission/src/repository/user.repo.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/repository/user.repo.ts","statementMap":{"0":{"start":{"line":4,"column":0},"end":{"line":4,"column":22}},"1":{"start":{"line":13,"column":0},"end":{"line":13,"column":22}},"2":{"start":{"line":20,"column":0},"end":{"line":20,"column":22}},"3":{"start":{"line":27,"column":0},"end":{"line":27,"column":22}},"4":{"start":{"line":35,"column":0},"end":{"line":35,"column":22}},"5":{"start":{"line":2,"column":0},"end":{"line":2,"column":49}},"6":{"start":{"line":7,"column":22},"end":{"line":9,"column":4}},"7":{"start":{"line":10,"column":2},"end":{"line":10,"column":21}},"8":{"start":{"line":14,"column":15},"end":{"line":16,"column":4}},"9":{"start":{"line":17,"column":2},"end":{"line":17,"column":14}},"10":{"start":{"line":21,"column":15},"end":{"line":23,"column":4}},"11":{"start":{"line":24,"column":2},"end":{"line":24,"column":14}},"12":{"start":{"line":28,"column":22},"end":{"line":31,"column":4}},"13":{"start":{"line":32,"column":2},"end":{"line":32,"column":21}},"14":{"start":{"line":36,"column":2},"end":{"line":38,"column":5}}},"fnMap":{"0":{"name":"createUser","decl":{"start":{"line":4,"column":22},"end":{"line":4,"column":32}},"loc":{"start":{"line":5,"column":52},"end":{"line":11,"column":null}}},"1":{"name":"getUser","decl":{"start":{"line":13,"column":22},"end":{"line":13,"column":29}},"loc":{"start":{"line":13,"column":40},"end":{"line":18,"column":null}}},"2":{"name":"getUserByEmail","decl":{"start":{"line":20,"column":22},"end":{"line":20,"column":36}},"loc":{"start":{"line":20,"column":50},"end":{"line":25,"column":null}}},"3":{"name":"updateUser","decl":{"start":{"line":27,"column":22},"end":{"line":27,"column":32}},"loc":{"start":{"line":27,"column":64},"end":{"line":33,"column":null}}},"4":{"name":"deleteUser","decl":{"start":{"line":35,"column":22},"end":{"line":35,"column":32}},"loc":{"start":{"line":35,"column":43},"end":{"line":39,"column":null}}}},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":85,"7":85,"8":57,"9":57,"10":159,"11":159,"12":0,"13":0,"14":0},"f":{"0":85,"1":57,"2":159,"3":0,"4":0},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/routers/article.router.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/routers/article.router.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":30}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":43}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"3":{"start":{"line":14,"column":0},"end":{"line":14,"column":52}},"4":{"start":{"line":16,"column":23},"end":{"line":16,"column":39}},"5":{"start":{"line":18,"column":0},"end":{"line":18,"column":67}},"6":{"start":{"line":19,"column":0},"end":{"line":23,"column":2}},"7":{"start":{"line":24,"column":0},"end":{"line":28,"column":2}},"8":{"start":{"line":29,"column":0},"end":{"line":29,"column":71}},"9":{"start":{"line":30,"column":0},"end":{"line":30,"column":72}},"10":{"start":{"line":31,"column":0},"end":{"line":31,"column":79}},"11":{"start":{"line":32,"column":0},"end":{"line":32,"column":63}},"12":{"start":{"line":33,"column":0},"end":{"line":33,"column":73}},"13":{"start":{"line":34,"column":0},"end":{"line":34,"column":75}},"14":{"start":{"line":36,"column":0},"end":{"line":36,"column":30}}},"fnMap":{},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":5,"8":5,"9":5,"10":5,"11":5,"12":5,"13":5,"14":5},"f":{},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/routers/auth.router.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/routers/auth.router.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":30}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"2":{"start":{"line":8,"column":0},"end":{"line":8,"column":43}},"3":{"start":{"line":10,"column":19},"end":{"line":10,"column":35}},"4":{"start":{"line":12,"column":0},"end":{"line":12,"column":50}},"5":{"start":{"line":13,"column":0},"end":{"line":13,"column":44}},"6":{"start":{"line":14,"column":0},"end":{"line":14,"column":46}},"7":{"start":{"line":15,"column":0},"end":{"line":15,"column":53}},"8":{"start":{"line":17,"column":0},"end":{"line":17,"column":26}}},"fnMap":{},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":5,"8":5},"f":{},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/routers/comment.router.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/routers/comment.router.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":30}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":43}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":80}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":52}},"4":{"start":{"line":6,"column":23},"end":{"line":6,"column":39}},"5":{"start":{"line":8,"column":0},"end":{"line":8,"column":71}},"6":{"start":{"line":9,"column":0},"end":{"line":9,"column":72}},"7":{"start":{"line":11,"column":0},"end":{"line":11,"column":30}}},"fnMap":{},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":5},"f":{},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/routers/image.router.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/routers/image.router.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":30}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":43}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":69}},"3":{"start":{"line":5,"column":21},"end":{"line":5,"column":37}},"4":{"start":{"line":7,"column":0},"end":{"line":7,"column":77}},"5":{"start":{"line":9,"column":0},"end":{"line":9,"column":28}}},"fnMap":{},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5},"f":{},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/routers/notification.router.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/routers/notification.router.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":30}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":43}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":93}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":52}},"4":{"start":{"line":6,"column":27},"end":{"line":6,"column":43}},"5":{"start":{"line":8,"column":0},"end":{"line":8,"column":73}},"6":{"start":{"line":10,"column":0},"end":{"line":10,"column":85}},"7":{"start":{"line":12,"column":0},"end":{"line":12,"column":34}}},"fnMap":{},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":5},"f":{},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/routers/product.router.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/routers/product.router.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":30}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":43}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"3":{"start":{"line":14,"column":0},"end":{"line":14,"column":52}},"4":{"start":{"line":16,"column":23},"end":{"line":16,"column":39}},"5":{"start":{"line":18,"column":0},"end":{"line":18,"column":67}},"6":{"start":{"line":19,"column":0},"end":{"line":23,"column":2}},"7":{"start":{"line":24,"column":0},"end":{"line":24,"column":71}},"8":{"start":{"line":25,"column":0},"end":{"line":25,"column":72}},"9":{"start":{"line":26,"column":0},"end":{"line":30,"column":2}},"10":{"start":{"line":31,"column":0},"end":{"line":31,"column":79}},"11":{"start":{"line":32,"column":0},"end":{"line":32,"column":63}},"12":{"start":{"line":33,"column":0},"end":{"line":37,"column":2}},"13":{"start":{"line":38,"column":0},"end":{"line":42,"column":2}},"14":{"start":{"line":44,"column":0},"end":{"line":44,"column":30}}},"fnMap":{},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":5,"8":5,"9":5,"10":5,"11":5,"12":5,"13":5,"14":5},"f":{},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/routers/user.router.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/routers/user.router.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":30}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":43}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"3":{"start":{"line":10,"column":0},"end":{"line":10,"column":52}},"4":{"start":{"line":12,"column":20},"end":{"line":12,"column":36}},"5":{"start":{"line":14,"column":0},"end":{"line":14,"column":57}},"6":{"start":{"line":15,"column":0},"end":{"line":15,"column":62}},"7":{"start":{"line":16,"column":0},"end":{"line":16,"column":79}},"8":{"start":{"line":17,"column":0},"end":{"line":17,"column":77}},"9":{"start":{"line":18,"column":0},"end":{"line":18,"column":79}},"10":{"start":{"line":20,"column":0},"end":{"line":20,"column":27}}},"fnMap":{},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":5,"8":5,"9":5,"10":5},"f":{},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/service/article.service.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/service/article.service.ts","statementMap":{"0":{"start":{"line":10,"column":0},"end":{"line":10,"column":22}},"1":{"start":{"line":19,"column":0},"end":{"line":19,"column":22}},"2":{"start":{"line":27,"column":0},"end":{"line":27,"column":22}},"3":{"start":{"line":34,"column":0},"end":{"line":34,"column":22}},"4":{"start":{"line":48,"column":0},"end":{"line":48,"column":22}},"5":{"start":{"line":1,"column":0},"end":{"line":1,"column":64}},"6":{"start":{"line":3,"column":0},"end":{"line":3,"column":56}},"7":{"start":{"line":4,"column":0},"end":{"line":4,"column":54}},"8":{"start":{"line":11,"column":25},"end":{"line":11,"column":69}},"9":{"start":{"line":12,"column":2},"end":{"line":15,"column":null}},"10":{"start":{"line":20,"column":18},"end":{"line":20,"column":66}},"11":{"start":{"line":21,"column":2},"end":{"line":23,"column":3}},"12":{"start":{"line":22,"column":4},"end":{"line":22,"column":43}},"13":{"start":{"line":24,"column":2},"end":{"line":24,"column":17}},"14":{"start":{"line":30,"column":19},"end":{"line":30,"column":75}},"15":{"start":{"line":31,"column":2},"end":{"line":31,"column":18}},"16":{"start":{"line":35,"column":26},"end":{"line":35,"column":65}},"17":{"start":{"line":36,"column":2},"end":{"line":38,"column":3}},"18":{"start":{"line":37,"column":4},"end":{"line":37,"column":43}},"19":{"start":{"line":40,"column":2},"end":{"line":42,"column":3}},"20":{"start":{"line":41,"column":4},"end":{"line":41,"column":67}},"21":{"start":{"line":44,"column":25},"end":{"line":44,"column":82}},"22":{"start":{"line":45,"column":2},"end":{"line":45,"column":24}},"23":{"start":{"line":49,"column":26},"end":{"line":49,"column":65}},"24":{"start":{"line":50,"column":2},"end":{"line":52,"column":3}},"25":{"start":{"line":51,"column":4},"end":{"line":51,"column":43}},"26":{"start":{"line":54,"column":2},"end":{"line":56,"column":3}},"27":{"start":{"line":55,"column":4},"end":{"line":55,"column":67}},"28":{"start":{"line":58,"column":2},"end":{"line":58,"column":45}}},"fnMap":{"0":{"name":"createArticle","decl":{"start":{"line":10,"column":22},"end":{"line":10,"column":35}},"loc":{"start":{"line":10,"column":59},"end":{"line":17,"column":null}}},"1":{"name":"getArticle","decl":{"start":{"line":19,"column":22},"end":{"line":19,"column":32}},"loc":{"start":{"line":19,"column":43},"end":{"line":25,"column":null}}},"2":{"name":"getArticleList","decl":{"start":{"line":27,"column":22},"end":{"line":27,"column":36}},"loc":{"start":{"line":28,"column":30},"end":{"line":32,"column":null}}},"3":{"name":"updateArticle","decl":{"start":{"line":34,"column":22},"end":{"line":34,"column":35}},"loc":{"start":{"line":34,"column":71},"end":{"line":46,"column":null}}},"4":{"name":"deleteArticle","decl":{"start":{"line":48,"column":22},"end":{"line":48,"column":35}},"loc":{"start":{"line":48,"column":62},"end":{"line":59,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":21,"column":2},"end":{"line":23,"column":3}},"type":"if","locations":[{"start":{"line":21,"column":2},"end":{"line":23,"column":3}},{"start":{},"end":{}}]},"1":{"loc":{"start":{"line":36,"column":2},"end":{"line":38,"column":3}},"type":"if","locations":[{"start":{"line":36,"column":2},"end":{"line":38,"column":3}},{"start":{},"end":{}}]},"2":{"loc":{"start":{"line":40,"column":2},"end":{"line":42,"column":3}},"type":"if","locations":[{"start":{"line":40,"column":2},"end":{"line":42,"column":3}},{"start":{},"end":{}}]},"3":{"loc":{"start":{"line":50,"column":2},"end":{"line":52,"column":3}},"type":"if","locations":[{"start":{"line":50,"column":2},"end":{"line":52,"column":3}},{"start":{},"end":{}}]},"4":{"loc":{"start":{"line":54,"column":2},"end":{"line":56,"column":3}},"type":"if","locations":[{"start":{"line":54,"column":2},"end":{"line":56,"column":3}},{"start":{},"end":{}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":5,"8":12,"9":12,"10":4,"11":4,"12":2,"13":2,"14":8,"15":8,"16":5,"17":5,"18":1,"19":4,"20":1,"21":3,"22":3,"23":3,"24":3,"25":1,"26":2,"27":1,"28":1},"f":{"0":12,"1":4,"2":8,"3":5,"4":3},"b":{"0":[2,2],"1":[1,4],"2":[1,3],"3":[1,2],"4":[1,1]}} -,"/home/kimjs9105/nb6-sprint-mission/src/service/auth.service.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/service/auth.service.ts","statementMap":{"0":{"start":{"line":21,"column":0},"end":{"line":21,"column":22}},"1":{"start":{"line":39,"column":0},"end":{"line":39,"column":22}},"2":{"start":{"line":57,"column":0},"end":{"line":57,"column":22}},"3":{"start":{"line":76,"column":0},"end":{"line":76,"column":22}},"4":{"start":{"line":91,"column":0},"end":{"line":91,"column":22}},"5":{"start":{"line":1,"column":0},"end":{"line":1,"column":28}},"6":{"start":{"line":2,"column":0},"end":{"line":2,"column":58}},"7":{"start":{"line":3,"column":0},"end":{"line":3,"column":58}},"8":{"start":{"line":4,"column":0},"end":{"line":4,"column":54}},"9":{"start":{"line":5,"column":0},"end":{"line":5,"column":83}},"10":{"start":{"line":6,"column":0},"end":{"line":6,"column":62}},"11":{"start":{"line":13,"column":2},"end":{"line":13,"column":55}},"12":{"start":{"line":17,"column":15},"end":{"line":17,"column":39}},"13":{"start":{"line":18,"column":2},"end":{"line":18,"column":43}},"14":{"start":{"line":22,"column":23},"end":{"line":22,"column":71}},"15":{"start":{"line":23,"column":2},"end":{"line":25,"column":3}},"16":{"start":{"line":24,"column":4},"end":{"line":24,"column":53}},"17":{"start":{"line":27,"column":25},"end":{"line":27,"column":58}},"18":{"start":{"line":29,"column":15},"end":{"line":34,"column":4}},"19":{"start":{"line":36,"column":2},"end":{"line":36,"column":14}},"20":{"start":{"line":40,"column":15},"end":{"line":40,"column":63}},"21":{"start":{"line":41,"column":2},"end":{"line":43,"column":3}},"22":{"start":{"line":42,"column":4},"end":{"line":42,"column":53}},"23":{"start":{"line":45,"column":26},"end":{"line":45,"column":67}},"24":{"start":{"line":46,"column":2},"end":{"line":48,"column":3}},"25":{"start":{"line":47,"column":4},"end":{"line":47,"column":53}},"26":{"start":{"line":50,"column":40},"end":{"line":50,"column":63}},"27":{"start":{"line":51,"column":2},"end":{"line":54,"column":4}},"28":{"start":{"line":58,"column":2},"end":{"line":60,"column":3}},"29":{"start":{"line":59,"column":4},"end":{"line":59,"column":55}},"30":{"start":{"line":62,"column":21},"end":{"line":62,"column":53}},"31":{"start":{"line":64,"column":15},"end":{"line":64,"column":52}},"32":{"start":{"line":65,"column":2},"end":{"line":67,"column":3}},"33":{"start":{"line":66,"column":4},"end":{"line":66,"column":55}},"34":{"start":{"line":69,"column":57},"end":{"line":69,"column":79}},"35":{"start":{"line":70,"column":2},"end":{"line":73,"column":4}},"36":{"start":{"line":77,"column":15},"end":{"line":77,"column":52}},"37":{"start":{"line":78,"column":2},"end":{"line":80,"column":3}},"38":{"start":{"line":79,"column":4},"end":{"line":79,"column":44}},"39":{"start":{"line":82,"column":26},"end":{"line":82,"column":62}},"40":{"start":{"line":83,"column":2},"end":{"line":85,"column":3}},"41":{"start":{"line":84,"column":4},"end":{"line":84,"column":53}},"42":{"start":{"line":87,"column":25},"end":{"line":87,"column":56}},"43":{"start":{"line":88,"column":2},"end":{"line":88,"column":73}},"44":{"start":{"line":92,"column":2},"end":{"line":94,"column":3}},"45":{"start":{"line":93,"column":4},"end":{"line":93,"column":48}},"46":{"start":{"line":96,"column":21},"end":{"line":96,"column":51}},"47":{"start":{"line":97,"column":15},"end":{"line":97,"column":52}},"48":{"start":{"line":98,"column":2},"end":{"line":100,"column":3}},"49":{"start":{"line":99,"column":4},"end":{"line":99,"column":48}},"50":{"start":{"line":101,"column":2},"end":{"line":101,"column":14}}},"fnMap":{"0":{"name":"verifyPassword","decl":{"start":{"line":12,"column":15},"end":{"line":12,"column":29}},"loc":{"start":{"line":12,"column":58},"end":{"line":14,"column":null}}},"1":{"name":"hashPassword","decl":{"start":{"line":16,"column":15},"end":{"line":16,"column":27}},"loc":{"start":{"line":16,"column":44},"end":{"line":19,"column":null}}},"2":{"name":"register","decl":{"start":{"line":21,"column":22},"end":{"line":21,"column":30}},"loc":{"start":{"line":21,"column":49},"end":{"line":37,"column":null}}},"3":{"name":"login","decl":{"start":{"line":39,"column":22},"end":{"line":39,"column":27}},"loc":{"start":{"line":39,"column":43},"end":{"line":55,"column":null}}},"4":{"name":"refreshToken","decl":{"start":{"line":57,"column":22},"end":{"line":57,"column":34}},"loc":{"start":{"line":57,"column":56},"end":{"line":74,"column":null}}},"5":{"name":"updateMyPassword","decl":{"start":{"line":76,"column":22},"end":{"line":76,"column":38}},"loc":{"start":{"line":76,"column":96},"end":{"line":89,"column":null}}},"6":{"name":"authenticate","decl":{"start":{"line":91,"column":22},"end":{"line":91,"column":34}},"loc":{"start":{"line":91,"column":55},"end":{"line":102,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":23,"column":2},"end":{"line":25,"column":3}},"type":"if","locations":[{"start":{"line":23,"column":2},"end":{"line":25,"column":3}},{"start":{},"end":{}}]},"1":{"loc":{"start":{"line":41,"column":2},"end":{"line":43,"column":3}},"type":"if","locations":[{"start":{"line":41,"column":2},"end":{"line":43,"column":3}},{"start":{},"end":{}}]},"2":{"loc":{"start":{"line":46,"column":2},"end":{"line":48,"column":3}},"type":"if","locations":[{"start":{"line":46,"column":2},"end":{"line":48,"column":3}},{"start":{},"end":{}}]},"3":{"loc":{"start":{"line":58,"column":2},"end":{"line":60,"column":3}},"type":"if","locations":[{"start":{"line":58,"column":2},"end":{"line":60,"column":3}},{"start":{},"end":{}}]},"4":{"loc":{"start":{"line":65,"column":2},"end":{"line":67,"column":3}},"type":"if","locations":[{"start":{"line":65,"column":2},"end":{"line":67,"column":3}},{"start":{},"end":{}}]},"5":{"loc":{"start":{"line":78,"column":2},"end":{"line":80,"column":3}},"type":"if","locations":[{"start":{"line":78,"column":2},"end":{"line":80,"column":3}},{"start":{},"end":{}}]},"6":{"loc":{"start":{"line":83,"column":2},"end":{"line":85,"column":3}},"type":"if","locations":[{"start":{"line":83,"column":2},"end":{"line":85,"column":3}},{"start":{},"end":{}}]},"7":{"loc":{"start":{"line":92,"column":2},"end":{"line":94,"column":3}},"type":"if","locations":[{"start":{"line":92,"column":2},"end":{"line":94,"column":3}},{"start":{},"end":{}}]},"8":{"loc":{"start":{"line":98,"column":2},"end":{"line":100,"column":3}},"type":"if","locations":[{"start":{"line":98,"column":2},"end":{"line":100,"column":3}},{"start":{},"end":{}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":5,"8":5,"9":5,"10":5,"11":72,"12":85,"13":85,"14":86,"15":86,"16":1,"17":85,"18":85,"19":85,"20":73,"21":73,"22":1,"23":72,"24":72,"25":1,"26":71,"27":71,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":73,"45":16,"46":57,"47":57,"48":57,"49":0,"50":57},"f":{"0":72,"1":85,"2":86,"3":73,"4":0,"5":0,"6":73},"b":{"0":[1,85],"1":[1,72],"2":[1,71],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[16,57],"8":[0,57]}} -,"/home/kimjs9105/nb6-sprint-mission/src/service/comment.service.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/service/comment.service.ts","statementMap":{"0":{"start":{"line":20,"column":0},"end":{"line":20,"column":22}},"1":{"start":{"line":92,"column":0},"end":{"line":92,"column":22}},"2":{"start":{"line":100,"column":0},"end":{"line":100,"column":22}},"3":{"start":{"line":113,"column":0},"end":{"line":113,"column":22}},"4":{"start":{"line":126,"column":0},"end":{"line":126,"column":22}},"5":{"start":{"line":139,"column":0},"end":{"line":139,"column":22}},"6":{"start":{"line":1,"column":0},"end":{"line":1,"column":64}},"7":{"start":{"line":2,"column":0},"end":{"line":2,"column":64}},"8":{"start":{"line":3,"column":0},"end":{"line":3,"column":64}},"9":{"start":{"line":4,"column":0},"end":{"line":4,"column":73}},"10":{"start":{"line":7,"column":0},"end":{"line":7,"column":56}},"11":{"start":{"line":8,"column":0},"end":{"line":8,"column":54}},"12":{"start":{"line":10,"column":0},"end":{"line":10,"column":47}},"13":{"start":{"line":22,"column":43},"end":{"line":22,"column":47}},"14":{"start":{"line":25,"column":17},"end":{"line":44,"column":10}},"15":{"start":{"line":26,"column":24},"end":{"line":35,"column":8}},"16":{"start":{"line":27,"column":24},"end":{"line":27,"column":70}},"17":{"start":{"line":28,"column":8},"end":{"line":28,"column":68}},"18":{"start":{"line":28,"column":22},"end":{"line":28,"column":68}},"19":{"start":{"line":30,"column":8},"end":{"line":34,"column":10}},"20":{"start":{"line":36,"column":24},"end":{"line":44,"column":8}},"21":{"start":{"line":37,"column":24},"end":{"line":37,"column":71}},"22":{"start":{"line":38,"column":8},"end":{"line":38,"column":69}},"23":{"start":{"line":38,"column":22},"end":{"line":38,"column":69}},"24":{"start":{"line":39,"column":8},"end":{"line":43,"column":10}},"25":{"start":{"line":47,"column":18},"end":{"line":50,"column":null}},"26":{"start":{"line":53,"column":21},"end":{"line":53,"column":38}},"27":{"start":{"line":54,"column":18},"end":{"line":54,"column":45}},"28":{"start":{"line":57,"column":2},"end":{"line":87,"column":3}},"29":{"start":{"line":58,"column":4},"end":{"line":71,"column":5}},"30":{"start":{"line":59,"column":6},"end":{"line":64,"column":9}},"31":{"start":{"line":66,"column":6},"end":{"line":70,"column":9}},"32":{"start":{"line":73,"column":4},"end":{"line":86,"column":5}},"33":{"start":{"line":74,"column":6},"end":{"line":79,"column":9}},"34":{"start":{"line":81,"column":6},"end":{"line":85,"column":9}},"35":{"start":{"line":89,"column":2},"end":{"line":89,"column":17}},"36":{"start":{"line":93,"column":18},"end":{"line":93,"column":57}},"37":{"start":{"line":94,"column":2},"end":{"line":96,"column":3}},"38":{"start":{"line":95,"column":4},"end":{"line":95,"column":43}},"39":{"start":{"line":97,"column":2},"end":{"line":97,"column":17}},"40":{"start":{"line":104,"column":18},"end":{"line":104,"column":64}},"41":{"start":{"line":105,"column":2},"end":{"line":107,"column":3}},"42":{"start":{"line":106,"column":4},"end":{"line":106,"column":50}},"43":{"start":{"line":109,"column":17},"end":{"line":109,"column":73}},"44":{"start":{"line":110,"column":2},"end":{"line":110,"column":16}},"45":{"start":{"line":117,"column":18},"end":{"line":117,"column":64}},"46":{"start":{"line":118,"column":2},"end":{"line":120,"column":3}},"47":{"start":{"line":119,"column":4},"end":{"line":119,"column":50}},"48":{"start":{"line":122,"column":17},"end":{"line":122,"column":73}},"49":{"start":{"line":123,"column":2},"end":{"line":123,"column":16}},"50":{"start":{"line":127,"column":18},"end":{"line":127,"column":57}},"51":{"start":{"line":128,"column":2},"end":{"line":130,"column":3}},"52":{"start":{"line":129,"column":4},"end":{"line":129,"column":43}},"53":{"start":{"line":132,"column":2},"end":{"line":134,"column":3}},"54":{"start":{"line":133,"column":4},"end":{"line":133,"column":67}},"55":{"start":{"line":136,"column":2},"end":{"line":136,"column":59}},"56":{"start":{"line":140,"column":18},"end":{"line":140,"column":57}},"57":{"start":{"line":141,"column":2},"end":{"line":143,"column":3}},"58":{"start":{"line":142,"column":4},"end":{"line":142,"column":43}},"59":{"start":{"line":145,"column":2},"end":{"line":147,"column":3}},"60":{"start":{"line":146,"column":4},"end":{"line":146,"column":67}},"61":{"start":{"line":149,"column":2},"end":{"line":149,"column":45}}},"fnMap":{"0":{"name":"createComment","decl":{"start":{"line":20,"column":22},"end":{"line":20,"column":35}},"loc":{"start":{"line":20,"column":59},"end":{"line":90,"column":null}}},"1":{"name":"(anonymous_19)","decl":{"start":{"line":26,"column":13},"end":{"line":26,"column":22}},"loc":{"start":{"line":26,"column":24},"end":{"line":35,"column":8}}},"2":{"name":"(anonymous_20)","decl":{"start":{"line":26,"column":24},"end":{"line":26,"column":null}},"loc":{"start":{"line":26,"column":24},"end":{"line":35,"column":7}}},"3":{"name":"(anonymous_21)","decl":{"start":{"line":36,"column":13},"end":{"line":36,"column":22}},"loc":{"start":{"line":36,"column":24},"end":{"line":44,"column":8}}},"4":{"name":"(anonymous_22)","decl":{"start":{"line":36,"column":24},"end":{"line":36,"column":null}},"loc":{"start":{"line":36,"column":24},"end":{"line":44,"column":7}}},"5":{"name":"getComment","decl":{"start":{"line":92,"column":22},"end":{"line":92,"column":32}},"loc":{"start":{"line":92,"column":43},"end":{"line":98,"column":null}}},"6":{"name":"getCommentListByArticleId","decl":{"start":{"line":100,"column":22},"end":{"line":100,"column":47}},"loc":{"start":{"line":102,"column":32},"end":{"line":111,"column":null}}},"7":{"name":"getCommentListByProductId","decl":{"start":{"line":113,"column":22},"end":{"line":113,"column":47}},"loc":{"start":{"line":115,"column":32},"end":{"line":124,"column":null}}},"8":{"name":"updateComment","decl":{"start":{"line":126,"column":22},"end":{"line":126,"column":35}},"loc":{"start":{"line":126,"column":79},"end":{"line":137,"column":null}}},"9":{"name":"deleteComment","decl":{"start":{"line":139,"column":22},"end":{"line":139,"column":35}},"loc":{"start":{"line":139,"column":62},"end":{"line":150,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":25,"column":17},"end":{"line":44,"column":10}},"type":"cond-expr","locations":[{"start":{"line":26,"column":6},"end":{"line":35,"column":10}},{"start":{"line":36,"column":6},"end":{"line":44,"column":10}}]},"1":{"loc":{"start":{"line":28,"column":8},"end":{"line":28,"column":68}},"type":"if","locations":[{"start":{"line":28,"column":8},"end":{"line":28,"column":68}},{"start":{},"end":{}}]},"2":{"loc":{"start":{"line":38,"column":8},"end":{"line":38,"column":69}},"type":"if","locations":[{"start":{"line":38,"column":8},"end":{"line":38,"column":69}},{"start":{},"end":{}}]},"3":{"loc":{"start":{"line":49,"column":15},"end":{"line":49,"column":32}},"type":"cond-expr","locations":[{"start":{"line":49,"column":15},"end":{"line":49,"column":24}},{"start":{"line":49,"column":28},"end":{"line":49,"column":32}}]},"4":{"loc":{"start":{"line":49,"column":15},"end":{"line":49,"column":28}},"type":"binary-expr","locations":[{"start":{"line":49,"column":15},"end":{"line":49,"column":28}},{"start":{"line":49,"column":15},"end":{"line":49,"column":28}}]},"5":{"loc":{"start":{"line":50,"column":15},"end":{"line":50,"column":32}},"type":"cond-expr","locations":[{"start":{"line":50,"column":15},"end":{"line":50,"column":24}},{"start":{"line":50,"column":28},"end":{"line":50,"column":32}}]},"6":{"loc":{"start":{"line":50,"column":15},"end":{"line":50,"column":28}},"type":"binary-expr","locations":[{"start":{"line":50,"column":15},"end":{"line":50,"column":28}},{"start":{"line":50,"column":15},"end":{"line":50,"column":28}}]},"7":{"loc":{"start":{"line":57,"column":2},"end":{"line":87,"column":3}},"type":"if","locations":[{"start":{"line":57,"column":2},"end":{"line":87,"column":3}},{"start":{},"end":{}}]},"8":{"loc":{"start":{"line":58,"column":4},"end":{"line":71,"column":5}},"type":"if","locations":[{"start":{"line":58,"column":4},"end":{"line":71,"column":5}},{"start":{},"end":{}}]},"9":{"loc":{"start":{"line":73,"column":4},"end":{"line":86,"column":5}},"type":"if","locations":[{"start":{"line":73,"column":4},"end":{"line":86,"column":5}},{"start":{},"end":{}}]},"10":{"loc":{"start":{"line":94,"column":2},"end":{"line":96,"column":3}},"type":"if","locations":[{"start":{"line":94,"column":2},"end":{"line":96,"column":3}},{"start":{},"end":{}}]},"11":{"loc":{"start":{"line":105,"column":2},"end":{"line":107,"column":3}},"type":"if","locations":[{"start":{"line":105,"column":2},"end":{"line":107,"column":3}},{"start":{},"end":{}}]},"12":{"loc":{"start":{"line":118,"column":2},"end":{"line":120,"column":3}},"type":"if","locations":[{"start":{"line":118,"column":2},"end":{"line":120,"column":3}},{"start":{},"end":{}}]},"13":{"loc":{"start":{"line":128,"column":2},"end":{"line":130,"column":3}},"type":"if","locations":[{"start":{"line":128,"column":2},"end":{"line":130,"column":3}},{"start":{},"end":{}}]},"14":{"loc":{"start":{"line":132,"column":2},"end":{"line":134,"column":3}},"type":"if","locations":[{"start":{"line":132,"column":2},"end":{"line":134,"column":3}},{"start":{},"end":{}}]},"15":{"loc":{"start":{"line":141,"column":2},"end":{"line":143,"column":3}},"type":"if","locations":[{"start":{"line":141,"column":2},"end":{"line":143,"column":3}},{"start":{},"end":{}}]},"16":{"loc":{"start":{"line":145,"column":2},"end":{"line":147,"column":3}},"type":"if","locations":[{"start":{"line":145,"column":2},"end":{"line":147,"column":3}},{"start":{},"end":{}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":5,"8":5,"9":5,"10":5,"11":5,"12":5,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0},"b":{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0]}} -,"/home/kimjs9105/nb6-sprint-mission/src/service/favorite.service.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/service/favorite.service.ts","statementMap":{"0":{"start":{"line":6,"column":0},"end":{"line":6,"column":22}},"1":{"start":{"line":20,"column":0},"end":{"line":20,"column":22}},"2":{"start":{"line":1,"column":0},"end":{"line":1,"column":66}},"3":{"start":{"line":2,"column":0},"end":{"line":2,"column":64}},"4":{"start":{"line":3,"column":0},"end":{"line":3,"column":54}},"5":{"start":{"line":4,"column":0},"end":{"line":4,"column":58}},"6":{"start":{"line":7,"column":26},"end":{"line":7,"column":72}},"7":{"start":{"line":8,"column":2},"end":{"line":10,"column":3}},"8":{"start":{"line":9,"column":4},"end":{"line":9,"column":50}},"9":{"start":{"line":12,"column":27},"end":{"line":12,"column":83}},"10":{"start":{"line":13,"column":2},"end":{"line":15,"column":3}},"11":{"start":{"line":14,"column":4},"end":{"line":14,"column":51}},"12":{"start":{"line":17,"column":2},"end":{"line":17,"column":66}},"13":{"start":{"line":21,"column":26},"end":{"line":21,"column":72}},"14":{"start":{"line":22,"column":2},"end":{"line":24,"column":3}},"15":{"start":{"line":23,"column":4},"end":{"line":23,"column":50}},"16":{"start":{"line":26,"column":27},"end":{"line":26,"column":83}},"17":{"start":{"line":27,"column":2},"end":{"line":29,"column":3}},"18":{"start":{"line":28,"column":4},"end":{"line":28,"column":47}},"19":{"start":{"line":31,"column":2},"end":{"line":31,"column":64}}},"fnMap":{"0":{"name":"createFavorite","decl":{"start":{"line":6,"column":22},"end":{"line":6,"column":36}},"loc":{"start":{"line":6,"column":70},"end":{"line":18,"column":null}}},"1":{"name":"deleteFavorite","decl":{"start":{"line":20,"column":22},"end":{"line":20,"column":36}},"loc":{"start":{"line":20,"column":70},"end":{"line":32,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":8,"column":2},"end":{"line":10,"column":3}},"type":"if","locations":[{"start":{"line":8,"column":2},"end":{"line":10,"column":3}},{"start":{},"end":{}}]},"1":{"loc":{"start":{"line":13,"column":2},"end":{"line":15,"column":3}},"type":"if","locations":[{"start":{"line":13,"column":2},"end":{"line":15,"column":3}},{"start":{},"end":{}}]},"2":{"loc":{"start":{"line":22,"column":2},"end":{"line":24,"column":3}},"type":"if","locations":[{"start":{"line":22,"column":2},"end":{"line":24,"column":3}},{"start":{},"end":{}}]},"3":{"loc":{"start":{"line":27,"column":2},"end":{"line":29,"column":3}},"type":"if","locations":[{"start":{"line":27,"column":2},"end":{"line":29,"column":3}},{"start":{},"end":{}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0},"f":{"0":0,"1":0},"b":{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0]}} -,"/home/kimjs9105/nb6-sprint-mission/src/service/like.service.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/service/like.service.ts","statementMap":{"0":{"start":{"line":6,"column":0},"end":{"line":6,"column":22}},"1":{"start":{"line":20,"column":0},"end":{"line":20,"column":22}},"2":{"start":{"line":1,"column":0},"end":{"line":1,"column":58}},"3":{"start":{"line":2,"column":0},"end":{"line":2,"column":64}},"4":{"start":{"line":3,"column":0},"end":{"line":3,"column":54}},"5":{"start":{"line":4,"column":0},"end":{"line":4,"column":58}},"6":{"start":{"line":7,"column":26},"end":{"line":7,"column":72}},"7":{"start":{"line":8,"column":2},"end":{"line":10,"column":3}},"8":{"start":{"line":9,"column":4},"end":{"line":9,"column":50}},"9":{"start":{"line":12,"column":23},"end":{"line":12,"column":71}},"10":{"start":{"line":13,"column":2},"end":{"line":15,"column":3}},"11":{"start":{"line":14,"column":4},"end":{"line":14,"column":47}},"12":{"start":{"line":17,"column":2},"end":{"line":17,"column":58}},"13":{"start":{"line":21,"column":26},"end":{"line":21,"column":72}},"14":{"start":{"line":22,"column":2},"end":{"line":24,"column":3}},"15":{"start":{"line":23,"column":4},"end":{"line":23,"column":50}},"16":{"start":{"line":26,"column":23},"end":{"line":26,"column":71}},"17":{"start":{"line":27,"column":2},"end":{"line":29,"column":3}},"18":{"start":{"line":28,"column":4},"end":{"line":28,"column":43}},"19":{"start":{"line":31,"column":2},"end":{"line":31,"column":52}}},"fnMap":{"0":{"name":"createLike","decl":{"start":{"line":6,"column":22},"end":{"line":6,"column":32}},"loc":{"start":{"line":6,"column":66},"end":{"line":18,"column":null}}},"1":{"name":"deleteLike","decl":{"start":{"line":20,"column":22},"end":{"line":20,"column":32}},"loc":{"start":{"line":20,"column":66},"end":{"line":32,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":8,"column":2},"end":{"line":10,"column":3}},"type":"if","locations":[{"start":{"line":8,"column":2},"end":{"line":10,"column":3}},{"start":{},"end":{}}]},"1":{"loc":{"start":{"line":13,"column":2},"end":{"line":15,"column":3}},"type":"if","locations":[{"start":{"line":13,"column":2},"end":{"line":15,"column":3}},{"start":{},"end":{}}]},"2":{"loc":{"start":{"line":22,"column":2},"end":{"line":24,"column":3}},"type":"if","locations":[{"start":{"line":22,"column":2},"end":{"line":24,"column":3}},{"start":{},"end":{}}]},"3":{"loc":{"start":{"line":27,"column":2},"end":{"line":29,"column":3}},"type":"if","locations":[{"start":{"line":27,"column":2},"end":{"line":29,"column":3}},{"start":{},"end":{}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0},"f":{"0":0,"1":0},"b":{"0":[0,0],"1":[0,0],"2":[0,0],"3":[0,0]}} -,"/home/kimjs9105/nb6-sprint-mission/src/service/notification.service.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/service/notification.service.ts","statementMap":{"0":{"start":{"line":4,"column":0},"end":{"line":4,"column":22}},"1":{"start":{"line":10,"column":0},"end":{"line":10,"column":22}},"2":{"start":{"line":1,"column":0},"end":{"line":1,"column":54}},"3":{"start":{"line":2,"column":0},"end":{"line":2,"column":74}},"4":{"start":{"line":5,"column":27},"end":{"line":5,"column":84}},"5":{"start":{"line":7,"column":2},"end":{"line":7,"column":26}},"6":{"start":{"line":11,"column":26},"end":{"line":11,"column":87}},"7":{"start":{"line":12,"column":2},"end":{"line":12,"column":80}},"8":{"start":{"line":12,"column":24},"end":{"line":12,"column":80}},"9":{"start":{"line":14,"column":29},"end":{"line":14,"column":92}},"10":{"start":{"line":15,"column":2},"end":{"line":15,"column":28}}},"fnMap":{"0":{"name":"getNotificationList","decl":{"start":{"line":4,"column":22},"end":{"line":4,"column":41}},"loc":{"start":{"line":4,"column":56},"end":{"line":8,"column":null}}},"1":{"name":"updateNotificationInfo","decl":{"start":{"line":10,"column":22},"end":{"line":10,"column":44}},"loc":{"start":{"line":10,"column":67},"end":{"line":16,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":12,"column":2},"end":{"line":12,"column":80}},"type":"if","locations":[{"start":{"line":12,"column":2},"end":{"line":12,"column":80}},{"start":{},"end":{}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0},"f":{"0":0,"1":0},"b":{"0":[0,0]}} -,"/home/kimjs9105/nb6-sprint-mission/src/service/product.service.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/service/product.service.ts","statementMap":{"0":{"start":{"line":16,"column":0},"end":{"line":16,"column":22}},"1":{"start":{"line":25,"column":0},"end":{"line":25,"column":22}},"2":{"start":{"line":33,"column":0},"end":{"line":33,"column":22}},"3":{"start":{"line":41,"column":0},"end":{"line":41,"column":22}},"4":{"start":{"line":82,"column":0},"end":{"line":82,"column":22}},"5":{"start":{"line":1,"column":0},"end":{"line":1,"column":56}},"6":{"start":{"line":2,"column":0},"end":{"line":2,"column":54}},"7":{"start":{"line":3,"column":0},"end":{"line":3,"column":63}},"8":{"start":{"line":4,"column":0},"end":{"line":4,"column":64}},"9":{"start":{"line":5,"column":0},"end":{"line":5,"column":72}},"10":{"start":{"line":8,"column":0},"end":{"line":8,"column":46}},"11":{"start":{"line":17,"column":25},"end":{"line":17,"column":69}},"12":{"start":{"line":18,"column":2},"end":{"line":21,"column":null}},"13":{"start":{"line":26,"column":18},"end":{"line":26,"column":70}},"14":{"start":{"line":27,"column":2},"end":{"line":29,"column":3}},"15":{"start":{"line":28,"column":4},"end":{"line":28,"column":43}},"16":{"start":{"line":30,"column":2},"end":{"line":30,"column":17}},"17":{"start":{"line":34,"column":2},"end":{"line":39,"column":null}},"18":{"start":{"line":37,"column":19},"end":{"line":37,"column":91}},"19":{"start":{"line":38,"column":2},"end":{"line":38,"column":18}},"20":{"start":{"line":42,"column":26},"end":{"line":42,"column":65}},"21":{"start":{"line":43,"column":2},"end":{"line":45,"column":3}},"22":{"start":{"line":44,"column":4},"end":{"line":44,"column":43}},"23":{"start":{"line":46,"column":2},"end":{"line":48,"column":3}},"24":{"start":{"line":47,"column":4},"end":{"line":47,"column":67}},"25":{"start":{"line":49,"column":25},"end":{"line":49,"column":86}},"26":{"start":{"line":51,"column":20},"end":{"line":51,"column":38}},"27":{"start":{"line":52,"column":28},"end":{"line":52,"column":81}},"28":{"start":{"line":54,"column":21},"end":{"line":54,"column":41}},"29":{"start":{"line":55,"column":18},"end":{"line":55,"column":45}},"30":{"start":{"line":57,"column":2},"end":{"line":77,"column":3}},"31":{"start":{"line":58,"column":24},"end":{"line":58,"column":82}},"32":{"start":{"line":60,"column":4},"end":{"line":69,"column":6}},"33":{"start":{"line":62,"column":8},"end":{"line":67,"column":10}},"34":{"start":{"line":71,"column":4},"end":{"line":76,"column":7}},"35":{"start":{"line":72,"column":6},"end":{"line":75,"column":9}},"36":{"start":{"line":79,"column":2},"end":{"line":79,"column":24}},"37":{"start":{"line":83,"column":26},"end":{"line":83,"column":65}},"38":{"start":{"line":84,"column":2},"end":{"line":86,"column":3}},"39":{"start":{"line":85,"column":4},"end":{"line":85,"column":43}},"40":{"start":{"line":87,"column":2},"end":{"line":89,"column":3}},"41":{"start":{"line":88,"column":4},"end":{"line":88,"column":67}},"42":{"start":{"line":90,"column":2},"end":{"line":90,"column":45}}},"fnMap":{"0":{"name":"createProduct","decl":{"start":{"line":16,"column":22},"end":{"line":16,"column":35}},"loc":{"start":{"line":16,"column":59},"end":{"line":23,"column":null}}},"1":{"name":"getProduct","decl":{"start":{"line":25,"column":22},"end":{"line":25,"column":32}},"loc":{"start":{"line":25,"column":43},"end":{"line":31,"column":null}}},"2":{"name":"getProductList","decl":{"start":{"line":33,"column":22},"end":{"line":33,"column":36}},"loc":{"start":{"line":33,"column":36},"end":{"line":39,"column":null}}},"3":{"name":"(anonymous_22)","decl":{"start":{"line":34,"column":2},"end":{"line":34,"column":30}},"loc":{"start":{"line":35,"column":38},"end":{"line":39,"column":1}}},"4":{"name":"updateProduct","decl":{"start":{"line":41,"column":22},"end":{"line":41,"column":35}},"loc":{"start":{"line":41,"column":71},"end":{"line":80,"column":null}}},"5":{"name":"(anonymous_25)","decl":{"start":{"line":61,"column":28},"end":{"line":61,"column":29}},"loc":{"start":{"line":62,"column":8},"end":{"line":67,"column":10}}},"6":{"name":"(anonymous_26)","decl":{"start":{"line":71,"column":30},"end":{"line":71,"column":31}},"loc":{"start":{"line":71,"column":39},"end":{"line":76,"column":5}}},"7":{"name":"deleteProduct","decl":{"start":{"line":82,"column":22},"end":{"line":82,"column":35}},"loc":{"start":{"line":82,"column":62},"end":{"line":91,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":27,"column":2},"end":{"line":29,"column":3}},"type":"if","locations":[{"start":{"line":27,"column":2},"end":{"line":29,"column":3}},{"start":{},"end":{}}]},"1":{"loc":{"start":{"line":35,"column":2},"end":{"line":35,"column":38}},"type":"default-arg","locations":[{"start":{"line":35,"column":36},"end":{"line":35,"column":38}}]},"2":{"loc":{"start":{"line":43,"column":2},"end":{"line":45,"column":3}},"type":"if","locations":[{"start":{"line":43,"column":2},"end":{"line":45,"column":3}},{"start":{},"end":{}}]},"3":{"loc":{"start":{"line":46,"column":2},"end":{"line":48,"column":3}},"type":"if","locations":[{"start":{"line":46,"column":2},"end":{"line":48,"column":3}},{"start":{},"end":{}}]},"4":{"loc":{"start":{"line":57,"column":2},"end":{"line":77,"column":3}},"type":"if","locations":[{"start":{"line":57,"column":2},"end":{"line":77,"column":3}},{"start":{},"end":{}}]},"5":{"loc":{"start":{"line":57,"column":6},"end":{"line":57,"column":56}},"type":"binary-expr","locations":[{"start":{"line":57,"column":6},"end":{"line":57,"column":16}},{"start":{"line":57,"column":20},"end":{"line":57,"column":56}}]},"6":{"loc":{"start":{"line":58,"column":24},"end":{"line":58,"column":82}},"type":"cond-expr","locations":[{"start":{"line":58,"column":61},"end":{"line":58,"column":70}},{"start":{"line":58,"column":73},"end":{"line":58,"column":82}}]},"7":{"loc":{"start":{"line":84,"column":2},"end":{"line":86,"column":3}},"type":"if","locations":[{"start":{"line":84,"column":2},"end":{"line":86,"column":3}},{"start":{},"end":{}}]},"8":{"loc":{"start":{"line":87,"column":2},"end":{"line":89,"column":3}},"type":"if","locations":[{"start":{"line":87,"column":2},"end":{"line":89,"column":3}},{"start":{},"end":{}}]}},"s":{"0":6,"1":6,"2":6,"3":6,"4":6,"5":6,"6":6,"7":6,"8":6,"9":6,"10":6,"11":15,"12":15,"13":6,"14":6,"15":3,"16":3,"17":9,"18":9,"19":9,"20":11,"21":11,"22":2,"23":9,"24":2,"25":7,"26":7,"27":7,"28":7,"29":7,"30":7,"31":2,"32":2,"33":2,"34":2,"35":2,"36":7,"37":6,"38":6,"39":2,"40":4,"41":2,"42":2},"f":{"0":15,"1":6,"2":9,"3":9,"4":11,"5":2,"6":2,"7":6},"b":{"0":[3,3],"1":[1],"2":[2,9],"3":[2,7],"4":[2,5],"5":[7,2],"6":[1,1],"7":[2,4],"8":[2,2]}} -,"/home/kimjs9105/nb6-sprint-mission/src/service/user.service.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/service/user.service.ts","statementMap":{"0":{"start":{"line":10,"column":0},"end":{"line":10,"column":22}},"1":{"start":{"line":19,"column":0},"end":{"line":19,"column":22}},"2":{"start":{"line":24,"column":0},"end":{"line":24,"column":22}},"3":{"start":{"line":34,"column":0},"end":{"line":34,"column":22}},"4":{"start":{"line":3,"column":0},"end":{"line":3,"column":58}},"5":{"start":{"line":4,"column":0},"end":{"line":4,"column":64}},"6":{"start":{"line":5,"column":0},"end":{"line":5,"column":54}},"7":{"start":{"line":11,"column":15},"end":{"line":11,"column":52}},"8":{"start":{"line":12,"column":2},"end":{"line":14,"column":3}},"9":{"start":{"line":13,"column":4},"end":{"line":13,"column":44}},"10":{"start":{"line":16,"column":2},"end":{"line":16,"column":14}},"11":{"start":{"line":20,"column":22},"end":{"line":20,"column":68}},"12":{"start":{"line":21,"column":2},"end":{"line":21,"column":21}},"13":{"start":{"line":28,"column":17},"end":{"line":30,"column":4}},"14":{"start":{"line":31,"column":2},"end":{"line":31,"column":16}},"15":{"start":{"line":38,"column":17},"end":{"line":38,"column":89}},"16":{"start":{"line":39,"column":2},"end":{"line":39,"column":16}}},"fnMap":{"0":{"name":"getUser","decl":{"start":{"line":10,"column":22},"end":{"line":10,"column":29}},"loc":{"start":{"line":10,"column":44},"end":{"line":17,"column":null}}},"1":{"name":"updateUser","decl":{"start":{"line":19,"column":22},"end":{"line":19,"column":32}},"loc":{"start":{"line":19,"column":78},"end":{"line":22,"column":null}}},"2":{"name":"getMyProductList","decl":{"start":{"line":24,"column":22},"end":{"line":24,"column":38}},"loc":{"start":{"line":26,"column":30},"end":{"line":32,"column":null}}},"3":{"name":"getMyFavoriteList","decl":{"start":{"line":34,"column":22},"end":{"line":34,"column":39}},"loc":{"start":{"line":36,"column":30},"end":{"line":40,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":12,"column":2},"end":{"line":14,"column":3}},"type":"if","locations":[{"start":{"line":12,"column":2},"end":{"line":14,"column":3}},{"start":{},"end":{}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0},"f":{"0":0,"1":0,"2":0,"3":0},"b":{"0":[0,0]}} -,"/home/kimjs9105/nb6-sprint-mission/src/structs/article.structs.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/structs/article.structs.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":82}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":60}},"2":{"start":{"line":4,"column":13},"end":{"line":4,"column":59}},"3":{"start":{"line":6,"column":13},"end":{"line":10,"column":3}},"4":{"start":{"line":7,"column":57},"end":{"line":7,"column":69}},"5":{"start":{"line":12,"column":13},"end":{"line":12,"column":72}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":7,"column":46},"end":{"line":7,"column":47}},"loc":{"start":{"line":7,"column":57},"end":{"line":7,"column":69}}}},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":17,"5":5},"f":{"0":17},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/structs/auth.structs.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/structs/auth.structs.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":73}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":31}},"2":{"start":{"line":4,"column":20},"end":{"line":4,"column":72}},"3":{"start":{"line":4,"column":57},"end":{"line":4,"column":71}},"4":{"start":{"line":6,"column":13},"end":{"line":11,"column":3}},"5":{"start":{"line":13,"column":13},"end":{"line":16,"column":3}}},"fnMap":{"0":{"name":"(anonymous_1)","decl":{"start":{"line":4,"column":46},"end":{"line":4,"column":47}},"loc":{"start":{"line":4,"column":57},"end":{"line":4,"column":71}}}},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":166,"4":5,"5":5},"f":{"0":166},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/structs/comment.struct.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/structs/comment.struct.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":73}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":62}},"2":{"start":{"line":4,"column":13},"end":{"line":8,"column":3}},"3":{"start":{"line":10,"column":13},"end":{"line":10,"column":61}},"4":{"start":{"line":12,"column":13},"end":{"line":12,"column":63}}},"fnMap":{},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":5},"f":{},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/structs/common.structs.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/structs/common.structs.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":100}},"1":{"start":{"line":4,"column":22},"end":{"line":4,"column":77}},"2":{"start":{"line":4,"column":61},"end":{"line":4,"column":76}},"3":{"start":{"line":6,"column":13},"end":{"line":8,"column":3}},"4":{"start":{"line":10,"column":13},"end":{"line":15,"column":3}},"5":{"start":{"line":17,"column":13},"end":{"line":22,"column":3}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":4,"column":50},"end":{"line":4,"column":51}},"loc":{"start":{"line":4,"column":61},"end":{"line":4,"column":76}}}},"branchMap":{},"s":{"0":5,"1":5,"2":30,"3":5,"4":5,"5":5},"f":{"0":30},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/structs/product.struct.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/structs/product.struct.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":93}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":60}},"2":{"start":{"line":4,"column":13},"end":{"line":10,"column":3}},"3":{"start":{"line":5,"column":56},"end":{"line":5,"column":68}},"4":{"start":{"line":12,"column":13},"end":{"line":12,"column":59}},"5":{"start":{"line":14,"column":13},"end":{"line":14,"column":72}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":5,"column":45},"end":{"line":5,"column":46}},"loc":{"start":{"line":5,"column":56},"end":{"line":5,"column":68}}}},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":20,"4":5,"5":5},"f":{"0":20},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/src/structs/user.structs.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/src/structs/user.structs.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":64}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":60}},"2":{"start":{"line":4,"column":13},"end":{"line":10,"column":2}},"3":{"start":{"line":12,"column":13},"end":{"line":15,"column":3}},"4":{"start":{"line":17,"column":13},"end":{"line":17,"column":61}},"5":{"start":{"line":19,"column":13},"end":{"line":19,"column":62}}},"fnMap":{},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5},"f":{},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/test/helper/article.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/test/helper/article.ts","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":3,"column":22}},"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":49}},"2":{"start":{"line":5,"column":2},"end":{"line":5,"column":59}},"3":{"start":{"line":7,"column":16},"end":{"line":9,"column":4}},"4":{"start":{"line":12,"column":19},"end":{"line":15,"column":5}},"5":{"start":{"line":12,"column":55},"end":{"line":14,"column":null}},"6":{"start":{"line":18,"column":2},"end":{"line":18,"column":60}},"7":{"start":{"line":20,"column":2},"end":{"line":20,"column":29}}},"fnMap":{"0":{"name":"createArticlesWithUsers","decl":{"start":{"line":3,"column":22},"end":{"line":3,"column":45}},"loc":{"start":{"line":3,"column":85},"end":{"line":21,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":12,"column":37},"end":{"line":12,"column":38}},"loc":{"start":{"line":12,"column":55},"end":{"line":14,"column":null}}}},"branchMap":{},"s":{"0":2,"1":2,"2":5,"3":5,"4":5,"5":50,"6":5,"7":5},"f":{"0":5,"1":50},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/test/helper/mockdata.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/test/helper/mockdata.ts","statementMap":{"0":{"start":{"line":1,"column":13},"end":{"line":32,"column":2}},"1":{"start":{"line":34,"column":13},"end":{"line":230,"column":2}},"2":{"start":{"line":232,"column":13},"end":{"line":293,"column":2}}},"fnMap":{},"branchMap":{},"s":{"0":4,"1":4,"2":4},"f":{},"b":{}} -,"/home/kimjs9105/nb6-sprint-mission/test/helper/product.ts": {"path":"/home/kimjs9105/nb6-sprint-mission/test/helper/product.ts","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":3,"column":22}},"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":49}},"2":{"start":{"line":5,"column":2},"end":{"line":5,"column":59}},"3":{"start":{"line":7,"column":16},"end":{"line":9,"column":4}},"4":{"start":{"line":12,"column":19},"end":{"line":15,"column":5}},"5":{"start":{"line":12,"column":57},"end":{"line":14,"column":null}},"6":{"start":{"line":18,"column":2},"end":{"line":18,"column":60}},"7":{"start":{"line":20,"column":2},"end":{"line":20,"column":29}}},"fnMap":{"0":{"name":"createProductsWithUsers","decl":{"start":{"line":3,"column":22},"end":{"line":3,"column":45}},"loc":{"start":{"line":3,"column":85},"end":{"line":21,"column":null}}},"1":{"name":"(anonymous_9)","decl":{"start":{"line":12,"column":37},"end":{"line":12,"column":38}},"loc":{"start":{"line":12,"column":57},"end":{"line":14,"column":null}}}},"branchMap":{},"s":{"0":2,"1":2,"2":5,"3":5,"4":5,"5":120,"6":5,"7":5},"f":{"0":5,"1":120},"b":{}} -} diff --git a/coverage/lcov-report/base.css b/coverage/lcov-report/base.css deleted file mode 100644 index f418035b4..000000000 --- a/coverage/lcov-report/base.css +++ /dev/null @@ -1,224 +0,0 @@ -body, html { - margin:0; padding: 0; - height: 100%; -} -body { - font-family: Helvetica Neue, Helvetica, Arial; - font-size: 14px; - color:#333; -} -.small { font-size: 12px; } -*, *:after, *:before { - -webkit-box-sizing:border-box; - -moz-box-sizing:border-box; - box-sizing:border-box; - } -h1 { font-size: 20px; margin: 0;} -h2 { font-size: 14px; } -pre { - font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; - margin: 0; - padding: 0; - -moz-tab-size: 2; - -o-tab-size: 2; - tab-size: 2; -} -a { color:#0074D9; text-decoration:none; } -a:hover { text-decoration:underline; } -.strong { font-weight: bold; } -.space-top1 { padding: 10px 0 0 0; } -.pad2y { padding: 20px 0; } -.pad1y { padding: 10px 0; } -.pad2x { padding: 0 20px; } -.pad2 { padding: 20px; } -.pad1 { padding: 10px; } -.space-left2 { padding-left:55px; } -.space-right2 { padding-right:20px; } -.center { text-align:center; } -.clearfix { display:block; } -.clearfix:after { - content:''; - display:block; - height:0; - clear:both; - visibility:hidden; - } -.fl { float: left; } -@media only screen and (max-width:640px) { - .col3 { width:100%; max-width:100%; } - .hide-mobile { display:none!important; } -} - -.quiet { - color: #7f7f7f; - color: rgba(0,0,0,0.5); -} -.quiet a { opacity: 0.7; } - -.fraction { - font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; - font-size: 10px; - color: #555; - background: #E8E8E8; - padding: 4px 5px; - border-radius: 3px; - vertical-align: middle; -} - -div.path a:link, div.path a:visited { color: #333; } -table.coverage { - border-collapse: collapse; - margin: 10px 0 0 0; - padding: 0; -} - -table.coverage td { - margin: 0; - padding: 0; - vertical-align: top; -} -table.coverage td.line-count { - text-align: right; - padding: 0 5px 0 20px; -} -table.coverage td.line-coverage { - text-align: right; - padding-right: 10px; - min-width:20px; -} - -table.coverage td span.cline-any { - display: inline-block; - padding: 0 5px; - width: 100%; -} -.missing-if-branch { - display: inline-block; - margin-right: 5px; - border-radius: 3px; - position: relative; - padding: 0 4px; - background: #333; - color: yellow; -} - -.skip-if-branch { - display: none; - margin-right: 10px; - position: relative; - padding: 0 4px; - background: #ccc; - color: white; -} -.missing-if-branch .typ, .skip-if-branch .typ { - color: inherit !important; -} -.coverage-summary { - border-collapse: collapse; - width: 100%; -} -.coverage-summary tr { border-bottom: 1px solid #bbb; } -.keyline-all { border: 1px solid #ddd; } -.coverage-summary td, .coverage-summary th { padding: 10px; } -.coverage-summary tbody { border: 1px solid #bbb; } -.coverage-summary td { border-right: 1px solid #bbb; } -.coverage-summary td:last-child { border-right: none; } -.coverage-summary th { - text-align: left; - font-weight: normal; - white-space: nowrap; -} -.coverage-summary th.file { border-right: none !important; } -.coverage-summary th.pct { } -.coverage-summary th.pic, -.coverage-summary th.abs, -.coverage-summary td.pct, -.coverage-summary td.abs { text-align: right; } -.coverage-summary td.file { white-space: nowrap; } -.coverage-summary td.pic { min-width: 120px !important; } -.coverage-summary tfoot td { } - -.coverage-summary .sorter { - height: 10px; - width: 7px; - display: inline-block; - margin-left: 0.5em; - background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; -} -.coverage-summary .sorted .sorter { - background-position: 0 -20px; -} -.coverage-summary .sorted-desc .sorter { - background-position: 0 -10px; -} -.status-line { height: 10px; } -/* yellow */ -.cbranch-no { background: yellow !important; color: #111; } -/* dark red */ -.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } -.low .chart { border:1px solid #C21F39 } -.highlighted, -.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{ - background: #C21F39 !important; -} -/* medium red */ -.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } -/* light red */ -.low, .cline-no { background:#FCE1E5 } -/* light green */ -.high, .cline-yes { background:rgb(230,245,208) } -/* medium green */ -.cstat-yes { background:rgb(161,215,106) } -/* dark green */ -.status-line.high, .high .cover-fill { background:rgb(77,146,33) } -.high .chart { border:1px solid rgb(77,146,33) } -/* dark yellow (gold) */ -.status-line.medium, .medium .cover-fill { background: #f9cd0b; } -.medium .chart { border:1px solid #f9cd0b; } -/* light yellow */ -.medium { background: #fff4c2; } - -.cstat-skip { background: #ddd; color: #111; } -.fstat-skip { background: #ddd; color: #111 !important; } -.cbranch-skip { background: #ddd !important; color: #111; } - -span.cline-neutral { background: #eaeaea; } - -.coverage-summary td.empty { - opacity: .5; - padding-top: 4px; - padding-bottom: 4px; - line-height: 1; - color: #888; -} - -.cover-fill, .cover-empty { - display:inline-block; - height: 12px; -} -.chart { - line-height: 0; -} -.cover-empty { - background: white; -} -.cover-full { - border-right: none !important; -} -pre.prettyprint { - border: none !important; - padding: 0 !important; - margin: 0 !important; -} -.com { color: #999 !important; } -.ignore-none { color: #999; font-weight: normal; } - -.wrapper { - min-height: 100%; - height: auto !important; - height: 100%; - margin: 0 auto -48px; -} -.footer, .push { - height: 48px; -} diff --git a/coverage/lcov-report/block-navigation.js b/coverage/lcov-report/block-navigation.js deleted file mode 100644 index 530d1ed2b..000000000 --- a/coverage/lcov-report/block-navigation.js +++ /dev/null @@ -1,87 +0,0 @@ -/* eslint-disable */ -var jumpToCode = (function init() { - // Classes of code we would like to highlight in the file view - var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no']; - - // Elements to highlight in the file listing view - var fileListingElements = ['td.pct.low']; - - // We don't want to select elements that are direct descendants of another match - var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > ` - - // Selector that finds elements on the page to which we can jump - var selector = - fileListingElements.join(', ') + - ', ' + - notSelector + - missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b` - - // The NodeList of matching elements - var missingCoverageElements = document.querySelectorAll(selector); - - var currentIndex; - - function toggleClass(index) { - missingCoverageElements - .item(currentIndex) - .classList.remove('highlighted'); - missingCoverageElements.item(index).classList.add('highlighted'); - } - - function makeCurrent(index) { - toggleClass(index); - currentIndex = index; - missingCoverageElements.item(index).scrollIntoView({ - behavior: 'smooth', - block: 'center', - inline: 'center' - }); - } - - function goToPrevious() { - var nextIndex = 0; - if (typeof currentIndex !== 'number' || currentIndex === 0) { - nextIndex = missingCoverageElements.length - 1; - } else if (missingCoverageElements.length > 1) { - nextIndex = currentIndex - 1; - } - - makeCurrent(nextIndex); - } - - function goToNext() { - var nextIndex = 0; - - if ( - typeof currentIndex === 'number' && - currentIndex < missingCoverageElements.length - 1 - ) { - nextIndex = currentIndex + 1; - } - - makeCurrent(nextIndex); - } - - return function jump(event) { - if ( - document.getElementById('fileSearch') === document.activeElement && - document.activeElement != null - ) { - // if we're currently focused on the search input, we don't want to navigate - return; - } - - switch (event.which) { - case 78: // n - case 74: // j - goToNext(); - break; - case 66: // b - case 75: // k - case 80: // p - goToPrevious(); - break; - } - }; -})(); -window.addEventListener('keydown', jumpToCode); diff --git a/coverage/lcov-report/favicon.png b/coverage/lcov-report/favicon.png deleted file mode 100644 index c1525b811..000000000 Binary files a/coverage/lcov-report/favicon.png and /dev/null differ diff --git a/coverage/lcov-report/index.html b/coverage/lcov-report/index.html deleted file mode 100644 index b491aa40c..000000000 --- a/coverage/lcov-report/index.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - Code coverage report for All files - - - - - - - - - -
-
-

All files

-
- -
- 68.35% - Statements - 581/850 -
- - -
- 41.71% - Branches - 78/187 -
- - -
- 48.7% - Functions - 75/154 -
- - -
- 68.42% - Lines - 572/836 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
src -
-
100%28/28100%0/0100%0/0100%28/28
src/controllers -
-
61.08%135/22157.69%15/2641.02%16/3961.08%135/221
src/dto -
-
100%5/5100%0/0100%1/1100%4/4
src/lib -
-
56.66%34/6037.5%6/1636.36%4/1157.62%34/59
src/lib/errors -
-
100%12/12100%0/0100%4/4100%12/12
src/middleware -
-
86.66%13/1566.66%2/3100%3/385.71%12/14
src/repository -
-
66.15%86/13044.18%19/4343.75%21/4865.87%83/126
src/routers -
-
100%72/72100%0/0100%0/0100%72/72
src/service -
-
56.12%142/25336.36%36/9945%18/4056.8%142/250
src/structs -
-
100%35/35100%0/0100%4/4100%33/33
test/helper -
-
100%19/19100%0/0100%4/4100%17/17
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/prettify.css b/coverage/lcov-report/prettify.css deleted file mode 100644 index b317a7cda..000000000 --- a/coverage/lcov-report/prettify.css +++ /dev/null @@ -1 +0,0 @@ -.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} diff --git a/coverage/lcov-report/prettify.js b/coverage/lcov-report/prettify.js deleted file mode 100644 index b3225238f..000000000 --- a/coverage/lcov-report/prettify.js +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable */ -window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;arat[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]); diff --git a/coverage/lcov-report/sort-arrow-sprite.png b/coverage/lcov-report/sort-arrow-sprite.png deleted file mode 100644 index 6ed68316e..000000000 Binary files a/coverage/lcov-report/sort-arrow-sprite.png and /dev/null differ diff --git a/coverage/lcov-report/sorter.js b/coverage/lcov-report/sorter.js deleted file mode 100644 index 4ed70ae5a..000000000 --- a/coverage/lcov-report/sorter.js +++ /dev/null @@ -1,210 +0,0 @@ -/* eslint-disable */ -var addSorting = (function() { - 'use strict'; - var cols, - currentSort = { - index: 0, - desc: false - }; - - // returns the summary table element - function getTable() { - return document.querySelector('.coverage-summary'); - } - // returns the thead element of the summary table - function getTableHeader() { - return getTable().querySelector('thead tr'); - } - // returns the tbody element of the summary table - function getTableBody() { - return getTable().querySelector('tbody'); - } - // returns the th element for nth column - function getNthColumn(n) { - return getTableHeader().querySelectorAll('th')[n]; - } - - function onFilterInput() { - const searchValue = document.getElementById('fileSearch').value; - const rows = document.getElementsByTagName('tbody')[0].children; - - // Try to create a RegExp from the searchValue. If it fails (invalid regex), - // it will be treated as a plain text search - let searchRegex; - try { - searchRegex = new RegExp(searchValue, 'i'); // 'i' for case-insensitive - } catch (error) { - searchRegex = null; - } - - for (let i = 0; i < rows.length; i++) { - const row = rows[i]; - let isMatch = false; - - if (searchRegex) { - // If a valid regex was created, use it for matching - isMatch = searchRegex.test(row.textContent); - } else { - // Otherwise, fall back to the original plain text search - isMatch = row.textContent - .toLowerCase() - .includes(searchValue.toLowerCase()); - } - - row.style.display = isMatch ? '' : 'none'; - } - } - - // loads the search box - function addSearchBox() { - var template = document.getElementById('filterTemplate'); - var templateClone = template.content.cloneNode(true); - templateClone.getElementById('fileSearch').oninput = onFilterInput; - template.parentElement.appendChild(templateClone); - } - - // loads all columns - function loadColumns() { - var colNodes = getTableHeader().querySelectorAll('th'), - colNode, - cols = [], - col, - i; - - for (i = 0; i < colNodes.length; i += 1) { - colNode = colNodes[i]; - col = { - key: colNode.getAttribute('data-col'), - sortable: !colNode.getAttribute('data-nosort'), - type: colNode.getAttribute('data-type') || 'string' - }; - cols.push(col); - if (col.sortable) { - col.defaultDescSort = col.type === 'number'; - colNode.innerHTML = - colNode.innerHTML + ''; - } - } - return cols; - } - // attaches a data attribute to every tr element with an object - // of data values keyed by column name - function loadRowData(tableRow) { - var tableCols = tableRow.querySelectorAll('td'), - colNode, - col, - data = {}, - i, - val; - for (i = 0; i < tableCols.length; i += 1) { - colNode = tableCols[i]; - col = cols[i]; - val = colNode.getAttribute('data-value'); - if (col.type === 'number') { - val = Number(val); - } - data[col.key] = val; - } - return data; - } - // loads all row data - function loadData() { - var rows = getTableBody().querySelectorAll('tr'), - i; - - for (i = 0; i < rows.length; i += 1) { - rows[i].data = loadRowData(rows[i]); - } - } - // sorts the table using the data for the ith column - function sortByIndex(index, desc) { - var key = cols[index].key, - sorter = function(a, b) { - a = a.data[key]; - b = b.data[key]; - return a < b ? -1 : a > b ? 1 : 0; - }, - finalSorter = sorter, - tableBody = document.querySelector('.coverage-summary tbody'), - rowNodes = tableBody.querySelectorAll('tr'), - rows = [], - i; - - if (desc) { - finalSorter = function(a, b) { - return -1 * sorter(a, b); - }; - } - - for (i = 0; i < rowNodes.length; i += 1) { - rows.push(rowNodes[i]); - tableBody.removeChild(rowNodes[i]); - } - - rows.sort(finalSorter); - - for (i = 0; i < rows.length; i += 1) { - tableBody.appendChild(rows[i]); - } - } - // removes sort indicators for current column being sorted - function removeSortIndicators() { - var col = getNthColumn(currentSort.index), - cls = col.className; - - cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); - col.className = cls; - } - // adds sort indicators for current column being sorted - function addSortIndicators() { - getNthColumn(currentSort.index).className += currentSort.desc - ? ' sorted-desc' - : ' sorted'; - } - // adds event listeners for all sorter widgets - function enableUI() { - var i, - el, - ithSorter = function ithSorter(i) { - var col = cols[i]; - - return function() { - var desc = col.defaultDescSort; - - if (currentSort.index === i) { - desc = !currentSort.desc; - } - sortByIndex(i, desc); - removeSortIndicators(); - currentSort.index = i; - currentSort.desc = desc; - addSortIndicators(); - }; - }; - for (i = 0; i < cols.length; i += 1) { - if (cols[i].sortable) { - // add the click event handler on the th so users - // dont have to click on those tiny arrows - el = getNthColumn(i).querySelector('.sorter').parentElement; - if (el.addEventListener) { - el.addEventListener('click', ithSorter(i)); - } else { - el.attachEvent('onclick', ithSorter(i)); - } - } - } - } - // adds sorting functionality to the UI - return function() { - if (!getTable()) { - return; - } - cols = loadColumns(); - loadData(); - addSearchBox(); - addSortIndicators(); - enableUI(); - }; -})(); - -window.addEventListener('load', addSorting); diff --git a/coverage/lcov-report/src/app.ts.html b/coverage/lcov-report/src/app.ts.html deleted file mode 100644 index 263b24dde..000000000 --- a/coverage/lcov-report/src/app.ts.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - Code coverage report for src/app.ts - - - - - - - - - -
-
-

All files / src app.ts

-
- -
- 100% - Statements - 28/28 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 0/0 -
- - -
- 100% - Lines - 28/28 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -345x -5x -5x -5x -5x -5x -5x -5x -5x -5x -5x -5x -5x -  -5x -  -5x -5x -5x -5x -  -5x -5x -5x -5x -5x -5x -5x -  -5x -5x -  -5x - 
import express from 'express';
-import cors from 'cors';
-import path from 'path';
-import cookieParser from 'cookie-parser';
-import { PUBLIC_PATH, STATIC_PATH } from '@lib/constants';
-import articlesRouter from '@/routers/article.router';
-import productsRouter from '@/routers/product.router';
-import commentsRouter from '@/routers/comment.router';
-import imagesRouter from '@/routers/image.router';
-import authRouter from '@/routers/auth.router';
-import usersRouter from '@/routers/user.router';
-import notificationRouter from '@/routers/notification.router';
-import { defaultNotFoundHandler, globalErrorHandler } from '@/controllers/error.controller';
- 
-const app = express();
- 
-app.use(cors());
-app.use(express.json());
-app.use(cookieParser());
-app.use(STATIC_PATH, express.static(path.resolve(process.cwd(), PUBLIC_PATH)));
- 
-app.use('/articles', articlesRouter);
-app.use('/products', productsRouter);
-app.use('/comments', commentsRouter);
-app.use('/images', imagesRouter);
-app.use('/auth', authRouter);
-app.use('/users', usersRouter);
-app.use('/notifications', notificationRouter);
- 
-app.use(defaultNotFoundHandler);
-app.use(globalErrorHandler);
- 
-export default app;
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/controllers/article.controller.ts.html b/coverage/lcov-report/src/controllers/article.controller.ts.html deleted file mode 100644 index 92bb788e8..000000000 --- a/coverage/lcov-report/src/controllers/article.controller.ts.html +++ /dev/null @@ -1,331 +0,0 @@ - - - - - - Code coverage report for src/controllers/article.controller.ts - - - - - - - - - -
-
-

All files / src/controllers article.controller.ts

-
- -
- 69.56% - Statements - 32/46 -
- - -
- 100% - Branches - 0/0 -
- - -
- 55.55% - Functions - 5/9 -
- - -
- 69.56% - Lines - 32/46 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83  -5x -5x -5x -  -  -  -  -5x -5x -5x -5x -  -5x -14x -12x -  -  -  -12x -  -  -5x -4x -4x -2x -  -  -5x -5x -5x -5x -  -  -  -3x -  -  -5x -3x -3x -1x -  -  -5x -8x -8x -8x -  -  -5x -  -  -  -  -  -  -  -  -  -  -5x -  -  -  -  -  -  -  -  -  -5x -  -  -  -  -  -5x -  -  -  -  - 
import { Request, Response } from 'express';
-import { create } from 'superstruct';
-import { IdParamsStruct } from '@/structs/common.structs';
-import {
-  CreateArticleBodyStruct,
-  UpdateArticleBodyStruct,
-  GetArticleListParamsStruct,
-} from '@/structs/article.structs';
-import { CreateCommentBodyStruct, GetCommentListParamsStruct } from '@/structs/comment.struct';
-import * as articlesService from '@/service/article.service';
-import * as commentsService from '@/service/comment.service';
-import * as likesService from '@/service/like.service';
- 
-export async function createArticle(req: Request, res: Response) {
-  const data = create(req.body, CreateArticleBodyStruct);
-  const article = await articlesService.createArticle({
-    ...data,
-    userId: req.user.id,
-  });
-  res.status(201).send(article);
-}
- 
-export async function getArticle(req: Request, res: Response) {
-  const { id } = create(req.params, IdParamsStruct);
-  const article = await articlesService.getArticle(id);
-  res.send(article);
-}
- 
-export async function updateArticle(req: Request, res: Response) {
-  const { id } = create(req.params, IdParamsStruct);
-  const data = create(req.body, UpdateArticleBodyStruct);
-  const updatedArticle = await articlesService.updateArticle(id, {
-    ...data,
-    userId: req.user.id,
-  });
-  res.send(updatedArticle);
-}
- 
-export async function deleteArticle(req: Request, res: Response) {
-  const { id } = create(req.params, IdParamsStruct);
-  await articlesService.deleteArticle(id, req.user.id);
-  res.status(204).send();
-}
- 
-export async function getArticleList(req: Request, res: Response) {
-  const params = create(req.query, GetArticleListParamsStruct);
-  const result = await articlesService.getArticleList(params);
-  res.send(result);
-}
- 
-export async function createComment(req: Request, res: Response) {
-  const { id: articleId } = create(req.params, IdParamsStruct);
-  const { content } = create(req.body, CreateCommentBodyStruct);
-  const createdComment = await commentsService.createComment({
-    articleId,
-    content,
-    userId: req.user.id,
-  });
-  res.status(201).send(createdComment);
-}
- 
-export async function getCommentList(req: Request, res: Response) {
-  const { id: articleId } = create(req.params, IdParamsStruct);
-  const { cursor, limit } = create(req.query, GetCommentListParamsStruct);
-  const result = await commentsService.getCommentListByArticleId(articleId, {
-    cursor,
-    limit,
-  });
-  res.send(result);
-}
- 
-export async function createLike(req: Request, res: Response) {
-  const { id: articleId } = create(req.params, IdParamsStruct);
-  await likesService.createLike(articleId, req.user.id);
-  res.status(201).send();
-}
- 
-export async function deleteLike(req: Request, res: Response) {
-  const { id: articleId } = create(req.params, IdParamsStruct);
-  await likesService.deleteLike(articleId, req.user.id);
-  res.status(204).send();
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/controllers/auth.controller.ts.html b/coverage/lcov-report/src/controllers/auth.controller.ts.html deleted file mode 100644 index 3c5ce90fc..000000000 --- a/coverage/lcov-report/src/controllers/auth.controller.ts.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - Code coverage report for src/controllers/auth.controller.ts - - - - - - - - - -
-
-

All files / src/controllers auth.controller.ts

-
- -
- 84.61% - Statements - 22/26 -
- - -
- 100% - Branches - 0/0 -
- - -
- 83.33% - Functions - 5/6 -
- - -
- 84.61% - Lines - 22/26 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52  -5x -5x -5x -5x -5x -  -5x -90x -86x -85x -  -  -5x -76x -73x -71x -71x -  -  -5x -1x -1x -  -  -5x -  -  -  -  -  -  -  -  -71x -  -  -  -  -71x -  -  -  -  -  -  -  -  -1x -1x -  - 
import { Request, Response } from 'express';
-import { create } from 'superstruct';
-import { ACCESS_TOKEN_COOKIE_NAME, REFRESH_TOKEN_COOKIE_NAME, NODE_ENV } from '../lib/constants';
-import { LoginBodyStruct, RegisterBodyStruct } from '@/structs/auth.structs';
-import * as authService from '@/service/auth.service';
-import userResponseDTO from '@/dto/userResponse.dto';
- 
-export async function register(req: Request, res: Response) {
-  const data = create(req.body, RegisterBodyStruct);
-  const user = await authService.register(data);
-  res.status(201).json(userResponseDTO(user));
-}
- 
-export async function login(req: Request, res: Response) {
-  const data = create(req.body, LoginBodyStruct);
-  const { accessToken, refreshToken } = await authService.login(data);
-  setTokenCookies(res, accessToken, refreshToken);
-  res.status(200).send();
-}
- 
-export async function logout(req: Request, res: Response) {
-  clearTokenCookies(res);
-  res.status(200).send();
-}
- 
-export async function refreshToken(req: Request, res: Response) {
-  const refreshToken = req.cookies[REFRESH_TOKEN_COOKIE_NAME];
-  const { accessToken, refreshToken: newRefreshToken } =
-    await authService.refreshToken(refreshToken);
-  setTokenCookies(res, accessToken, newRefreshToken);
-  res.status(200).send();
-}
- 
-function setTokenCookies(res: Response, accessToken: string, refreshToken: string) {
-  res.cookie(ACCESS_TOKEN_COOKIE_NAME, accessToken, {
-    httpOnly: true,
-    secure: NODE_ENV === 'production',
-    maxAge: 1 * 60 * 60 * 1000, // 1 hour
-  });
-  res.cookie(REFRESH_TOKEN_COOKIE_NAME, refreshToken, {
-    httpOnly: true,
-    secure: NODE_ENV === 'production',
-    maxAge: 7 * 24 * 60 * 60 * 1000, // 7 days
-    path: '/auth/refresh',
-  });
-}
- 
-function clearTokenCookies(res: Response) {
-  res.clearCookie(ACCESS_TOKEN_COOKIE_NAME);
-  res.clearCookie(REFRESH_TOKEN_COOKIE_NAME);
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/controllers/comment.controller.ts.html b/coverage/lcov-report/src/controllers/comment.controller.ts.html deleted file mode 100644 index b334aa3b0..000000000 --- a/coverage/lcov-report/src/controllers/comment.controller.ts.html +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - Code coverage report for src/controllers/comment.controller.ts - - - - - - - - - -
-
-

All files / src/controllers comment.controller.ts

-
- -
- 46.15% - Statements - 6/13 -
- - -
- 100% - Branches - 0/0 -
- - -
- 0% - Functions - 0/2 -
- - -
- 46.15% - Lines - 6/13 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19  -5x -5x -5x -5x -  -5x -  -  -  -  -  -  -5x -  -  -  -  - 
import { Request, Response } from 'express';
-import { create } from 'superstruct';
-import { UpdateCommentBodyStruct } from '@/structs/comment.struct';
-import { IdParamsStruct } from '@/structs/common.structs';
-import * as commentsService from '@/service/comment.service';
- 
-export async function updateComment(req: Request, res: Response) {
-  const { id } = create(req.params, IdParamsStruct);
-  const { content } = create(req.body, UpdateCommentBodyStruct);
-  const updatedComment = await commentsService.updateComment(id, req.user.id, content);
-  res.send(updatedComment);
-}
- 
-export async function deleteComment(req: Request, res: Response) {
-  const { id } = create(req.params, IdParamsStruct);
-  await commentsService.deleteComment(id, req.user.id);
-  res.status(204).send();
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/controllers/error.controller.ts.html b/coverage/lcov-report/src/controllers/error.controller.ts.html deleted file mode 100644 index da35c7aa9..000000000 --- a/coverage/lcov-report/src/controllers/error.controller.ts.html +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - Code coverage report for src/controllers/error.controller.ts - - - - - - - - - -
-
-

All files / src/controllers error.controller.ts

-
- -
- 65.51% - Statements - 19/29 -
- - -
- 68.75% - Branches - 11/16 -
- - -
- 50% - Functions - 1/2 -
- - -
- 65.51% - Lines - 19/29 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60  -5x -5x -5x -5x -5x -  -5x -  -  -  -  -  -  -  -5x -  -  -  -  -  -  -27x -15x -15x -  -  -  -12x -  -  -  -  -  -12x -  -  -  -  -  -  -12x -8x -8x -  -  -4x -  -  -  -  -4x -4x -4x -  -  -  -  -  - 
import { Request, Response, NextFunction } from 'express';
-import { StructError } from 'superstruct';
-import BadRequestError from '@lib/errors/BadRequestError';
-import NotFoundError from '@lib/errors/NotFoundError';
-import UnauthorizedError from '@lib/errors/UnauthorizedError';
-import ForbiddenError from '@lib/errors/ForbiddenError';
- 
-export function defaultNotFoundHandler(
-  req: Request,
-  res: Response,
-  next: NextFunction
-) {
-  res.status(404).send({ message: 'Not found' });
-}
- 
-export function globalErrorHandler(
-  err: Error,
-  req: Request,
-  res: Response,
-  next: NextFunction
-) {
-  /** From superstruct or application error */
-  if (err instanceof StructError || err instanceof BadRequestError) {
-    res.status(400).send({ message: err.message });
-    return;
-  }
- 
-  /** From express.json middleware */
-  Iif (err instanceof SyntaxError && 'body' in err) {
-    res.status(400).send({ message: 'Invalid JSON' });
-    return;
-  }
- 
-  /** Prisma error codes */
-  Iif ('code' in err) {
-    console.error(err);
-    res.status(500).send({ message: 'Failed to process data' });
-    return;
-  }
- 
-  /** Application errors */
-  if (err instanceof NotFoundError) {
-    res.status(404).send({ message: err.message });
-    return;
-  }
- 
-  Iif (err instanceof UnauthorizedError) {
-    res.status(401).send({ message: err.message });
-    return;
-  }
- 
-  Eif (err instanceof ForbiddenError) {
-    res.status(403).send({ message: err.message });
-    return;
-  }
- 
-  console.error(err);
-  res.status(500).send({ message: 'Internal server error' });
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/controllers/image.controller.ts.html b/coverage/lcov-report/src/controllers/image.controller.ts.html deleted file mode 100644 index 7a0439458..000000000 --- a/coverage/lcov-report/src/controllers/image.controller.ts.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - Code coverage report for src/controllers/image.controller.ts - - - - - - - - - -
-
-

All files / src/controllers image.controller.ts

-
- -
- 36% - Statements - 9/25 -
- - -
- 0% - Branches - 0/6 -
- - -
- 0% - Functions - 0/4 -
- - -
- 36% - Lines - 9/25 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49  -5x -5x -5x -5x -5x -  -5x -5x -  -5x -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -5x -  -  -  -  -  -  -  -  -  -  -  - 
import { Request, Response } from 'express';
-import multer from 'multer';
-import path from 'path';
-import { v4 as uuidv4 } from 'uuid';
-import { PUBLIC_PATH, STATIC_PATH } from '@lib/constants';
-import BadRequestError from '@lib/errors/BadRequestError';
- 
-const ALLOWED_MIME_TYPES = ['image/png', 'image/jpeg', 'image/jpg'];
-const FILE_SIZE_LIMIT = 5 * 1024 * 1024;
- 
-export const upload = multer({
-  storage: multer.diskStorage({
-    destination(req, file, cb) {
-      cb(null, PUBLIC_PATH);
-    },
-    filename(req, file, cb) {
-      const ext = path.extname(file.originalname);
-      const filename = `${uuidv4()}${ext}`;
-      cb(null, filename);
-    },
-  }),
- 
-  limits: {
-    fileSize: FILE_SIZE_LIMIT,
-  },
- 
-  fileFilter: function (req, file, cb) {
-    if (!ALLOWED_MIME_TYPES.includes(file.mimetype)) {
-      const err = new BadRequestError('Only png, jpeg, and jpg are allowed');
-      return cb(err);
-    }
- 
-    cb(null, true);
-  },
-});
- 
-export async function uploadImage(req: Request, res: Response) {
-  const host = req.get('host');
-  if (!host) {
-    throw new BadRequestError('Host is required');
-  }
-  if (!req.file) {
-    throw new BadRequestError('File is required');
-  }
-  const filePath = path.join(host, STATIC_PATH, req.file.filename);
-  const url = `http://${filePath}`;
-  res.send({ url });
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/controllers/index.html b/coverage/lcov-report/src/controllers/index.html deleted file mode 100644 index bde4a0fe1..000000000 --- a/coverage/lcov-report/src/controllers/index.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - Code coverage report for src/controllers - - - - - - - - - -
-
-

All files src/controllers

-
- -
- 61.08% - Statements - 135/221 -
- - -
- 57.69% - Branches - 15/26 -
- - -
- 41.02% - Functions - 16/39 -
- - -
- 61.08% - Lines - 135/221 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
article.controller.ts -
-
69.56%32/46100%0/055.55%5/969.56%32/46
auth.controller.ts -
-
84.61%22/26100%0/083.33%5/684.61%22/26
comment.controller.ts -
-
46.15%6/13100%0/00%0/246.15%6/13
error.controller.ts -
-
65.51%19/2968.75%11/1650%1/265.51%19/29
image.controller.ts -
-
36%9/250%0/60%0/436%9/25
notification.controller.ts -
-
41.66%5/12100%0/00%0/241.66%5/12
product.controller.ts -
-
69.56%32/46100%4/455.55%5/969.56%32/46
user.controller.ts -
-
41.66%10/24100%0/00%0/541.66%10/24
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/controllers/notification.controller.ts.html b/coverage/lcov-report/src/controllers/notification.controller.ts.html deleted file mode 100644 index 06bd8cadf..000000000 --- a/coverage/lcov-report/src/controllers/notification.controller.ts.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - Code coverage report for src/controllers/notification.controller.ts - - - - - - - - - -
-
-

All files / src/controllers notification.controller.ts

-
- -
- 41.66% - Statements - 5/12 -
- - -
- 100% - Branches - 0/0 -
- - -
- 0% - Functions - 0/2 -
- - -
- 41.66% - Lines - 5/12 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20  -5x -5x -5x -  -5x -  -  -  -  -  -  -5x -  -  -  -  -  -  - 
import { Request, Response } from 'express';
-import { create } from 'superstruct';
-import { IdParamsStruct } from '@/structs/common.structs';
-import * as notificationService from '@/service/notification.service';
- 
-export async function getNotifications(req: Request, res: Response) {
-  const userId = req.user.id;
-  const userNotifications = await notificationService.getNotificationList(userId);
- 
-  res.status(200).send(userNotifications);
-}
- 
-export async function updateNotification(req: Request, res: Response) {
-  const { id } = create(req.params, IdParamsStruct);
-  console.log(id);
-  const updateNotificationInfo = await notificationService.updateNotificationInfo(id);
- 
-  res.status(200).send(updateNotificationInfo);
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/controllers/product.controller.ts.html b/coverage/lcov-report/src/controllers/product.controller.ts.html deleted file mode 100644 index e65ee3bdb..000000000 --- a/coverage/lcov-report/src/controllers/product.controller.ts.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - Code coverage report for src/controllers/product.controller.ts - - - - - - - - - -
-
-

All files / src/controllers product.controller.ts

-
- -
- 69.56% - Statements - 32/46 -
- - -
- 100% - Branches - 4/4 -
- - -
- 55.55% - Functions - 5/9 -
- - -
- 69.56% - Lines - 32/46 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82  -5x -5x -5x -  -  -  -  -5x -5x -5x -5x -  -5x -17x -14x -  -  -  -14x -  -  -5x -4x -4x -2x -  -  -5x -7x -7x -7x -  -  -  -5x -  -  -5x -3x -3x -1x -  -  -5x -8x -8x -  -  -8x -  -  -5x -  -  -  -  -  -  -  -  -  -  -5x -  -  -  -  -  -  -5x -  -  -  -  -  -5x -  -  -  -  - 
import { Request, Response } from 'express';
-import { create } from 'superstruct';
-import { IdParamsStruct } from '@/structs/common.structs';
-import {
-  CreateProductBodyStruct,
-  GetProductListParamsStruct,
-  UpdateProductBodyStruct,
-} from '@/structs/product.struct';
-import { CreateCommentBodyStruct, GetCommentListParamsStruct } from '@/structs/comment.struct';
-import * as productsService from '@/service/product.service';
-import * as commentsService from '@/service/comment.service';
-import * as favoritesService from '@/service/favorite.service';
- 
-export async function createProduct(req: Request, res: Response) {
-  const data = create(req.body, CreateProductBodyStruct);
-  const createdProduct = await productsService.createProduct({
-    ...data,
-    userId: req.user.id,
-  });
-  res.status(201).send(createdProduct);
-}
- 
-export async function getProduct(req: Request, res: Response) {
-  const { id } = create(req.params, IdParamsStruct);
-  const product = await productsService.getProduct(id);
-  res.status(200).send(product);
-}
- 
-export async function updateProduct(req: Request, res: Response) {
-  const { id } = create(req.params, IdParamsStruct);
-  const data = create(req.body, UpdateProductBodyStruct);
-  const updatedProduct = await productsService.updateProduct(id, {
-    ...data,
-    userId: req.user.id,
-  });
-  res.status(201).send(updatedProduct);
-}
- 
-export async function deleteProduct(req: Request, res: Response) {
-  const { id } = create(req.params, IdParamsStruct);
-  await productsService.deleteProduct(id, req.user.id);
-  res.status(204).send();
-}
- 
-export async function getProductList(req: Request, res: Response) {
-  const params = create(req.query, GetProductListParamsStruct);
-  const result = await productsService.getProductList(params, {
-    userId: req.user?.id,
-  });
-  res.status(200).send(result);
-}
- 
-export async function createComment(req: Request, res: Response) {
-  const { id: productId } = create(req.params, IdParamsStruct);
-  const { content } = create(req.body, CreateCommentBodyStruct);
-  const createdComment = await commentsService.createComment({
-    productId,
-    content,
-    userId: req.user.id,
-  });
-  res.status(201).send(createdComment);
-}
- 
-export async function getCommentList(req: Request, res: Response) {
-  const { id: productId } = create(req.params, IdParamsStruct);
-  const params = create(req.query, GetCommentListParamsStruct);
-  const result = await commentsService.getCommentListByProductId(productId, params);
-  res.send(result);
-}
- 
-export async function createFavorite(req: Request, res: Response) {
-  const { id: productId } = create(req.params, IdParamsStruct);
-  await favoritesService.createFavorite(productId, req.user.id);
-  res.status(201).send();
-}
- 
-export async function deleteFavorite(req: Request, res: Response) {
-  const { id: productId } = create(req.params, IdParamsStruct);
-  await favoritesService.deleteFavorite(productId, req.user.id);
-  res.status(204).send();
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/controllers/user.controller.ts.html b/coverage/lcov-report/src/controllers/user.controller.ts.html deleted file mode 100644 index 33196ca9d..000000000 --- a/coverage/lcov-report/src/controllers/user.controller.ts.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - Code coverage report for src/controllers/user.controller.ts - - - - - - - - - -
-
-

All files / src/controllers user.controller.ts

-
- -
- 41.66% - Statements - 10/24 -
- - -
- 100% - Branches - 0/0 -
- - -
- 0% - Functions - 0/5 -
- - -
- 41.66% - Lines - 10/24 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59  -5x -5x -  -  -  -  -  -5x -5x -5x -  -5x -  -  -  -  -5x -  -  -  -  -  -5x -  -  -  -  -  -5x -  -  -  -  -  -  -  -  -  -  -  -  -  -  -5x -  -  -  -  -  -  -  -  -  -  -  -  -  - 
import { Request, Response } from 'express';
-import { create } from 'superstruct';
-import {
-  UpdateMeBodyStruct,
-  UpdatePasswordBodyStruct,
-  GetMyProductListParamsStruct,
-  GetMyFavoriteListParamsStruct,
-} from '@/structs/user.structs';
-import * as usersService from '@/service/user.service';
-import * as authService from '@/service/auth.service';
-import userResponseDTO from '@/dto/userResponse.dto';
- 
-export async function getMe(req: Request, res: Response) {
-  const user = await usersService.getUser(req.user.id);
-  res.send(userResponseDTO(user));
-}
- 
-export async function updateMe(req: Request, res: Response) {
-  const data = create(req.body, UpdateMeBodyStruct);
-  const updatedUser = await usersService.updateUser(req.user.id, data);
-  res.status(200).send(userResponseDTO(updatedUser));
-}
- 
-export async function updateMyPassword(req: Request, res: Response) {
-  const { password, newPassword } = create(req.body, UpdatePasswordBodyStruct);
-  await authService.updateMyPassword(req.user.id, password, newPassword);
-  res.status(200).send();
-}
- 
-export async function getMyProductList(req: Request, res: Response) {
-  const { page, pageSize, orderBy, keyword } = create(req.query, GetMyProductListParamsStruct);
-  const { list, totalCount } = await usersService.getMyProductList(req.user.id, {
-    page,
-    pageSize,
-    orderBy,
-    keyword,
-  });
- 
-  res.send({
-    list,
-    totalCount,
-  });
-}
- 
-export async function getMyFavoriteList(req: Request, res: Response) {
-  const { page, pageSize, orderBy, keyword } = create(req.query, GetMyFavoriteListParamsStruct);
-  const { list, totalCount } = await usersService.getMyFavoriteList(req.user.id, {
-    page,
-    pageSize,
-    orderBy,
-    keyword,
-  });
- 
-  res.send({
-    list,
-    totalCount,
-  });
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/dto/index.html b/coverage/lcov-report/src/dto/index.html deleted file mode 100644 index 7bc378d4c..000000000 --- a/coverage/lcov-report/src/dto/index.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - Code coverage report for src/dto - - - - - - - - - -
-
-

All files src/dto

-
- -
- 100% - Statements - 5/5 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 1/1 -
- - -
- 100% - Lines - 4/4 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
userResponse.dto.ts -
-
100%5/5100%0/0100%1/1100%4/4
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/dto/userResponse.dto.ts.html b/coverage/lcov-report/src/dto/userResponse.dto.ts.html deleted file mode 100644 index 2862660ec..000000000 --- a/coverage/lcov-report/src/dto/userResponse.dto.ts.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - Code coverage report for src/dto/userResponse.dto.ts - - - - - - - - - -
-
-

All files / src/dto userResponse.dto.ts

-
- -
- 100% - Statements - 5/5 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 1/1 -
- - -
- 100% - Lines - 4/4 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9  -  -5x -85x -85x -  -  -5x - 
import User from '@app-types/User';
- 
-const userResponseDTO = (user: User) => {
-  const { password, ...userWithoutPassword } = user;
-  return userWithoutPassword;
-};
- 
-export default userResponseDTO;
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/index.html b/coverage/lcov-report/src/index.html deleted file mode 100644 index 7f453bcdc..000000000 --- a/coverage/lcov-report/src/index.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - Code coverage report for src - - - - - - - - - -
-
-

All files src

-
- -
- 100% - Statements - 28/28 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 0/0 -
- - -
- 100% - Lines - 28/28 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
app.ts -
-
100%28/28100%0/0100%0/0100%28/28
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/lib/constants.ts.html b/coverage/lcov-report/src/lib/constants.ts.html deleted file mode 100644 index ca9fdbc4a..000000000 --- a/coverage/lcov-report/src/lib/constants.ts.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - Code coverage report for src/lib/constants.ts - - - - - - - - - -
-
-

All files / src/lib constants.ts

-
- -
- 100% - Statements - 11/11 -
- - -
- 50% - Branches - 5/10 -
- - -
- 100% - Functions - 0/0 -
- - -
- 100% - Lines - 11/11 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -146x -6x -  -6x -6x -6x -6x -6x -  -6x -6x -6x -6x - 
import dotenv from 'dotenv';
-dotenv.config();
- 
-export const ACCESS_TOKEN_COOKIE_NAME = 'access-token';
-export const REFRESH_TOKEN_COOKIE_NAME = 'refresh-token';
-export const DATABASE_URL = process.env.DATABASE_URL || '';
-export const JWT_ACCESS_TOKEN_SECRET = process.env.JWT_ACCESS_TOKEN_SECRET || 'change_access_token';
-export const JWT_REFRESH_TOKEN_SECRET =
-  process.env.JWT_REFRESH_TOKEN_SECRET || 'change_refresh_token';
-export const NODE_ENV = process.env.NODE_ENV || 'development';
-export const PORT = process.env.PORT || 3000;
-export const PUBLIC_PATH = './public';
-export const STATIC_PATH = '/public';
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/lib/errors/BadRequestError.ts.html b/coverage/lcov-report/src/lib/errors/BadRequestError.ts.html deleted file mode 100644 index 9b56b30d1..000000000 --- a/coverage/lcov-report/src/lib/errors/BadRequestError.ts.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - Code coverage report for src/lib/errors/BadRequestError.ts - - - - - - - - - -
-
-

All files / src/lib/errors BadRequestError.ts

-
- -
- 100% - Statements - 3/3 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 1/1 -
- - -
- 100% - Lines - 3/3 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9  -  -3x -3x -  -  -  -5x - 
class BadRequestError extends Error {
-  constructor(message: string) {
-    super(message);
-    this.name = 'BadRequestError';
-  }
-}
- 
-export default BadRequestError;
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/lib/errors/ForbiddenError.ts.html b/coverage/lcov-report/src/lib/errors/ForbiddenError.ts.html deleted file mode 100644 index 223b9e127..000000000 --- a/coverage/lcov-report/src/lib/errors/ForbiddenError.ts.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - Code coverage report for src/lib/errors/ForbiddenError.ts - - - - - - - - - -
-
-

All files / src/lib/errors ForbiddenError.ts

-
- -
- 100% - Statements - 3/3 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 1/1 -
- - -
- 100% - Lines - 3/3 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9  -  -6x -6x -  -  -  -6x - 
class ForbiddenError extends Error {
-  constructor(message: string) {
-    super(message);
-    this.name = 'ForbiddenError';
-  }
-}
- 
-export default ForbiddenError;
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/lib/errors/NotFoundError.ts.html b/coverage/lcov-report/src/lib/errors/NotFoundError.ts.html deleted file mode 100644 index ec10df998..000000000 --- a/coverage/lcov-report/src/lib/errors/NotFoundError.ts.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - Code coverage report for src/lib/errors/NotFoundError.ts - - - - - - - - - -
-
-

All files / src/lib/errors NotFoundError.ts

-
- -
- 100% - Statements - 3/3 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 1/1 -
- - -
- 100% - Lines - 3/3 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9  -  -11x -11x -  -  -  -6x - 
class NotFoundError extends Error {
-  constructor(modelName: string, id: number) {
-    super(`${modelName} with id ${id} not found`);
-    this.name = 'NotFoundError';
-  }
-}
- 
-export default NotFoundError;
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/lib/errors/UnauthorizedError.ts.html b/coverage/lcov-report/src/lib/errors/UnauthorizedError.ts.html deleted file mode 100644 index 5d7cdf825..000000000 --- a/coverage/lcov-report/src/lib/errors/UnauthorizedError.ts.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - Code coverage report for src/lib/errors/UnauthorizedError.ts - - - - - - - - - -
-
-

All files / src/lib/errors UnauthorizedError.ts

-
- -
- 100% - Statements - 3/3 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 1/1 -
- - -
- 100% - Lines - 3/3 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9  -  -16x -16x -  -  -  -5x - 
class UnauthorizedError extends Error {
-  constructor(message: string) {
-    super(message);
-    this.name = 'UnauthorizedError';
-  }
-}
- 
-export default UnauthorizedError;
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/lib/errors/index.html b/coverage/lcov-report/src/lib/errors/index.html deleted file mode 100644 index 67a5271af..000000000 --- a/coverage/lcov-report/src/lib/errors/index.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - Code coverage report for src/lib/errors - - - - - - - - - -
-
-

All files src/lib/errors

-
- -
- 100% - Statements - 12/12 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 4/4 -
- - -
- 100% - Lines - 12/12 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
BadRequestError.ts -
-
100%3/3100%0/0100%1/1100%3/3
ForbiddenError.ts -
-
100%3/3100%0/0100%1/1100%3/3
NotFoundError.ts -
-
100%3/3100%0/0100%1/1100%3/3
UnauthorizedError.ts -
-
100%3/3100%0/0100%1/1100%3/3
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/lib/index.html b/coverage/lcov-report/src/lib/index.html deleted file mode 100644 index f0665d984..000000000 --- a/coverage/lcov-report/src/lib/index.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - Code coverage report for src/lib - - - - - - - - - -
-
-

All files src/lib

-
- -
- 56.66% - Statements - 34/60 -
- - -
- 37.5% - Branches - 6/16 -
- - -
- 36.36% - Functions - 4/11 -
- - -
- 57.62% - Lines - 34/59 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
constants.ts -
-
100%11/1150%5/10100%0/0100%11/11
prismaClient.ts -
-
100%2/2100%0/0100%0/0100%2/2
token.ts -
-
68.75%11/1625%1/466.66%2/368.75%11/16
websocket.ts -
-
19.23%5/260%0/20%0/620%5/25
withAsync.ts -
-
100%5/5100%0/0100%2/2100%5/5
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/lib/prismaClient.ts.html b/coverage/lcov-report/src/lib/prismaClient.ts.html deleted file mode 100644 index 99d97a1d2..000000000 --- a/coverage/lcov-report/src/lib/prismaClient.ts.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - Code coverage report for src/lib/prismaClient.ts - - - - - - - - - -
-
-

All files / src/lib prismaClient.ts

-
- -
- 100% - Statements - 2/2 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 0/0 -
- - -
- 100% - Lines - 2/2 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -48x -  -8x - 
import { PrismaClient } from '@prisma/client';
- 
-export const prismaClient = new PrismaClient();
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/lib/token.ts.html b/coverage/lcov-report/src/lib/token.ts.html deleted file mode 100644 index 952de60fe..000000000 --- a/coverage/lcov-report/src/lib/token.ts.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - Code coverage report for src/lib/token.ts - - - - - - - - - -
-
-

All files / src/lib token.ts

-
- -
- 68.75% - Statements - 11/16 -
- - -
- 25% - Branches - 1/4 -
- - -
- 66.66% - Functions - 2/3 -
- - -
- 68.75% - Lines - 11/16 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -325x -5x -  -  -  -  -5x -71x -  -  -71x -  -  -71x -  -  -5x -57x -57x -  -  -57x -  -  -5x -  -  -  -  -  -  - 
import jwt from 'jsonwebtoken';
-import {
-  JWT_ACCESS_TOKEN_SECRET,
-  JWT_REFRESH_TOKEN_SECRET,
-} from '@lib/constants';
- 
-export function generateTokens(userId: number) {
-  const accessToken = jwt.sign({ id: userId }, JWT_ACCESS_TOKEN_SECRET, {
-    expiresIn: '1h',
-  });
-  const refreshToken = jwt.sign({ id: userId }, JWT_REFRESH_TOKEN_SECRET, {
-    expiresIn: '7d',
-  });
-  return { accessToken, refreshToken };
-}
- 
-export function verifyAccessToken(token: string) {
-  const decoded = jwt.verify(token, JWT_ACCESS_TOKEN_SECRET);
-  Iif (typeof decoded === 'string') {
-    throw new Error('Invalid token');
-  }
-  return { userId: decoded.id };
-}
- 
-export function verifyRefreshToken(token: string) {
-  const decoded = jwt.verify(token, JWT_REFRESH_TOKEN_SECRET);
-  if (typeof decoded === 'string') {
-    throw new Error('Invalid token');
-  }
-  return { userId: decoded.id };
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/lib/websocket.ts.html b/coverage/lcov-report/src/lib/websocket.ts.html deleted file mode 100644 index c54e4dfcb..000000000 --- a/coverage/lcov-report/src/lib/websocket.ts.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - Code coverage report for src/lib/websocket.ts - - - - - - - - - -
-
-

All files / src/lib websocket.ts

-
- -
- 19.23% - Statements - 5/26 -
- - -
- 0% - Branches - 0/2 -
- - -
- 0% - Functions - 0/6 -
- - -
- 20% - Lines - 5/25 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -596x -  -6x -6x -  -  -  -  -6x -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -6x -  -  - 
import { Server } from 'socket.io';
-import http from 'http';
-import jwt from 'jsonwebtoken';
-import { JWT_ACCESS_TOKEN_SECRET } from '@lib/constants';
- 
-// 외부에서 io를 사용하기 위한 설정
-let ioRef: Server;
- 
-export function setupWebSocket(server: http.Server) {
-  console.log('🤖 hello! I`m websocket 🤖');
- 
-  const io = new Server(server, {
-    path: '/chat',
-    cors: {
-      // origin: 'http://localhost:3000',
-      origin: '*', // 모든 origin 허용
-      credentials: true,
-      methods: ['GET', 'POST'],
-    },
-  });
- 
-  // 외부에서 io를 사용하기 위한 설정
-  ioRef = io;
- 
-  io.use((socket, next) => {
-    const token = socket.handshake.auth.accessToken;
-    if (!token) return next(new Error('로그인 필요'));
- 
-    try {
-      const payload = jwt.verify(token, JWT_ACCESS_TOKEN_SECRET);
-      (socket as any).user = payload;
-      next();
-    } catch {
-      next(new Error('JWT 인증 실패'));
-    }
-  });
- 
-  io.on('connection', (socket) => {
-    console.log('Connecting ☑️');
- 
-    // 연결 후 유저 id로 room 접속
-    socket.join(String((socket as any).user.id));
-    console.log('Joined rooms:', Array.from(socket.rooms));
- 
-    // 연결되지 않는 경우
-    socket.on('disconnect', () => {
-      console.log('Client disconnected');
-    });
-  });
- 
-  io.on('error', (error) => {
-    console.error('Socket.IO server error', error);
-  });
-}
- 
-export function notifyToUser(userId: number, event: string, payload: any) {
-  ioRef.to(String(userId)).emit(event, payload);
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/lib/withAsync.ts.html b/coverage/lcov-report/src/lib/withAsync.ts.html deleted file mode 100644 index 6664a9b35..000000000 --- a/coverage/lcov-report/src/lib/withAsync.ts.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - Code coverage report for src/lib/withAsync.ts - - - - - - - - - -
-
-

All files / src/lib withAsync.ts

-
- -
- 100% - Statements - 5/5 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 2/2 -
- - -
- 100% - Lines - 5/5 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12  -  -5x -160x -240x -240x -  -27x -  -  -  - 
import { Request, Response, NextFunction, RequestHandler } from 'express';
- 
-export function withAsync(handler: RequestHandler) {
-  return async function (req: Request, res: Response, next: NextFunction) {
-    try {
-      await handler(req, res, next);
-    } catch (e) {
-      next(e);
-    }
-  };
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/middleware/authenticate.ts.html b/coverage/lcov-report/src/middleware/authenticate.ts.html deleted file mode 100644 index bbb118908..000000000 --- a/coverage/lcov-report/src/middleware/authenticate.ts.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - Code coverage report for src/middleware/authenticate.ts - - - - - - - - - -
-
-

All files / src/middleware authenticate.ts

-
- -
- 86.66% - Statements - 13/15 -
- - -
- 66.66% - Branches - 2/3 -
- - -
- 100% - Functions - 3/3 -
- - -
- 85.71% - Lines - 12/14 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24  -5x -5x -  -  -125x -73x -73x -73x -57x -  -16x -16x -16x -  -  -  -  -57x -  -  -  -5x - 
import { Request, Response, NextFunction, RequestHandler } from 'express';
-import { ACCESS_TOKEN_COOKIE_NAME } from '@lib/constants';
-import * as authService from '@/service/auth.service';
- 
-function authenticate(options = { optional: false }): RequestHandler {
-  return async (req: Request, res: Response, next: NextFunction) => {
-    const accessToken = req.cookies[ACCESS_TOKEN_COOKIE_NAME];
-    try {
-      const user = await authService.authenticate(accessToken);
-      req.user = user;
-    } catch (error) {
-      Eif (options.optional) {
-        next();
-        return;
-      }
-      next(error);
-      return;
-    }
-    next();
-  };
-}
- 
-export default authenticate;
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/middleware/index.html b/coverage/lcov-report/src/middleware/index.html deleted file mode 100644 index a7e75fee7..000000000 --- a/coverage/lcov-report/src/middleware/index.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - Code coverage report for src/middleware - - - - - - - - - -
-
-

All files src/middleware

-
- -
- 86.66% - Statements - 13/15 -
- - -
- 66.66% - Branches - 2/3 -
- - -
- 100% - Functions - 3/3 -
- - -
- 85.71% - Lines - 12/14 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
authenticate.ts -
-
86.66%13/1566.66%2/3100%3/385.71%12/14
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/repository/article.repo.ts.html b/coverage/lcov-report/src/repository/article.repo.ts.html deleted file mode 100644 index e8dc98cbc..000000000 --- a/coverage/lcov-report/src/repository/article.repo.ts.html +++ /dev/null @@ -1,367 +0,0 @@ - - - - - - Code coverage report for src/repository/article.repo.ts - - - - - - - - - -
-
-

All files / src/repository article.repo.ts

-
- -
- 89.65% - Statements - 26/29 -
- - -
- 71.42% - Branches - 10/14 -
- - -
- 75% - Functions - 9/12 -
- - -
- 88.88% - Lines - 24/27 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95  -5x -  -  -5x -12x -  -  -12x -  -  -5x -8x -8x -  -  -5x -4x -  -  -  -  -  -  -4x -2x -  -  -2x -  -  -  -  -  -  -  -5x -8x -  -  -  -  -  -  -8x -  -  -  -8x -8x -  -  -  -  -  -  -  -  -  -34x -  -  -  -  -  -  -8x -  -  -  -  -  -5x -3x -  -  -  -  -  -  -3x -  -  -  -  -  -  -  -  -5x -1x -  -  -  - 
import { Article } from '@prisma/client';
-import { prismaClient } from '@lib/prismaClient';
-import { PagePaginationParams } from '@app-types/pagination';
- 
-export async function createArticle(data: Omit<Article, 'id' | 'createdAt' | 'updatedAt'>) {
-  const createdArticle = await prismaClient.article.create({
-    data,
-  });
-  return createdArticle;
-}
- 
-export async function getArticle(id: number) {
-  const article = await prismaClient.article.findUnique({ where: { id } });
-  return article;
-}
- 
-export async function getArticleWithLikes(id: number, { userId }: { userId?: number } = {}) {
-  const article = await prismaClient.article.findUnique({
-    where: { id },
-    include: {
-      likes: true,
-    },
-  });
- 
-  if (!article) {
-    return null;
-  }
- 
-  return {
-    ...article,
-    likes: undefined,
-    likeCount: article.likes.length,
-    isLiked: userId ? article.likes.some((like) => like.userId === userId) : undefined,
-  };
-}
- 
-export async function getArticleListWithLikes(
-  { page, pageSize, orderBy, keyword }: PagePaginationParams,
-  {
-    userId,
-  }: {
-    userId?: number;
-  } = {}
-) {
-  const where = {
-    title: keyword ? { contains: keyword } : undefined,
-  };
- 
-  const totalCount = await prismaClient.article.count({ where });
-  const articles = await prismaClient.article.findMany({
-    skip: (page - 1) * pageSize,
-    take: pageSize,
-    orderBy: orderBy === 'recent' ? { createdAt: 'desc' } : { id: 'asc' },
-    where,
-    include: {
-      likes: true,
-    },
-  });
- 
-  const mappedArticles = articles.map((article) => ({
-    ...article,
-    likes: undefined,
-    likeCount: article.likes.length,
-    isLiked: userId ? article.likes.some((like) => like.userId === userId) : undefined,
-  }));
- 
-  return {
-    list: mappedArticles,
-    totalCount,
-  };
-}
- 
-export async function updateArticleWithLikes(id: number, data: Partial<Article>) {
-  const updatedArticle = await prismaClient.article.update({
-    where: { id },
-    data,
-    include: {
-      likes: true,
-    },
-  });
-  return {
-    ...updatedArticle,
-    likeCount: updatedArticle.likes.length,
-    isLiked: data.userId
-      ? updatedArticle.likes.some((like) => like.userId === data.userId)
-      : undefined,
-  };
-}
- 
-export async function deleteArticle(id: number) {
-  return prismaClient.article.delete({
-    where: { id },
-  });
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/repository/comment.repo.ts.html b/coverage/lcov-report/src/repository/comment.repo.ts.html deleted file mode 100644 index 8d622c189..000000000 --- a/coverage/lcov-report/src/repository/comment.repo.ts.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - Code coverage report for src/repository/comment.repo.ts - - - - - - - - - -
-
-

All files / src/repository comment.repo.ts

-
- -
- 33.33% - Statements - 6/18 -
- - -
- 0% - Branches - 0/4 -
- - -
- 0% - Functions - 0/6 -
- - -
- 33.33% - Lines - 6/18 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53  -5x -  -  -5x -  -  -  -  -  -  -  -  -5x -  -  -  -  -  -  -5x -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -5x -  -  -  -  -  -  -5x -  -  -  -  - 
import { Comment } from '@prisma/client';
-import { prismaClient } from '@lib/prismaClient';
-import { CursorPaginationParams } from '@app-types/pagination';
- 
-export async function createComment(
-  data: Omit<Comment, 'id' | 'createdAt' | 'updatedAt'>
-) {
-  const createdComment = await prismaClient.comment.create({
-    data,
-  });
-  return createdComment;
-}
- 
-export async function getComment(id: number) {
-  const comment = await prismaClient.comment.findUnique({
-    where: { id },
-  });
-  return comment;
-}
- 
-export async function getCommentList(
-  where: { articleId?: number; productId?: number },
-  { cursor, limit }: CursorPaginationParams
-) {
-  const commentsWithCursor = await prismaClient.comment.findMany({
-    cursor: cursor ? { id: cursor } : undefined,
-    take: limit + 1,
-    where,
-    orderBy: { createdAt: 'desc' },
-  });
-  const comments = commentsWithCursor.slice(0, limit);
-  const cursorComment = commentsWithCursor[commentsWithCursor.length - 1];
-  const nextCursor = cursorComment ? cursorComment.id : null;
- 
-  return {
-    list: comments,
-    nextCursor,
-  };
-}
- 
-export async function updateComment(id: number, data: Partial<Comment>) {
-  return prismaClient.comment.update({
-    where: { id },
-    data,
-  });
-}
- 
-export async function deleteComment(id: number) {
-  return prismaClient.comment.delete({
-    where: { id },
-  });
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/repository/favorite.repo.ts.html b/coverage/lcov-report/src/repository/favorite.repo.ts.html deleted file mode 100644 index f773488c4..000000000 --- a/coverage/lcov-report/src/repository/favorite.repo.ts.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - Code coverage report for src/repository/favorite.repo.ts - - - - - - - - - -
-
-

All files / src/repository favorite.repo.ts

-
- -
- 54.54% - Statements - 6/11 -
- - -
- 100% - Branches - 0/0 -
- - -
- 25% - Functions - 1/4 -
- - -
- 54.54% - Lines - 6/11 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29  -6x -  -6x -  -  -  -  -  -  -6x -  -  -  -  -  -  -6x -5x -  -  -  -  -6x -  -  -  -  - 
import { Favorite } from '@prisma/client';
-import { prismaClient } from '@lib/prismaClient';
- 
-export async function createFavorite(data: Omit<Favorite, 'id' | 'createdAt' | 'updatedAt'>) {
-  const createdFavorite = await prismaClient.favorite.create({
-    data,
-  });
-  return createdFavorite;
-}
- 
-export async function getFavorite(productId: number, userId: number) {
-  const favorite = await prismaClient.favorite.findFirst({
-    where: { productId, userId },
-  });
-  return favorite;
-}
- 
-export async function getFavoriteMember(productId: number) {
-  return await prismaClient.favorite.findMany({
-    where: { productId },
-  });
-}
- 
-export async function deleteFavorite(id: number) {
-  await prismaClient.favorite.delete({
-    where: { id },
-  });
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/repository/index.html b/coverage/lcov-report/src/repository/index.html deleted file mode 100644 index 9cf3c8717..000000000 --- a/coverage/lcov-report/src/repository/index.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - Code coverage report for src/repository - - - - - - - - - -
-
-

All files src/repository

-
- -
- 66.15% - Statements - 86/130 -
- - -
- 44.18% - Branches - 19/43 -
- - -
- 43.75% - Functions - 21/48 -
- - -
- 65.87% - Lines - 83/126 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
article.repo.ts -
-
89.65%26/2971.42%10/1475%9/1288.88%24/27
comment.repo.ts -
-
33.33%6/180%0/40%0/633.33%6/18
favorite.repo.ts -
-
54.54%6/11100%0/025%1/454.54%6/11
like.repo.ts -
-
44.44%4/9100%0/00%0/344.44%4/9
notification.repo.ts -
-
45.45%5/110%0/80%0/445.45%5/11
product.repo.ts -
-
72.97%27/3752.94%9/1757.14%8/1474.28%26/35
user.repo.ts -
-
80%12/15100%0/060%3/580%12/15
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/repository/like.repo.ts.html b/coverage/lcov-report/src/repository/like.repo.ts.html deleted file mode 100644 index a414046ed..000000000 --- a/coverage/lcov-report/src/repository/like.repo.ts.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - Code coverage report for src/repository/like.repo.ts - - - - - - - - - -
-
-

All files / src/repository like.repo.ts

-
- -
- 44.44% - Statements - 4/9 -
- - -
- 100% - Branches - 0/0 -
- - -
- 0% - Functions - 0/3 -
- - -
- 44.44% - Lines - 4/9 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23  -5x -  -5x -  -  -  -  -  -  -5x -  -  -  -  -  -  -5x -  -  -  -  - 
import { Like } from '@prisma/client';
-import { prismaClient } from '@lib/prismaClient';
- 
-export async function createLike(data: Omit<Like, 'id' | 'createdAt' | 'updatedAt'>) {
-  const createdLike = await prismaClient.like.create({
-    data,
-  });
-  return createdLike;
-}
- 
-export async function getLike(articleId: number, userId: number) {
-  const like = await prismaClient.like.findFirst({
-    where: { articleId, userId },
-  });
-  return like;
-}
- 
-export async function deleteLike(id: number) {
-  await prismaClient.like.delete({
-    where: { id },
-  });
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/repository/notification.repo.ts.html b/coverage/lcov-report/src/repository/notification.repo.ts.html deleted file mode 100644 index 031238851..000000000 --- a/coverage/lcov-report/src/repository/notification.repo.ts.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - Code coverage report for src/repository/notification.repo.ts - - - - - - - - - -
-
-

All files / src/repository notification.repo.ts

-
- -
- 45.45% - Statements - 5/11 -
- - -
- 0% - Branches - 0/8 -
- - -
- 0% - Functions - 0/4 -
- - -
- 45.45% - Lines - 5/11 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -476x -  -  -  -6x -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -6x -  -  -  -  -  -  -  -  -  -  -  -6x -  -  -  -6x -  -  -  -  -  - 
import { prismaClient } from '@lib/prismaClient';
- 
-export type NotificationType = 'priceChange' | 'productComment' | 'articleComment';
- 
-export async function createNotification(data: {
-  userId: number;
-  type: NotificationType;
-  articleId?: number;
-  productId?: number;
-  message: string;
-}) {
-  const { userId, type, message, articleId, productId } = data;
- 
-  return await prismaClient.notification.create({
-    data: {
-      type,
-      message,
-      userId,
-      articleId: articleId ?? null,
-      productId: productId ?? null,
-    },
-  });
-}
- 
-export async function getNotificationList(userId: number) {
-  const [notifications, unReadTotal] = await prismaClient.$transaction([
-    prismaClient.notification.findMany({
-      where: { userId },
-    }),
-    prismaClient.notification.count({
-      where: { userId, isRead: false },
-    }),
-  ]);
-  return { notifications, unReadTotal };
-}
- 
-export async function getNotification(notificationId: number) {
-  return await prismaClient.notification.findUnique({ where: { id: notificationId } });
-}
- 
-export async function patchNotification(notificationId: number) {
-  return await prismaClient.notification.update({
-    where: { id: notificationId },
-    data: { isRead: true },
-  });
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/repository/product.repo.ts.html b/coverage/lcov-report/src/repository/product.repo.ts.html deleted file mode 100644 index 893bc4dd2..000000000 --- a/coverage/lcov-report/src/repository/product.repo.ts.html +++ /dev/null @@ -1,547 +0,0 @@ - - - - - - Code coverage report for src/repository/product.repo.ts - - - - - - - - - -
-
-

All files / src/repository product.repo.ts

-
- -
- 72.97% - Statements - 27/37 -
- - -
- 52.94% - Branches - 9/17 -
- - -
- 57.14% - Functions - 8/14 -
- - -
- 74.28% - Lines - 26/35 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155  -6x -  -  -6x -14x -  -  -  -  -6x -10x -  -  -10x -  -  -6x -4x -  -  -  -4x -2x -  -  -2x -  -  -  -  -  -  -  -2x -  -  -6x -8x -  -  -  -  -  -  -8x -  -  -  -  -  -8x -  -  -  -8x -  -  -  -  -  -  -  -  -  -38x -  -  -  -  -  -  -  -  -  -8x -  -  -  -  -  -6x -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -6x -5x -  -  -  -  -  -  -5x -  -  -  -  -  -  -  -5x -  -  -6x -1x -  -  -  - 
import { Product } from '@prisma/client';
-import { prismaClient } from '@lib/prismaClient';
-import { PagePaginationParams } from '@app-types/pagination';
- 
-export async function createProduct(data: Omit<Product, 'id' | 'createdAt' | 'updatedAt'>) {
-  return prismaClient.product.create({
-    data,
-  });
-}
- 
-export async function getProduct(id: number) {
-  const product = await prismaClient.product.findUnique({
-    where: { id },
-  });
-  return product;
-}
- 
-export async function getProductWithFavorites(id: number, userId?: number) {
-  const product = await prismaClient.product.findUnique({
-    where: { id },
-    include: { favorites: true },
-  });
-  if (!product) {
-    return null;
-  }
- 
-  const mappedProduct = {
-    ...product,
-    favorites: undefined,
-    favoriteCount: product.favorites.length,
-    isFavorited: userId
-      ? product.favorites.some((favorite) => favorite.userId === userId)
-      : undefined,
-  };
-  return mappedProduct;
-}
- 
-export async function getProductListWithFavorites(
-  { page, pageSize, orderBy, keyword }: PagePaginationParams,
-  {
-    userId,
-  }: {
-    userId?: number;
-  } = {}
-) {
-  const where = keyword
-    ? {
-        OR: [{ name: { contains: keyword } }, { description: { contains: keyword } }],
-      }
-    : {};
- 
-  const totalCount = await prismaClient.product.count({
-    where,
-  });
- 
-  const products = await prismaClient.product.findMany({
-    skip: (page - 1) * pageSize,
-    take: pageSize,
-    orderBy: orderBy === 'recent' ? { id: 'desc' } : { id: 'asc' },
-    where,
-    include: {
-      favorites: true,
-    },
-  });
- 
-  const mappedProducts = products.map((product) => ({
-    ...product,
-    favorites: undefined,
-    favoriteCount: product.favorites.length,
-    isFavorited:
-      userId !== undefined
-        ? product.favorites.some((favorite) => favorite.userId === userId)
-        : undefined,
-  }));
- 
-  return {
-    list: mappedProducts,
-    totalCount,
-  };
-}
- 
-export async function getFavoriteProductListByOwnerId(
-  ownerId: number,
-  { page, pageSize, orderBy, keyword }: PagePaginationParams
-) {
-  const where = keyword
-    ? {
-        OR: [{ name: { contains: keyword } }, { description: { contains: keyword } }],
-      }
-    : {};
-  const totalCount = await prismaClient.product.count({
-    where: {
-      ...where,
-      favorites: {
-        some: {
-          userId: ownerId,
-        },
-      },
-    },
-  });
-  const products = await prismaClient.product.findMany({
-    skip: (page - 1) * pageSize,
-    take: pageSize,
-    orderBy: orderBy === 'recent' ? { id: 'desc' } : { id: 'asc' },
-    where: {
-      ...where,
-      favorites: {
-        some: {
-          userId: ownerId,
-        },
-      },
-    },
-    include: {
-      favorites: true,
-    },
-  });
- 
-  const mappedProducts = products.map((product) => ({
-    ...product,
-    favorites: undefined,
-    favoriteCount: product.favorites.length,
-    isFavorited: true,
-  }));
- 
-  return {
-    list: mappedProducts,
-    totalCount,
-  };
-}
- 
-export async function updateProductWithFavorites(id: number, data: Partial<Product>) {
-  const product = await prismaClient.product.update({
-    where: { id },
-    data,
-    include: {
-      favorites: true,
-    },
-  });
-  const mappedProduct = {
-    ...product,
-    favorites: undefined,
-    favoriteCount: product.favorites.length,
-    isFavorited: data.userId
-      ? product.favorites.some((favorite) => favorite.userId === data.userId)
-      : undefined,
-  };
-  return mappedProduct;
-}
- 
-export async function deleteProduct(id: number) {
-  return prismaClient.product.delete({
-    where: { id },
-  });
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/repository/user.repo.ts.html b/coverage/lcov-report/src/repository/user.repo.ts.html deleted file mode 100644 index f10857fbb..000000000 --- a/coverage/lcov-report/src/repository/user.repo.ts.html +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - Code coverage report for src/repository/user.repo.ts - - - - - - - - - -
-
-

All files / src/repository user.repo.ts

-
- -
- 80% - Statements - 12/15 -
- - -
- 100% - Branches - 0/0 -
- - -
- 60% - Functions - 3/5 -
- - -
- 80% - Lines - 12/15 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40  -5x -  -5x -  -  -85x -  -  -85x -  -  -5x -57x -  -  -57x -  -  -5x -159x -  -  -159x -  -  -5x -  -  -  -  -  -  -  -5x -  -  -  -  - 
import { User } from '@prisma/client';
-import { prismaClient } from '@lib/prismaClient';
- 
-export async function createUser(
-  data: Omit<User, 'id' | 'createdAt' | 'updatedAt'>
-) {
-  const createdUser = await prismaClient.user.create({
-    data,
-  });
-  return createdUser;
-}
- 
-export async function getUser(id: number) {
-  const user = await prismaClient.user.findUnique({
-    where: { id },
-  });
-  return user;
-}
- 
-export async function getUserByEmail(email: string) {
-  const user = await prismaClient.user.findUnique({
-    where: { email },
-  });
-  return user;
-}
- 
-export async function updateUser(id: number, data: Partial<User>) {
-  const updatedUser = await prismaClient.user.update({
-    where: { id },
-    data,
-  });
-  return updatedUser;
-}
- 
-export async function deleteUser(id: number) {
-  await prismaClient.user.delete({
-    where: { id },
-  });
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/routers/article.router.ts.html b/coverage/lcov-report/src/routers/article.router.ts.html deleted file mode 100644 index 33e431b1d..000000000 --- a/coverage/lcov-report/src/routers/article.router.ts.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - Code coverage report for src/routers/article.router.ts - - - - - - - - - -
-
-

All files / src/routers article.router.ts

-
- -
- 100% - Statements - 15/15 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 0/0 -
- - -
- 100% - Lines - 15/15 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -375x -5x -5x -  -  -  -  -  -  -  -  -  -  -5x -  -5x -  -5x -5x -  -  -  -  -5x -  -  -  -  -5x -5x -5x -5x -5x -5x -  -5x - 
import express from 'express';
-import { withAsync } from '@lib/withAsync';
-import {
-  createArticle,
-  getArticleList,
-  getArticle,
-  updateArticle,
-  deleteArticle,
-  createComment,
-  getCommentList,
-  createLike,
-  deleteLike,
-} from '@/controllers/article.controller';
-import authenticate from '@middleware/authenticate';
- 
-const articlesRouter = express.Router();
- 
-articlesRouter.post('/', authenticate(), withAsync(createArticle));
-articlesRouter.get(
-  '/',
-  authenticate({ optional: true }),
-  withAsync(getArticleList)
-);
-articlesRouter.get(
-  '/:id',
-  authenticate({ optional: true }),
-  withAsync(getArticle)
-);
-articlesRouter.patch('/:id', authenticate(), withAsync(updateArticle));
-articlesRouter.delete('/:id', authenticate(), withAsync(deleteArticle));
-articlesRouter.post('/:id/comments', authenticate(), withAsync(createComment));
-articlesRouter.get('/:id/comments', withAsync(getCommentList));
-articlesRouter.post('/:id/likes', authenticate(), withAsync(createLike));
-articlesRouter.delete('/:id/likes', authenticate(), withAsync(deleteLike));
- 
-export default articlesRouter;
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/routers/auth.router.ts.html b/coverage/lcov-report/src/routers/auth.router.ts.html deleted file mode 100644 index 3c4413662..000000000 --- a/coverage/lcov-report/src/routers/auth.router.ts.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - Code coverage report for src/routers/auth.router.ts - - - - - - - - - -
-
-

All files / src/routers auth.router.ts

-
- -
- 100% - Statements - 9/9 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 0/0 -
- - -
- 100% - Lines - 9/9 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -185x -5x -  -  -  -  -  -5x -  -5x -  -5x -5x -5x -5x -  -5x - 
import express from 'express';
-import {
-  register,
-  login,
-  logout,
-  refreshToken,
-} from '@/controllers/auth.controller';
-import { withAsync } from '@lib/withAsync';
- 
-const authRouter = express.Router();
- 
-authRouter.post('/register', withAsync(register));
-authRouter.post('/login', withAsync(login));
-authRouter.post('/logout', withAsync(logout));
-authRouter.post('/refresh', withAsync(refreshToken));
- 
-export default authRouter;
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/routers/comment.router.ts.html b/coverage/lcov-report/src/routers/comment.router.ts.html deleted file mode 100644 index 2aa92d8c1..000000000 --- a/coverage/lcov-report/src/routers/comment.router.ts.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - Code coverage report for src/routers/comment.router.ts - - - - - - - - - -
-
-

All files / src/routers comment.router.ts

-
- -
- 100% - Statements - 8/8 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 0/0 -
- - -
- 100% - Lines - 8/8 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -125x -5x -5x -5x -  -5x -  -5x -5x -  -5x - 
import express from 'express';
-import { withAsync } from '@lib/withAsync';
-import { updateComment, deleteComment } from '@/controllers/comment.controller';
-import authenticate from '@middleware/authenticate';
- 
-const commentsRouter = express.Router();
- 
-commentsRouter.patch('/:id', authenticate(), withAsync(updateComment));
-commentsRouter.delete('/:id', authenticate(), withAsync(deleteComment));
- 
-export default commentsRouter;
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/routers/image.router.ts.html b/coverage/lcov-report/src/routers/image.router.ts.html deleted file mode 100644 index 70ffb86aa..000000000 --- a/coverage/lcov-report/src/routers/image.router.ts.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - Code coverage report for src/routers/image.router.ts - - - - - - - - - -
-
-

All files / src/routers image.router.ts

-
- -
- 100% - Statements - 6/6 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 0/0 -
- - -
- 100% - Lines - 6/6 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -105x -5x -5x -  -5x -  -5x -  -5x - 
import express from 'express';
-import { withAsync } from '@lib/withAsync';
-import { upload, uploadImage } from '@/controllers/image.controller';
- 
-const imagesRouter = express.Router();
- 
-imagesRouter.post('/upload', upload.single('image'), withAsync(uploadImage));
- 
-export default imagesRouter;
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/routers/index.html b/coverage/lcov-report/src/routers/index.html deleted file mode 100644 index 8c461b226..000000000 --- a/coverage/lcov-report/src/routers/index.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - Code coverage report for src/routers - - - - - - - - - -
-
-

All files src/routers

-
- -
- 100% - Statements - 72/72 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 0/0 -
- - -
- 100% - Lines - 72/72 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
article.router.ts -
-
100%15/15100%0/0100%0/0100%15/15
auth.router.ts -
-
100%9/9100%0/0100%0/0100%9/9
comment.router.ts -
-
100%8/8100%0/0100%0/0100%8/8
image.router.ts -
-
100%6/6100%0/0100%0/0100%6/6
notification.router.ts -
-
100%8/8100%0/0100%0/0100%8/8
product.router.ts -
-
100%15/15100%0/0100%0/0100%15/15
user.router.ts -
-
100%11/11100%0/0100%0/0100%11/11
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/routers/notification.router.ts.html b/coverage/lcov-report/src/routers/notification.router.ts.html deleted file mode 100644 index 9e6e49db5..000000000 --- a/coverage/lcov-report/src/routers/notification.router.ts.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - Code coverage report for src/routers/notification.router.ts - - - - - - - - - -
-
-

All files / src/routers notification.router.ts

-
- -
- 100% - Statements - 8/8 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 0/0 -
- - -
- 100% - Lines - 8/8 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -135x -5x -5x -5x -  -5x -  -5x -  -5x -  -5x - 
import express from 'express';
-import { withAsync } from '@lib/withAsync';
-import { getNotifications, updateNotification } from '@/controllers/notification.controller';
-import authenticate from '@middleware/authenticate';
- 
-const notificationRouter = express.Router();
- 
-notificationRouter.get('/', authenticate(), withAsync(getNotifications));
- 
-notificationRouter.patch('/:id/read', authenticate(), withAsync(updateNotification));
- 
-export default notificationRouter;
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/routers/product.router.ts.html b/coverage/lcov-report/src/routers/product.router.ts.html deleted file mode 100644 index 6c0e85c84..000000000 --- a/coverage/lcov-report/src/routers/product.router.ts.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - Code coverage report for src/routers/product.router.ts - - - - - - - - - -
-
-

All files / src/routers product.router.ts

-
- -
- 100% - Statements - 15/15 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 0/0 -
- - -
- 100% - Lines - 15/15 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -455x -5x -5x -  -  -  -  -  -  -  -  -  -  -5x -  -5x -  -5x -5x -  -  -  -  -5x -5x -5x -  -  -  -  -5x -5x -5x -  -  -  -  -5x -  -  -  -  -  -5x - 
import express from 'express';
-import { withAsync } from '@lib/withAsync';
-import {
-  createProduct,
-  getProduct,
-  updateProduct,
-  deleteProduct,
-  getProductList,
-  createComment,
-  getCommentList,
-  createFavorite,
-  deleteFavorite,
-} from '@/controllers/product.controller';
-import authenticate from '@middleware/authenticate';
- 
-const productsRouter = express.Router();
- 
-productsRouter.post('/', authenticate(), withAsync(createProduct));
-productsRouter.get(
-  '/:id',
-  authenticate({ optional: true }),
-  withAsync(getProduct)
-);
-productsRouter.patch('/:id', authenticate(), withAsync(updateProduct));
-productsRouter.delete('/:id', authenticate(), withAsync(deleteProduct));
-productsRouter.get(
-  '/',
-  authenticate({ optional: true }),
-  withAsync(getProductList)
-);
-productsRouter.post('/:id/comments', authenticate(), withAsync(createComment));
-productsRouter.get('/:id/comments', withAsync(getCommentList));
-productsRouter.post(
-  '/:id/favorites',
-  authenticate(),
-  withAsync(createFavorite)
-);
-productsRouter.delete(
-  '/:id/favorites',
-  authenticate(),
-  withAsync(deleteFavorite)
-);
- 
-export default productsRouter;
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/routers/user.router.ts.html b/coverage/lcov-report/src/routers/user.router.ts.html deleted file mode 100644 index 77431062b..000000000 --- a/coverage/lcov-report/src/routers/user.router.ts.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - Code coverage report for src/routers/user.router.ts - - - - - - - - - -
-
-

All files / src/routers user.router.ts

-
- -
- 100% - Statements - 11/11 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 0/0 -
- - -
- 100% - Lines - 11/11 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -215x -5x -5x -  -  -  -  -  -  -5x -  -5x -  -5x -5x -5x -5x -5x -  -5x - 
import express from 'express';
-import { withAsync } from '@lib/withAsync';
-import {
-  getMe,
-  updateMe,
-  updateMyPassword,
-  getMyProductList,
-  getMyFavoriteList,
-} from '@/controllers/user.controller';
-import authenticate from '@middleware/authenticate';
- 
-const usersRouter = express.Router();
- 
-usersRouter.get('/me', authenticate(), withAsync(getMe));
-usersRouter.patch('/me', authenticate(), withAsync(updateMe));
-usersRouter.patch('/me/password', authenticate(), withAsync(updateMyPassword));
-usersRouter.get('/me/products', authenticate(), withAsync(getMyProductList));
-usersRouter.get('/me/favorites', authenticate(), withAsync(getMyFavoriteList));
- 
-export default usersRouter;
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/service/article.service.ts.html b/coverage/lcov-report/src/service/article.service.ts.html deleted file mode 100644 index 14f98a699..000000000 --- a/coverage/lcov-report/src/service/article.service.ts.html +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - Code coverage report for src/service/article.service.ts - - - - - - - - - -
-
-

All files / src/service article.service.ts

-
- -
- 100% - Statements - 29/29 -
- - -
- 100% - Branches - 10/10 -
- - -
- 100% - Functions - 5/5 -
- - -
- 100% - Lines - 29/29 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -605x -  -5x -5x -  -  -  -  -  -5x -12x -12x -  -  -  -  -  -  -5x -4x -4x -2x -  -2x -  -  -5x -  -  -8x -8x -  -  -5x -5x -5x -1x -  -  -4x -1x -  -  -3x -3x -  -  -5x -3x -3x -1x -  -  -2x -1x -  -  -1x -  - 
import * as articlesRepository from '@/repository/article.repo';
-import { PagePaginationParams, PagePaginationResult } from '@app-types/pagination';
-import ForbiddenError from '@lib/errors/ForbiddenError';
-import NotFoundError from '@lib/errors/NotFoundError';
-import Article from '@app-types/Article';
- 
-type CreateArticleData = Omit<Article, 'id' | 'createdAt' | 'updatedAt' | 'likeCount' | 'isLiked'>;
-type UpdateArticleData = Partial<CreateArticleData> & { userId: number };
- 
-export async function createArticle(data: CreateArticleData): Promise<Article> {
-  const createdArticle = await articlesRepository.createArticle(data);
-  return {
-    ...createdArticle,
-    likeCount: 0,
-    isLiked: false,
-  };
-}
- 
-export async function getArticle(id: number): Promise<Article | null> {
-  const article = await articlesRepository.getArticleWithLikes(id);
-  if (!article) {
-    throw new NotFoundError('article', id);
-  }
-  return article;
-}
- 
-export async function getArticleList(
-  params: PagePaginationParams
-): Promise<PagePaginationResult<Article>> {
-  const articles = await articlesRepository.getArticleListWithLikes(params);
-  return articles;
-}
- 
-export async function updateArticle(id: number, data: UpdateArticleData): Promise<Article> {
-  const existingArticle = await articlesRepository.getArticle(id);
-  if (!existingArticle) {
-    throw new NotFoundError('article', id);
-  }
- 
-  if (existingArticle.userId !== data.userId) {
-    throw new ForbiddenError('Should be the owner of the article');
-  }
- 
-  const updatedArticle = await articlesRepository.updateArticleWithLikes(id, data);
-  return updatedArticle;
-}
- 
-export async function deleteArticle(id: number, userId: number): Promise<void> {
-  const existingArticle = await articlesRepository.getArticle(id);
-  if (!existingArticle) {
-    throw new NotFoundError('article', id);
-  }
- 
-  if (existingArticle.userId !== userId) {
-    throw new ForbiddenError('Should be the owner of the article');
-  }
- 
-  await articlesRepository.deleteArticle(id);
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/service/auth.service.ts.html b/coverage/lcov-report/src/service/auth.service.ts.html deleted file mode 100644 index 6a27ef29a..000000000 --- a/coverage/lcov-report/src/service/auth.service.ts.html +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - Code coverage report for src/service/auth.service.ts - - - - - - - - - -
-
-

All files / src/service auth.service.ts

-
- -
- 66.66% - Statements - 34/51 -
- - -
- 50% - Branches - 9/18 -
- - -
- 71.42% - Functions - 5/7 -
- - -
- 66.66% - Lines - 34/51 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -1035x -5x -5x -5x -5x -5x -  -  -  -  -  -  -72x -  -  -  -85x -85x -  -  -5x -86x -86x -1x -  -  -85x -  -85x -  -  -  -  -  -  -85x -  -  -5x -73x -73x -1x -  -  -72x -72x -1x -  -  -71x -71x -  -  -  -  -  -5x -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -5x -  -  -  -  -  -  -  -  -  -  -  -  -  -  -5x -73x -16x -  -  -57x -57x -57x -  -  -57x -  - 
import bcrypt from 'bcrypt';
-import * as usersRepository from '@/repository/user.repo';
-import BadRequestError from '@lib/errors/BadRequestError';
-import NotFoundError from '@lib/errors/NotFoundError';
-import { generateTokens, verifyAccessToken, verifyRefreshToken } from '@lib/token';
-import UnauthorizedError from '@lib/errors/UnauthorizedError';
-import User from '@app-types/User';
- 
-type RegisterData = Omit<User, 'id' | 'createdAt' | 'updatedAt'>;
-type LoginData = Pick<User, 'email' | 'password'>;
- 
-async function verifyPassword(user: User, password: string) {
-  return await bcrypt.compare(password, user.password);
-}
- 
-async function hashPassword(password: string) {
-  const salt = await bcrypt.genSalt(10);
-  return await bcrypt.hash(password, salt);
-}
- 
-export async function register(data: RegisterData) {
-  const existingUser = await usersRepository.getUserByEmail(data.email);
-  if (existingUser) {
-    throw new BadRequestError('User already exists');
-  }
- 
-  const hashedPassword = await hashPassword(data.password);
- 
-  const user = await usersRepository.createUser({
-    email: data.email,
-    nickname: data.nickname,
-    password: hashedPassword,
-    image: data.image,
-  });
- 
-  return user;
-}
- 
-export async function login(data: LoginData) {
-  const user = await usersRepository.getUserByEmail(data.email);
-  if (!user) {
-    throw new BadRequestError('Invalid credentials');
-  }
- 
-  const isPasswordValid = await verifyPassword(user, data.password);
-  if (!isPasswordValid) {
-    throw new BadRequestError('Invalid credentials');
-  }
- 
-  const { accessToken, refreshToken } = generateTokens(user.id);
-  return {
-    accessToken,
-    refreshToken,
-  };
-}
- 
-export async function refreshToken(refreshToken?: string) {
-  if (!refreshToken) {
-    throw new BadRequestError('Invalid refresh token');
-  }
- 
-  const { userId } = verifyRefreshToken(refreshToken);
- 
-  const user = await usersRepository.getUser(userId);
-  if (!user) {
-    throw new BadRequestError('Invalid refresh token');
-  }
- 
-  const { accessToken, refreshToken: newRefreshToken } = generateTokens(userId);
-  return {
-    accessToken,
-    refreshToken: newRefreshToken,
-  };
-}
- 
-export async function updateMyPassword(userId: User['id'], password: string, newPassword: string) {
-  const user = await usersRepository.getUser(userId);
-  if (!user) {
-    throw new NotFoundError('user', userId);
-  }
- 
-  const isPasswordValid = await verifyPassword(user, password);
-  if (!isPasswordValid) {
-    throw new BadRequestError('Invalid credentials');
-  }
- 
-  const hashedPassword = await hashPassword(newPassword);
-  await usersRepository.updateUser(userId, { password: hashedPassword });
-}
- 
-export async function authenticate(accessToken?: string) {
-  if (!accessToken) {
-    throw new UnauthorizedError('Unauthorized');
-  }
- 
-  const { userId } = verifyAccessToken(accessToken);
-  const user = await usersRepository.getUser(userId);
-  Iif (!user) {
-    throw new UnauthorizedError('Unauthorized');
-  }
-  return user;
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/service/comment.service.ts.html b/coverage/lcov-report/src/service/comment.service.ts.html deleted file mode 100644 index f97ca183b..000000000 --- a/coverage/lcov-report/src/service/comment.service.ts.html +++ /dev/null @@ -1,535 +0,0 @@ - - - - - - Code coverage report for src/service/comment.service.ts - - - - - - - - - -
-
-

All files / src/service comment.service.ts

-
- -
- 20.96% - Statements - 13/62 -
- - -
- 0% - Branches - 0/34 -
- - -
- 0% - Functions - 0/10 -
- - -
- 21.66% - Lines - 13/60 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -1515x -5x -5x -5x -  -  -5x -5x -  -5x -  -  -  -  -  -  -  -  -  -5x -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -5x -  -  -  -  -  -  -  -5x -  -  -  -  -  -  -  -  -  -  -  -  -5x -  -  -  -  -  -  -  -  -  -  -  -  -5x -  -  -  -  -  -  -  -  -  -  -  -  -5x -  -  -  -  -  -  -  -  -  -  -  - 
import * as articlesRepository from '@/repository/article.repo';
-import * as commentsRepository from '@/repository/comment.repo';
-import * as productsRepository from '@/repository/product.repo';
-import * as notificationRepository from '@/repository/notification.repo';
-import { CursorPaginationParams, CursorPaginationResult } from '@app-types/pagination';
-import BadRequestError from '@lib/errors/BadRequestError';
-import ForbiddenError from '@lib/errors/ForbiddenError';
-import NotFoundError from '@lib/errors/NotFoundError';
-import Comment from '@app-types/Comment';
-import { notifyToUser } from '@/lib/websocket';
- 
-type CreateCommentData = Omit<
-  Comment,
-  'id' | 'productId' | 'articleId' | 'createdAt' | 'updatedAt'
-> & {
-  productId?: number;
-  articleId?: number;
-};
- 
-export async function createComment(data: CreateCommentData): Promise<Comment> {
-  // notification 작업 추가
-  const { articleId, productId, userId } = data;
- 
-  // 1) 대상 검증 및 알림 정보 생성
-  const target = articleId
-    ? await (async () => {
-        const article = await articlesRepository.getArticle(articleId);
-        if (!article) throw new NotFoundError('article', articleId);
- 
-        return {
-          type: 'articleComment' as const,
-          targetUserId: article.userId,
-          targetName: article.content,
-        };
-      })()
-    : await (async () => {
-        const product = await productsRepository.getProduct(productId!);
-        if (!product) throw new NotFoundError('product', productId!);
-        return {
-          type: 'productComment' as const,
-          targetUserId: product.userId,
-          targetName: product.name,
-        };
-      })();
- 
-  // 2) 댓글 생성
-  const comment = await commentsRepository.createComment({
-    ...data,
-    articleId: articleId ?? null,
-    productId: productId ?? null,
-  });
- 
-  const originName = target.targetName;
-  const cutName = originName.substring(0, 10);
- 
-  // 3) 알림 생성
-  if (target.targetUserId !== userId) {
-    if (target.type === 'articleComment') {
-      await notificationRepository.createNotification({
-        userId: target.targetUserId,
-        type: target.type,
-        articleId: articleId!,
-        message: `게시글 "${cutName}"에 댓글이 생겼습니다`,
-      });
- 
-      notifyToUser(target.targetUserId, 'comment', {
-        articleId: articleId!,
-        commentId: comment.id,
-        message: `게시글 "${cutName}"에 댓글이 생겼습니다`,
-      });
-    }
- 
-    if (target.type === 'productComment') {
-      await notificationRepository.createNotification({
-        userId: target.targetUserId,
-        type: target.type,
-        productId: productId!,
-        message: `상품 "${cutName}"에 댓글이 생겼습니다`,
-      });
- 
-      notifyToUser(target.targetUserId, 'comment', {
-        productId: productId!,
-        commentId: comment.id,
-        message: `상품 "${cutName}"에 댓글이 생겼습니다`,
-      });
-    }
-  }
- 
-  return comment;
-}
- 
-export async function getComment(id: number): Promise<Comment | null> {
-  const comment = await commentsRepository.getComment(id);
-  if (!comment) {
-    throw new NotFoundError('comment', id);
-  }
-  return comment;
-}
- 
-export async function getCommentListByArticleId(
-  articleId: number,
-  params: CursorPaginationParams
-): Promise<CursorPaginationResult<Comment>> {
-  const article = await articlesRepository.getArticle(articleId);
-  if (!article) {
-    throw new NotFoundError('article', articleId);
-  }
- 
-  const result = commentsRepository.getCommentList({ articleId }, params);
-  return result;
-}
- 
-export async function getCommentListByProductId(
-  productId: number,
-  params: CursorPaginationParams
-): Promise<CursorPaginationResult<Comment>> {
-  const product = await productsRepository.getProduct(productId);
-  if (!product) {
-    throw new NotFoundError('product', productId);
-  }
- 
-  const result = commentsRepository.getCommentList({ productId }, params);
-  return result;
-}
- 
-export async function updateComment(id: number, userId: number, content: string): Promise<Comment> {
-  const comment = await commentsRepository.getComment(id);
-  if (!comment) {
-    throw new NotFoundError('comment', id);
-  }
- 
-  if (comment.userId !== userId) {
-    throw new ForbiddenError('Should be the owner of the comment');
-  }
- 
-  return commentsRepository.updateComment(id, { content });
-}
- 
-export async function deleteComment(id: number, userId: number): Promise<void> {
-  const comment = await commentsRepository.getComment(id);
-  if (!comment) {
-    throw new NotFoundError('comment', id);
-  }
- 
-  if (comment.userId !== userId) {
-    throw new ForbiddenError('Should be the owner of the comment');
-  }
- 
-  await commentsRepository.deleteComment(id);
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/service/favorite.service.ts.html b/coverage/lcov-report/src/service/favorite.service.ts.html deleted file mode 100644 index df665abe5..000000000 --- a/coverage/lcov-report/src/service/favorite.service.ts.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - Code coverage report for src/service/favorite.service.ts - - - - - - - - - -
-
-

All files / src/service favorite.service.ts

-
- -
- 30% - Statements - 6/20 -
- - -
- 0% - Branches - 0/8 -
- - -
- 0% - Functions - 0/2 -
- - -
- 30% - Lines - 6/20 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -335x -5x -5x -5x -  -5x -  -  -  -  -  -  -  -  -  -  -  -  -  -5x -  -  -  -  -  -  -  -  -  -  -  -  - 
import * as favoritesRepository from '@/repository/favorite.repo';
-import * as productsRepository from '@/repository/product.repo';
-import NotFoundError from '@lib/errors/NotFoundError';
-import BadRequestError from '@lib/errors/BadRequestError';
- 
-export async function createFavorite(productId: number, userId: number) {
-  const existingProduct = await productsRepository.getProduct(productId);
-  if (!existingProduct) {
-    throw new NotFoundError('product', productId);
-  }
- 
-  const existingFavorite = await favoritesRepository.getFavorite(productId, userId);
-  if (existingFavorite) {
-    throw new BadRequestError('Already favorited');
-  }
- 
-  await favoritesRepository.createFavorite({ productId, userId });
-}
- 
-export async function deleteFavorite(productId: number, userId: number) {
-  const existingProduct = await productsRepository.getProduct(productId);
-  if (!existingProduct) {
-    throw new NotFoundError('product', productId);
-  }
- 
-  const existingFavorite = await favoritesRepository.getFavorite(productId, userId);
-  if (!existingFavorite) {
-    throw new BadRequestError('Not favorited');
-  }
- 
-  await favoritesRepository.deleteFavorite(existingFavorite.id);
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/service/index.html b/coverage/lcov-report/src/service/index.html deleted file mode 100644 index 4d9c54b98..000000000 --- a/coverage/lcov-report/src/service/index.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - Code coverage report for src/service - - - - - - - - - -
-
-

All files src/service

-
- -
- 56.12% - Statements - 142/253 -
- - -
- 36.36% - Branches - 36/99 -
- - -
- 45% - Functions - 18/40 -
- - -
- 56.8% - Lines - 142/250 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
article.service.ts -
-
100%29/29100%10/10100%5/5100%29/29
auth.service.ts -
-
66.66%34/5150%9/1871.42%5/766.66%34/51
comment.service.ts -
-
20.96%13/620%0/340%0/1021.66%13/60
favorite.service.ts -
-
30%6/200%0/80%0/230%6/20
like.service.ts -
-
30%6/200%0/80%0/230%6/20
notification.service.ts -
-
36.36%4/110%0/20%0/240%4/10
product.service.ts -
-
100%43/43100%17/17100%8/8100%43/43
user.service.ts -
-
41.17%7/170%0/20%0/441.17%7/17
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/service/like.service.ts.html b/coverage/lcov-report/src/service/like.service.ts.html deleted file mode 100644 index df96a878f..000000000 --- a/coverage/lcov-report/src/service/like.service.ts.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - Code coverage report for src/service/like.service.ts - - - - - - - - - -
-
-

All files / src/service like.service.ts

-
- -
- 30% - Statements - 6/20 -
- - -
- 0% - Branches - 0/8 -
- - -
- 0% - Functions - 0/2 -
- - -
- 30% - Lines - 6/20 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -335x -5x -5x -5x -  -5x -  -  -  -  -  -  -  -  -  -  -  -  -  -5x -  -  -  -  -  -  -  -  -  -  -  -  - 
import * as likesRepository from '@/repository/like.repo';
-import * as articlesRepository from '@/repository/article.repo';
-import NotFoundError from '@lib/errors/NotFoundError';
-import BadRequestError from '@lib/errors/BadRequestError';
- 
-export async function createLike(articleId: number, userId: number) {
-  const existingArticle = await articlesRepository.getArticle(articleId);
-  if (!existingArticle) {
-    throw new NotFoundError('article', articleId);
-  }
- 
-  const existingLike = await likesRepository.getLike(articleId, userId);
-  if (existingLike) {
-    throw new BadRequestError('Already liked');
-  }
- 
-  await likesRepository.createLike({ articleId, userId });
-}
- 
-export async function deleteLike(articleId: number, userId: number) {
-  const existingArticle = await articlesRepository.getArticle(articleId);
-  if (!existingArticle) {
-    throw new NotFoundError('article', articleId);
-  }
- 
-  const existingLike = await likesRepository.getLike(articleId, userId);
-  if (!existingLike) {
-    throw new BadRequestError('Not liked');
-  }
- 
-  await likesRepository.deleteLike(existingLike.id);
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/service/notification.service.ts.html b/coverage/lcov-report/src/service/notification.service.ts.html deleted file mode 100644 index 5ef29a69b..000000000 --- a/coverage/lcov-report/src/service/notification.service.ts.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - Code coverage report for src/service/notification.service.ts - - - - - - - - - -
-
-

All files / src/service notification.service.ts

-
- -
- 36.36% - Statements - 4/11 -
- - -
- 0% - Branches - 0/2 -
- - -
- 0% - Functions - 0/2 -
- - -
- 40% - Lines - 4/10 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -175x -5x -  -5x -  -  -  -  -  -5x -  -  -  -  -  -  - 
import NotFoundError from '@lib/errors/NotFoundError';
-import * as notificationsRepository from '@/repository/notification.repo';
- 
-export async function getNotificationList(userId: number) {
-  const notificationList = await notificationsRepository.getNotificationList(userId);
- 
-  return notificationList;
-}
- 
-export async function updateNotificationInfo(notificationId: number) {
-  const getNotification = await notificationsRepository.getNotification(notificationId);
-  if (!getNotification) throw new NotFoundError('notification', notificationId);
- 
-  const updateNotification = await notificationsRepository.patchNotification(notificationId);
-  return updateNotification;
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/service/product.service.ts.html b/coverage/lcov-report/src/service/product.service.ts.html deleted file mode 100644 index 1181d2ab0..000000000 --- a/coverage/lcov-report/src/service/product.service.ts.html +++ /dev/null @@ -1,358 +0,0 @@ - - - - - - Code coverage report for src/service/product.service.ts - - - - - - - - - -
-
-

All files / src/service product.service.ts

-
- -
- 100% - Statements - 43/43 -
- - -
- 100% - Branches - 17/17 -
- - -
- 100% - Functions - 8/8 -
- - -
- 100% - Lines - 43/43 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -926x -6x -6x -6x -6x -  -  -6x -  -  -  -  -  -  -  -6x -15x -15x -  -  -  -  -  -  -6x -6x -6x -3x -  -3x -  -  -6x -9x -  -  -9x -9x -  -  -6x -11x -11x -2x -  -9x -2x -  -7x -  -7x -7x -  -7x -7x -  -7x -2x -  -2x -  -2x -  -  -  -  -  -  -  -  -2x -2x -  -  -  -  -  -  -7x -  -  -6x -6x -6x -2x -  -4x -2x -  -2x -  - 
import ForbiddenError from '@lib/errors/ForbiddenError';
-import NotFoundError from '@lib/errors/NotFoundError';
-import * as productsRepository from '@repository/product.repo';
-import * as favoriteRepository from '@repository/favorite.repo';
-import * as notificationRepository from '@repository/notification.repo';
-import { PagePaginationParams, PagePaginationResult } from '@app-types/pagination';
-import Product from '@app-types/Product';
-import { notifyToUser } from '@lib/websocket';
- 
-type CreateProductData = Omit<
-  Product,
-  'id' | 'createdAt' | 'updatedAt' | 'favoriteCount' | 'isFavorited'
->;
-type UpdateProductData = Partial<CreateProductData> & { userId: number };
- 
-export async function createProduct(data: CreateProductData): Promise<Product> {
-  const createdProduct = await productsRepository.createProduct(data);
-  return {
-    ...createdProduct,
-    favoriteCount: 0,
-    isFavorited: false,
-  };
-}
- 
-export async function getProduct(id: number): Promise<Product | null> {
-  const product = await productsRepository.getProductWithFavorites(id);
-  if (!product) {
-    throw new NotFoundError('product', id);
-  }
-  return product;
-}
- 
-export async function getProductList(
-  params: PagePaginationParams,
-  { userId }: { userId?: number } = {}
-): Promise<PagePaginationResult<Product>> {
-  const products = await productsRepository.getProductListWithFavorites(params, { userId });
-  return products;
-}
- 
-export async function updateProduct(id: number, data: UpdateProductData): Promise<Product> {
-  const existingProduct = await productsRepository.getProduct(id);
-  if (!existingProduct) {
-    throw new NotFoundError('product', id);
-  }
-  if (existingProduct.userId !== data.userId) {
-    throw new ForbiddenError('Should be the owner of the product');
-  }
-  const updatedProduct = await productsRepository.updateProductWithFavorites(id, data);
- 
-  const productId = existingProduct.id;
-  const likeProductMember = await favoriteRepository.getFavoriteMember(productId);
- 
-  const originName = existingProduct.name;
-  const cutName = originName.substring(0, 10);
- 
-  if (data.price && data.price !== existingProduct.price) {
-    const priceUpdate = data.price > existingProduct.price ? '상승하였습니다' : '하락하였습니다';
- 
-    await Promise.all(
-      likeProductMember.map((user) =>
-        notificationRepository.createNotification({
-          userId: user.id,
-          type: 'priceChange',
-          productId,
-          message: `상품 "${cutName}"의 가격이 ${priceUpdate}`,
-        })
-      )
-    );
- 
-    likeProductMember.forEach((user) => {
-      notifyToUser(user.id, 'priceChange', {
-        productId,
-        message: `상품 "${cutName}"의 가격이 ${priceUpdate}`,
-      });
-    });
-  }
- 
-  return updatedProduct;
-}
- 
-export async function deleteProduct(id: number, userId: number): Promise<void> {
-  const existingProduct = await productsRepository.getProduct(id);
-  if (!existingProduct) {
-    throw new NotFoundError('product', id);
-  }
-  if (existingProduct.userId !== userId) {
-    throw new ForbiddenError('Should be the owner of the product');
-  }
-  await productsRepository.deleteProduct(id);
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/service/user.service.ts.html b/coverage/lcov-report/src/service/user.service.ts.html deleted file mode 100644 index c10b2c42f..000000000 --- a/coverage/lcov-report/src/service/user.service.ts.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - Code coverage report for src/service/user.service.ts - - - - - - - - - -
-
-

All files / src/service user.service.ts

-
- -
- 41.17% - Statements - 7/17 -
- - -
- 0% - Branches - 0/2 -
- - -
- 0% - Functions - 0/4 -
- - -
- 41.17% - Lines - 7/17 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41  -  -5x -5x -5x -  -  -  -  -5x -  -  -  -  -  -  -  -  -5x -  -  -  -  -5x -  -  -  -  -  -  -  -  -  -5x -  -  -  -  -  -  - 
import { Product } from '@prisma/client';
-import { PagePaginationParams, PagePaginationResult } from '@app-types/pagination';
-import * as usersRepository from '@/repository/user.repo';
-import * as productsRepository from '@/repository/product.repo';
-import NotFoundError from '@lib/errors/NotFoundError';
-import User from '@app-types/User';
- 
-type UpdateUserData = Partial<Omit<User, 'id' | 'createdAt' | 'updatedAt'>>;
- 
-export async function getUser(userId: number): Promise<User> {
-  const user = await usersRepository.getUser(userId);
-  if (!user) {
-    throw new NotFoundError('user', userId);
-  }
- 
-  return user;
-}
- 
-export async function updateUser(userId: number, data: Partial<UpdateUserData>): Promise<User> {
-  const updatedUser = await usersRepository.updateUser(userId, data);
-  return updatedUser;
-}
- 
-export async function getMyProductList(
-  userId: number,
-  params: PagePaginationParams
-): Promise<PagePaginationResult<Product>> {
-  const result = await productsRepository.getProductListWithFavorites(params, {
-    userId,
-  });
-  return result;
-}
- 
-export async function getMyFavoriteList(
-  userId: number,
-  params: PagePaginationParams
-): Promise<PagePaginationResult<Product>> {
-  const result = await productsRepository.getFavoriteProductListByOwnerId(userId, params);
-  return result;
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/structs/article.structs.ts.html b/coverage/lcov-report/src/structs/article.structs.ts.html deleted file mode 100644 index d9088d595..000000000 --- a/coverage/lcov-report/src/structs/article.structs.ts.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - Code coverage report for src/structs/article.structs.ts - - - - - - - - - -
-
-

All files / src/structs article.structs.ts

-
- -
- 100% - Statements - 6/6 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 1/1 -
- - -
- 100% - Lines - 6/6 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -135x -5x -  -5x -  -5x -17x -  -  -  -  -5x - 
import { coerce, nonempty, nullable, object, partial, string } from 'superstruct';
-import { PageParamsStruct } from '@/structs/common.structs';
- 
-export const GetArticleListParamsStruct = PageParamsStruct;
- 
-export const CreateArticleBodyStruct = object({
-  title: coerce(nonempty(string()), string(), (value) => value.trim()),
-  content: nonempty(string()),
-  image: nullable(string()),
-});
- 
-export const UpdateArticleBodyStruct = partial(CreateArticleBodyStruct);
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/structs/auth.structs.ts.html b/coverage/lcov-report/src/structs/auth.structs.ts.html deleted file mode 100644 index 03bed88b5..000000000 --- a/coverage/lcov-report/src/structs/auth.structs.ts.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - Code coverage report for src/structs/auth.structs.ts - - - - - - - - - -
-
-

All files / src/structs auth.structs.ts

-
- -
- 100% - Statements - 6/6 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 1/1 -
- - -
- 100% - Lines - 5/5 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -175x -5x -  -166x -  -5x -  -  -  -  -  -  -5x -  -  -  - 
import { nonempty, nullable, object, string, refine } from 'superstruct';
-import isEmail from 'is-email';
- 
-const EmailStruct = refine(string(), 'Email', (value) => isEmail(value));
- 
-export const RegisterBodyStruct = object({
-  email: nonempty(EmailStruct),
-  nickname: nonempty(string()),
-  password: nonempty(string()),
-  image: nullable(string()),
-});
- 
-export const LoginBodyStruct = object({
-  email: nonempty(EmailStruct),
-  password: nonempty(string()),
-});
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/structs/comment.struct.ts.html b/coverage/lcov-report/src/structs/comment.struct.ts.html deleted file mode 100644 index 933fb4f39..000000000 --- a/coverage/lcov-report/src/structs/comment.struct.ts.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - Code coverage report for src/structs/comment.struct.ts - - - - - - - - - -
-
-

All files / src/structs comment.struct.ts

-
- -
- 100% - Statements - 5/5 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 0/0 -
- - -
- 100% - Lines - 5/5 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -135x -5x -  -5x -  -  -  -  -  -5x -  -5x - 
import { nonempty, number, object, optional, string } from 'superstruct';
-import { CursorParamsStruct } from '@/structs/common.structs';
- 
-export const CreateCommentBodyStruct = object({
-  content: nonempty(string()),
-  productId: optional(number()),
-  articleId: optional(number()),
-});
- 
-export const GetCommentListParamsStruct = CursorParamsStruct;
- 
-export const UpdateCommentBodyStruct = CreateCommentBodyStruct;
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/structs/common.structs.ts.html b/coverage/lcov-report/src/structs/common.structs.ts.html deleted file mode 100644 index 0afa681f9..000000000 --- a/coverage/lcov-report/src/structs/common.structs.ts.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - Code coverage report for src/structs/common.structs.ts - - - - - - - - - -
-
-

All files / src/structs common.structs.ts

-
- -
- 100% - Statements - 6/6 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 1/1 -
- - -
- 100% - Lines - 5/5 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -235x -  -  -30x -  -5x -  -  -  -5x -  -  -  -  -  -  -5x -  -  -  -  -  - 
import { coerce, integer, object, string, defaulted, optional, enums, nonempty } from 'superstruct';
- 
-/** Convert string to integer then validate it */
-const integerString = coerce(integer(), string(), (value) => parseInt(value));
- 
-export const IdParamsStruct = object({
-  id: integerString,
-});
- 
-export const PageParamsStruct = object({
-  page: defaulted(integerString, 1),
-  pageSize: defaulted(integerString, 10),
-  orderBy: optional(enums(['recent', 'oldest'])),
-  keyword: optional(nonempty(string())),
-});
- 
-export const CursorParamsStruct = object({
-  cursor: defaulted(integerString, 0),
-  limit: defaulted(integerString, 10),
-  orderBy: optional(enums(['recent'])),
-  keyword: optional(nonempty(string())),
-});
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/structs/index.html b/coverage/lcov-report/src/structs/index.html deleted file mode 100644 index 02fcd9be1..000000000 --- a/coverage/lcov-report/src/structs/index.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - Code coverage report for src/structs - - - - - - - - - -
-
-

All files src/structs

-
- -
- 100% - Statements - 35/35 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 4/4 -
- - -
- 100% - Lines - 33/33 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
article.structs.ts -
-
100%6/6100%0/0100%1/1100%6/6
auth.structs.ts -
-
100%6/6100%0/0100%1/1100%5/5
comment.struct.ts -
-
100%5/5100%0/0100%0/0100%5/5
common.structs.ts -
-
100%6/6100%0/0100%1/1100%5/5
product.struct.ts -
-
100%6/6100%0/0100%1/1100%6/6
user.structs.ts -
-
100%6/6100%0/0100%0/0100%6/6
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/structs/product.struct.ts.html b/coverage/lcov-report/src/structs/product.struct.ts.html deleted file mode 100644 index 3d9ed2c15..000000000 --- a/coverage/lcov-report/src/structs/product.struct.ts.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - Code coverage report for src/structs/product.struct.ts - - - - - - - - - -
-
-

All files / src/structs product.struct.ts

-
- -
- 100% - Statements - 6/6 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 1/1 -
- - -
- 100% - Lines - 6/6 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -155x -5x -  -5x -20x -  -  -  -  -  -  -5x -  -5x - 
import { coerce, partial, object, string, min, nonempty, array, integer } from 'superstruct';
-import { PageParamsStruct } from '@/structs/common.structs';
- 
-export const CreateProductBodyStruct = object({
-  name: coerce(nonempty(string()), string(), (value) => value.trim()),
-  description: nonempty(string()),
-  price: min(integer(), 0),
-  tags: array(nonempty(string())),
-  images: array(nonempty(string())),
-});
- 
-export const GetProductListParamsStruct = PageParamsStruct;
- 
-export const UpdateProductBodyStruct = partial(CreateProductBodyStruct);
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/src/structs/user.structs.ts.html b/coverage/lcov-report/src/structs/user.structs.ts.html deleted file mode 100644 index b9eb62610..000000000 --- a/coverage/lcov-report/src/structs/user.structs.ts.html +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - Code coverage report for src/structs/user.structs.ts - - - - - - - - - -
-
-

All files / src/structs user.structs.ts

-
- -
- 100% - Statements - 6/6 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 0/0 -
- - -
- 100% - Lines - 6/6 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -205x -5x -  -5x -  -  -  -  -  -  -  -5x -  -  -  -  -5x -  -5x - 
import { nullable, object, partial, string } from 'superstruct';
-import { PageParamsStruct } from '@/structs/common.structs';
- 
-export const UpdateMeBodyStruct = partial(
-  object({
-    email: string(),
-    nickname: string(),
-    image: nullable(string()),
-  })
-);
- 
-export const UpdatePasswordBodyStruct = object({
-  password: string(),
-  newPassword: string(),
-});
- 
-export const GetMyProductListParamsStruct = PageParamsStruct;
- 
-export const GetMyFavoriteListParamsStruct = PageParamsStruct;
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/test/helper/article.ts.html b/coverage/lcov-report/test/helper/article.ts.html deleted file mode 100644 index 0fea2266c..000000000 --- a/coverage/lcov-report/test/helper/article.ts.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - Code coverage report for test/helper/article.ts - - - - - - - - - -
-
-

All files / test/helper article.ts

-
- -
- 100% - Statements - 8/8 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 2/2 -
- - -
- 100% - Lines - 7/7 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -222x -  -2x -  -5x -  -5x -  -  -  -  -50x -  -  -  -  -  -5x -  -5x -  - 
import { prismaClient } from '@lib/prismaClient';
- 
-export async function createArticlesWithUsers(userSample: any[], articleSample: any[]) {
-  // 관계형 USER 먼저 등록
-  await prismaClient.user.createMany({ data: userSample });
- 
-  const users = await prismaClient.user.findMany({
-    orderBy: { id: 'asc' },
-  });
- 
-  // 게시글 mockdata에 userId 정보 추가
-  const articles = articleSample.map((article, idx) => ({
-    ...article,
-    userId: users[idx % users.length].id,
-  }));
- 
-  // 게시글 등록
-  await prismaClient.article.createMany({ data: articles });
- 
-  return { users, articles };
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/test/helper/index.html b/coverage/lcov-report/test/helper/index.html deleted file mode 100644 index 10e92b361..000000000 --- a/coverage/lcov-report/test/helper/index.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - Code coverage report for test/helper - - - - - - - - - -
-
-

All files test/helper

-
- -
- 100% - Statements - 19/19 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 4/4 -
- - -
- 100% - Lines - 17/17 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FileStatementsBranchesFunctionsLines
article.ts -
-
100%8/8100%0/0100%2/2100%7/7
mockdata.ts -
-
100%3/3100%0/0100%0/0100%3/3
product.ts -
-
100%8/8100%0/0100%2/2100%7/7
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/test/helper/mockdata.ts.html b/coverage/lcov-report/test/helper/mockdata.ts.html deleted file mode 100644 index 6600e1f80..000000000 --- a/coverage/lcov-report/test/helper/mockdata.ts.html +++ /dev/null @@ -1,964 +0,0 @@ - - - - - - Code coverage report for test/helper/mockdata.ts - - - - - - - - - -
-
-

All files / test/helper mockdata.ts

-
- -
- 100% - Statements - 3/3 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 0/0 -
- - -
- 100% - Lines - 3/3 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23 -24 -25 -26 -27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95 -96 -97 -98 -99 -100 -101 -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 -121 -122 -123 -124 -125 -126 -127 -128 -129 -130 -131 -132 -133 -134 -135 -136 -137 -138 -139 -140 -141 -142 -143 -144 -145 -146 -147 -148 -149 -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -160 -161 -162 -163 -164 -165 -166 -167 -168 -169 -170 -171 -172 -173 -174 -175 -176 -177 -178 -179 -180 -181 -182 -183 -184 -185 -186 -187 -188 -189 -190 -191 -192 -193 -194 -195 -196 -197 -198 -199 -200 -201 -202 -203 -204 -205 -206 -207 -208 -209 -210 -211 -212 -213 -214 -215 -216 -217 -218 -219 -220 -221 -222 -223 -224 -225 -226 -227 -228 -229 -230 -231 -232 -233 -234 -235 -236 -237 -238 -239 -240 -241 -242 -243 -244 -245 -246 -247 -248 -249 -250 -251 -252 -253 -254 -255 -256 -257 -258 -259 -260 -261 -262 -263 -264 -265 -266 -267 -268 -269 -270 -271 -272 -273 -274 -275 -276 -277 -278 -279 -280 -281 -282 -283 -284 -285 -286 -287 -288 -289 -290 -291 -292 -293 -2944x -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -4x -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -4x -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - 
export const userSample = [
-  {
-    email: 'test1@test.com',
-    nickname: 'tester1',
-    password: 'qwer1234',
-    image: 'test1.jpg',
-  },
-  {
-    email: 'test2@test.com',
-    nickname: 'tester2',
-    password: 'qwer1234',
-    image: 'test2.jpg',
-  },
-  {
-    email: 'test3@test.com',
-    nickname: 'tester3',
-    password: 'qwer1234',
-    image: 'test3.jpg',
-  },
-  {
-    email: 'test4@test.com',
-    nickname: 'tester4',
-    password: 'qwer1234',
-    image: 'test4.jpg',
-  },
-  {
-    email: 'test5@test.com',
-    nickname: 'tester5',
-    password: 'qwer1234',
-    image: 'test5.jpg',
-  },
-];
- 
-export const productSample = [
-  {
-    name: '로봇',
-    description: '어린이용 변신 로봇',
-    price: 5000,
-    tags: ['어린이', '장난감'],
-    images: ['img1.jpg', 'img1.png'],
-    userId: 1,
-  },
-  {
-    name: '인형',
-    description: '공주님 인형',
-    price: 50000,
-    tags: ['어린이', '장난감'],
-    images: ['img2.jpg', 'img2.png'],
-    userId: 1,
-  },
-  {
-    name: '축구공',
-    description: '2026 리뉴얼 축구공',
-    price: 10000,
-    tags: ['어린이', '장난감', '야외'],
-    images: ['img3.jpg', 'img3.png'],
-    userId: 1,
-  },
-  {
-    name: '의사놀이',
-    description: '의사놀이 전용 장난감 셋트',
-    price: 25000,
-    tags: ['어린이', '장난감', '세트'],
-    images: ['img4.jpg', 'img4.png'],
-    userId: 1,
-  },
-  {
-    name: '변신로봇 타이탄',
-    description: '버튼으로 변신하는 대형 로봇',
-    price: 18000,
-    tags: ['어린이', '장난감'],
-    images: ['robot1.jpg'],
-    userId: 1,
-  },
-  {
-    name: '레인보우 블록',
-    description: '색감 학습용 블록 장난감',
-    price: 12000,
-    tags: ['어린이', '교육'],
-    images: ['block1.jpg'],
-    userId: 1,
-  },
-  {
-    name: '미니 경찰차',
-    description: '소리 나는 미니카',
-    price: 7000,
-    tags: ['장난감', '탈것'],
-    images: ['car1.jpg'],
-    userId: 1,
-  },
-  {
-    name: '공룡 피규어 세트',
-    description: '티라노 포함 공룡 5종 세트',
-    price: 22000,
-    tags: ['장난감', '세트'],
-    images: ['dino1.jpg'],
-    userId: 1,
-  },
-  {
-    name: '주방놀이 키트',
-    description: '냄비와 식기 포함 역할놀이',
-    price: 25000,
-    tags: ['어린이', '역할놀이'],
-    images: ['kitchen1.jpg'],
-    userId: 1,
-  },
- 
-  {
-    name: '우주 탐사선',
-    description: 'LED가 들어오는 우주선 장난감',
-    price: 30000,
-    tags: ['장난감', '과학'],
-    images: ['space1.jpg'],
-    userId: 1,
-  },
-  {
-    name: '스케치 보드',
-    description: '지우개 포함 그림판',
-    price: 9000,
-    tags: ['미술', '교육'],
-    images: ['draw1.jpg'],
-    userId: 1,
-  },
-  {
-    name: '소프트 곰인형',
-    description: '촉감 좋은 봉제 인형',
-    price: 15000,
-    tags: ['인형'],
-    images: ['doll1.jpg'],
-    userId: 1,
-  },
-  {
-    name: '알파벳 퍼즐',
-    description: '영어 학습 퍼즐',
-    price: 13000,
-    tags: ['교육', '퍼즐'],
-    images: ['puzzle1.jpg'],
-    userId: 1,
-  },
-  {
-    name: '미니 농구대',
-    description: '실내 설치용 농구대',
-    price: 27000,
-    tags: ['야외', '스포츠'],
-    images: ['basket1.jpg'],
-    userId: 1,
-  },
- 
-  {
-    name: 'RC 레이싱카',
-    description: '리모컨 조종 자동차',
-    price: 35000,
-    tags: ['장난감', '전자'],
-    images: ['rc1.jpg'],
-    userId: 2,
-  },
-  {
-    name: '캠핑 놀이 세트',
-    description: '텐트와 모닥불 포함',
-    price: 28000,
-    tags: ['야외', '역할놀이'],
-    images: ['camp1.jpg'],
-    userId: 2,
-  },
-  {
-    name: '마법 지팡이',
-    description: '불빛과 소리 효과',
-    price: 8000,
-    tags: ['장난감', '판타지'],
-    images: ['wand1.jpg'],
-    userId: 2,
-  },
-  {
-    name: '의사 놀이 가방',
-    description: '청진기 포함 의료 놀이',
-    price: 24000,
-    tags: ['역할놀이'],
-    images: ['doctor1.jpg'],
-    userId: 2,
-  },
-  {
-    name: '목공 놀이 툴킷',
-    description: '안전한 공구 놀이',
-    price: 26000,
-    tags: ['교육', '세트'],
-    images: ['tool1.jpg'],
-    userId: 2,
-  },
- 
-  {
-    name: '미니 피아노',
-    description: '소리 나는 건반 장난감',
-    price: 19000,
-    tags: ['음악'],
-    images: ['piano1.jpg'],
-    userId: 2,
-  },
-  {
-    name: '동물 스티커북',
-    description: '붙였다 떼는 스티커북',
-    price: 6000,
-    tags: ['교육', '책'],
-    images: ['sticker1.jpg'],
-    userId: 2,
-  },
-  {
-    name: '비행기 글라이더',
-    description: '손으로 날리는 글라이더',
-    price: 5000,
-    tags: ['야외', '장난감'],
-    images: ['plane1.jpg'],
-    userId: 2,
-  },
-  {
-    name: '퍼즐 매트',
-    description: '바닥용 쿠션 퍼즐',
-    price: 32000,
-    tags: ['유아', '매트'],
-    images: ['mat1.jpg'],
-    userId: 2,
-  },
-  {
-    name: '드럼 놀이 세트',
-    description: '리듬감 키우는 드럼',
-    price: 21000,
-    tags: ['음악', '장난감'],
-    images: ['drum1.jpg'],
-    userId: 2,
-  },
-];
- 
-export const articleSample = [
-  {
-    title: '게시판 이용 수칙 안내',
-    content: '욕설 및 비방은 금지됩니다. 쾌적한 커뮤니티를 만들어가요.',
-    image: 'rule.jpg',
-    userId: 1,
-  },
-  {
-    title: '오늘 점심 메뉴 추천받아요',
-    content: '회사 근처 맛집 추천 부탁드립니다. 한식 위주로요!',
-    image: null,
-    userId: 1,
-  },
-  {
-    title: '중고거래 꿀팁 공유합니다',
-    content: '직거래 시 확인해야 할 체크리스트 정리해봤어요.',
-    image: 'tip.png',
-    userId: 1,
-  },
-  {
-    title: '주말에 아이랑 갈만한 곳',
-    content: '날씨 좋은데 야외 활동 하기 좋은 곳 있을까요?',
-    image: 'park.jpg',
-    userId: 1,
-  },
-  {
-    title: '요즘 유행하는 장난감 뭔가요?',
-    content: '조카 선물 사주려고 하는데 추천 좀 해주세요.',
-    image: null,
-    userId: 1,
-  },
-  {
-    title: '판다마켓 이용 후기',
-    content: '원하던 물건 저렴하게 잘 구했습니다. 감사합니다.',
-    image: 'review.jpg',
-    userId: 2,
-  },
-  {
-    title: '육아 고민 상담소',
-    content: '아이가 밥을 잘 안 먹어서 걱정이에요. 노하우 있으신가요?',
-    image: null,
-    userId: 2,
-  },
-  {
-    title: '동네 친구 구해요',
-    content: '같이 산책하거나 커피 마실 친구 구합니다.',
-    image: 'coffee.jpg',
-    userId: 2,
-  },
-  {
-    title: '책 추천 해주세요',
-    content: '요즘 읽기 좋은 베스트셀러 추천 부탁드립니다.',
-    image: 'book.jpg',
-    userId: 2,
-  },
-  {
-    title: '가입 인사 드립니다',
-    content: '반갑습니다. 활동 열심히 하겠습니다!',
-    image: null,
-    userId: 2,
-  },
-];
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov-report/test/helper/product.ts.html b/coverage/lcov-report/test/helper/product.ts.html deleted file mode 100644 index 56a5d1475..000000000 --- a/coverage/lcov-report/test/helper/product.ts.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - Code coverage report for test/helper/product.ts - - - - - - - - - -
-
-

All files / test/helper product.ts

-
- -
- 100% - Statements - 8/8 -
- - -
- 100% - Branches - 0/0 -
- - -
- 100% - Functions - 2/2 -
- - -
- 100% - Lines - 7/7 -
- - -
-

- Press n or j to go to the next uncovered block, b, p or k for the previous block. -

- -
-
-

-
1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -222x -  -2x -  -5x -  -5x -  -  -  -  -120x -  -  -  -  -  -5x -  -5x -  - 
import { prismaClient } from '@lib/prismaClient';
- 
-export async function createProductsWithUsers(userSample: any[], productSample: any[]) {
-  // 관계형 FK 유저 등록 진행
-  await prismaClient.user.createMany({ data: userSample });
- 
-  const users = await prismaClient.user.findMany({
-    orderBy: { id: 'asc' },
-  });
- 
-  // 상품 등록 데이터에 user 정보 추가
-  const products = productSample.map((product, index) => ({
-    ...product,
-    userId: users[index % users.length].id,
-  }));
- 
-  // 상품 등록
-  await prismaClient.product.createMany({ data: products });
- 
-  return { users, products };
-}
- 
- -
-
- - - - - - - - \ No newline at end of file diff --git a/coverage/lcov.info b/coverage/lcov.info deleted file mode 100644 index f66286a0d..000000000 --- a/coverage/lcov.info +++ /dev/null @@ -1,1790 +0,0 @@ -TN: -SF:src/app.ts -FNF:0 -FNH:0 -DA:1,5 -DA:2,5 -DA:3,5 -DA:4,5 -DA:5,5 -DA:6,5 -DA:7,5 -DA:8,5 -DA:9,5 -DA:10,5 -DA:11,5 -DA:12,5 -DA:13,5 -DA:15,5 -DA:17,5 -DA:18,5 -DA:19,5 -DA:20,5 -DA:22,5 -DA:23,5 -DA:24,5 -DA:25,5 -DA:26,5 -DA:27,5 -DA:28,5 -DA:30,5 -DA:31,5 -DA:33,5 -LF:28 -LH:28 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/controllers/article.controller.ts -FN:14,createArticle -FN:23,getArticle -FN:29,updateArticle -FN:39,deleteArticle -FN:45,getArticleList -FN:51,createComment -FN:62,getCommentList -FN:72,createLike -FN:78,deleteLike -FNF:9 -FNH:5 -FNDA:14,createArticle -FNDA:4,getArticle -FNDA:5,updateArticle -FNDA:3,deleteArticle -FNDA:8,getArticleList -FNDA:0,createComment -FNDA:0,getCommentList -FNDA:0,createLike -FNDA:0,deleteLike -DA:2,5 -DA:3,5 -DA:4,5 -DA:9,5 -DA:10,5 -DA:11,5 -DA:12,5 -DA:14,5 -DA:15,14 -DA:16,12 -DA:20,12 -DA:23,5 -DA:24,4 -DA:25,4 -DA:26,2 -DA:29,5 -DA:30,5 -DA:31,5 -DA:32,5 -DA:36,3 -DA:39,5 -DA:40,3 -DA:41,3 -DA:42,1 -DA:45,5 -DA:46,8 -DA:47,8 -DA:48,8 -DA:51,5 -DA:52,0 -DA:53,0 -DA:54,0 -DA:59,0 -DA:62,5 -DA:63,0 -DA:64,0 -DA:65,0 -DA:69,0 -DA:72,5 -DA:73,0 -DA:74,0 -DA:75,0 -DA:78,5 -DA:79,0 -DA:80,0 -DA:81,0 -LF:46 -LH:32 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/controllers/auth.controller.ts -FN:8,register -FN:14,login -FN:21,logout -FN:26,refreshToken -FN:34,setTokenCookies -FN:48,clearTokenCookies -FNF:6 -FNH:5 -FNDA:90,register -FNDA:76,login -FNDA:1,logout -FNDA:0,refreshToken -FNDA:71,setTokenCookies -FNDA:1,clearTokenCookies -DA:2,5 -DA:3,5 -DA:4,5 -DA:5,5 -DA:6,5 -DA:8,5 -DA:9,90 -DA:10,86 -DA:11,85 -DA:14,5 -DA:15,76 -DA:16,73 -DA:17,71 -DA:18,71 -DA:21,5 -DA:22,1 -DA:23,1 -DA:26,5 -DA:27,0 -DA:29,0 -DA:30,0 -DA:31,0 -DA:35,71 -DA:40,71 -DA:49,1 -DA:50,1 -LF:26 -LH:22 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/controllers/comment.controller.ts -FN:7,updateComment -FN:14,deleteComment -FNF:2 -FNH:0 -FNDA:0,updateComment -FNDA:0,deleteComment -DA:2,5 -DA:3,5 -DA:4,5 -DA:5,5 -DA:7,5 -DA:8,0 -DA:9,0 -DA:10,0 -DA:11,0 -DA:14,5 -DA:15,0 -DA:16,0 -DA:17,0 -LF:13 -LH:6 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/controllers/error.controller.ts -FN:8,defaultNotFoundHandler -FN:16,globalErrorHandler -FNF:2 -FNH:1 -FNDA:0,defaultNotFoundHandler -FNDA:27,globalErrorHandler -DA:2,5 -DA:3,5 -DA:4,5 -DA:5,5 -DA:6,5 -DA:8,5 -DA:13,0 -DA:16,5 -DA:23,27 -DA:24,15 -DA:25,15 -DA:29,12 -DA:30,0 -DA:31,0 -DA:35,12 -DA:36,0 -DA:37,0 -DA:38,0 -DA:42,12 -DA:43,8 -DA:44,8 -DA:47,4 -DA:48,0 -DA:49,0 -DA:52,4 -DA:53,4 -DA:54,4 -DA:57,0 -DA:58,0 -LF:29 -LH:19 -BRDA:23,0,0,15 -BRDA:23,0,1,12 -BRDA:23,1,0,27 -BRDA:23,1,1,15 -BRDA:29,2,0,0 -BRDA:29,2,1,12 -BRDA:29,3,0,12 -BRDA:29,3,1,0 -BRDA:35,4,0,0 -BRDA:35,4,1,12 -BRDA:42,5,0,8 -BRDA:42,5,1,4 -BRDA:47,6,0,0 -BRDA:47,6,1,4 -BRDA:52,7,0,4 -BRDA:52,7,1,0 -BRF:16 -BRH:11 -end_of_record -TN: -SF:src/controllers/image.controller.ts -FN:13,(anonymous_8) -FN:16,(anonymous_9) -FN:27,(anonymous_10) -FN:37,uploadImage -FNF:4 -FNH:0 -FNDA:0,(anonymous_8) -FNDA:0,(anonymous_9) -FNDA:0,(anonymous_10) -FNDA:0,uploadImage -DA:2,5 -DA:3,5 -DA:4,5 -DA:5,5 -DA:6,5 -DA:8,5 -DA:9,5 -DA:11,5 -DA:14,0 -DA:17,0 -DA:18,0 -DA:19,0 -DA:28,0 -DA:29,0 -DA:30,0 -DA:33,0 -DA:37,5 -DA:38,0 -DA:39,0 -DA:40,0 -DA:42,0 -DA:43,0 -DA:45,0 -DA:46,0 -DA:47,0 -LF:25 -LH:9 -BRDA:28,0,0,0 -BRDA:28,0,1,0 -BRDA:39,1,0,0 -BRDA:39,1,1,0 -BRDA:42,2,0,0 -BRDA:42,2,1,0 -BRF:6 -BRH:0 -end_of_record -TN: -SF:src/controllers/notification.controller.ts -FN:6,getNotifications -FN:13,updateNotification -FNF:2 -FNH:0 -FNDA:0,getNotifications -FNDA:0,updateNotification -DA:2,5 -DA:3,5 -DA:4,5 -DA:6,5 -DA:7,0 -DA:8,0 -DA:10,0 -DA:13,5 -DA:14,0 -DA:15,0 -DA:16,0 -DA:18,0 -LF:12 -LH:5 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/controllers/product.controller.ts -FN:14,createProduct -FN:23,getProduct -FN:29,updateProduct -FN:39,deleteProduct -FN:45,getProductList -FN:53,createComment -FN:64,getCommentList -FN:71,createFavorite -FN:77,deleteFavorite -FNF:9 -FNH:5 -FNDA:17,createProduct -FNDA:4,getProduct -FNDA:7,updateProduct -FNDA:3,deleteProduct -FNDA:8,getProductList -FNDA:0,createComment -FNDA:0,getCommentList -FNDA:0,createFavorite -FNDA:0,deleteFavorite -DA:2,5 -DA:3,5 -DA:4,5 -DA:9,5 -DA:10,5 -DA:11,5 -DA:12,5 -DA:14,5 -DA:15,17 -DA:16,14 -DA:20,14 -DA:23,5 -DA:24,4 -DA:25,4 -DA:26,2 -DA:29,5 -DA:30,7 -DA:31,7 -DA:32,7 -DA:36,5 -DA:39,5 -DA:40,3 -DA:41,3 -DA:42,1 -DA:45,5 -DA:46,8 -DA:47,8 -DA:50,8 -DA:53,5 -DA:54,0 -DA:55,0 -DA:56,0 -DA:61,0 -DA:64,5 -DA:65,0 -DA:66,0 -DA:67,0 -DA:68,0 -DA:71,5 -DA:72,0 -DA:73,0 -DA:74,0 -DA:77,5 -DA:78,0 -DA:79,0 -DA:80,0 -LF:46 -LH:32 -BRDA:48,0,0,6 -BRDA:48,0,1,2 -BRDA:48,1,0,8 -BRDA:48,1,1,8 -BRF:4 -BRH:4 -end_of_record -TN: -SF:src/controllers/user.controller.ts -FN:13,getMe -FN:18,updateMe -FN:24,updateMyPassword -FN:30,getMyProductList -FN:45,getMyFavoriteList -FNF:5 -FNH:0 -FNDA:0,getMe -FNDA:0,updateMe -FNDA:0,updateMyPassword -FNDA:0,getMyProductList -FNDA:0,getMyFavoriteList -DA:2,5 -DA:3,5 -DA:9,5 -DA:10,5 -DA:11,5 -DA:13,5 -DA:14,0 -DA:15,0 -DA:18,5 -DA:19,0 -DA:20,0 -DA:21,0 -DA:24,5 -DA:25,0 -DA:26,0 -DA:27,0 -DA:30,5 -DA:31,0 -DA:32,0 -DA:39,0 -DA:45,5 -DA:46,0 -DA:47,0 -DA:54,0 -LF:24 -LH:10 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/dto/userResponse.dto.ts -FN:3,(anonymous_1) -FNF:1 -FNH:1 -FNDA:85,(anonymous_1) -DA:3,5 -DA:4,85 -DA:5,85 -DA:8,5 -LF:4 -LH:4 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/lib/constants.ts -FNF:0 -FNH:0 -DA:1,6 -DA:2,6 -DA:4,6 -DA:5,6 -DA:6,6 -DA:7,6 -DA:8,6 -DA:10,6 -DA:11,6 -DA:12,6 -DA:13,6 -LF:11 -LH:11 -BRDA:6,0,0,6 -BRDA:6,0,1,0 -BRDA:7,1,0,6 -BRDA:7,1,1,0 -BRDA:9,2,0,6 -BRDA:9,2,1,0 -BRDA:10,3,0,6 -BRDA:10,3,1,0 -BRDA:11,4,0,6 -BRDA:11,4,1,0 -BRF:10 -BRH:5 -end_of_record -TN: -SF:src/lib/prismaClient.ts -FNF:0 -FNH:0 -DA:1,8 -DA:3,8 -LF:2 -LH:2 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/lib/token.ts -FN:7,generateTokens -FN:17,verifyAccessToken -FN:25,verifyRefreshToken -FNF:3 -FNH:2 -FNDA:71,generateTokens -FNDA:57,verifyAccessToken -FNDA:0,verifyRefreshToken -DA:1,5 -DA:2,5 -DA:7,5 -DA:8,71 -DA:11,71 -DA:14,71 -DA:17,5 -DA:18,57 -DA:19,57 -DA:20,0 -DA:22,57 -DA:25,5 -DA:26,0 -DA:27,0 -DA:28,0 -DA:30,0 -LF:16 -LH:11 -BRDA:19,0,0,0 -BRDA:19,0,1,57 -BRDA:27,1,0,0 -BRDA:27,1,1,0 -BRF:4 -BRH:1 -end_of_record -TN: -SF:src/lib/websocket.ts -FN:9,setupWebSocket -FN:25,(anonymous_2) -FN:38,(anonymous_3) -FN:46,(anonymous_4) -FN:51,(anonymous_5) -FN:56,notifyToUser -FNF:6 -FNH:0 -FNDA:0,setupWebSocket -FNDA:0,(anonymous_2) -FNDA:0,(anonymous_3) -FNDA:0,(anonymous_4) -FNDA:0,(anonymous_5) -FNDA:0,notifyToUser -DA:1,6 -DA:3,6 -DA:4,6 -DA:9,6 -DA:10,0 -DA:12,0 -DA:23,0 -DA:25,0 -DA:26,0 -DA:27,0 -DA:29,0 -DA:30,0 -DA:31,0 -DA:32,0 -DA:34,0 -DA:38,0 -DA:39,0 -DA:42,0 -DA:43,0 -DA:46,0 -DA:47,0 -DA:51,0 -DA:52,0 -DA:56,6 -DA:57,0 -LF:25 -LH:5 -BRDA:27,0,0,0 -BRDA:27,0,1,0 -BRF:2 -BRH:0 -end_of_record -TN: -SF:src/lib/withAsync.ts -FN:3,withAsync -FN:4,(anonymous_8) -FNF:2 -FNH:2 -FNDA:160,withAsync -FNDA:240,(anonymous_8) -DA:3,5 -DA:4,160 -DA:5,240 -DA:6,240 -DA:8,27 -LF:5 -LH:5 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/lib/errors/BadRequestError.ts -FN:2,(anonymous_0) -FNF:1 -FNH:1 -FNDA:3,(anonymous_0) -DA:3,3 -DA:4,3 -DA:8,5 -LF:3 -LH:3 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/lib/errors/ForbiddenError.ts -FN:2,(anonymous_0) -FNF:1 -FNH:1 -FNDA:6,(anonymous_0) -DA:3,6 -DA:4,6 -DA:8,6 -LF:3 -LH:3 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/lib/errors/NotFoundError.ts -FN:2,(anonymous_0) -FNF:1 -FNH:1 -FNDA:11,(anonymous_0) -DA:3,11 -DA:4,11 -DA:8,6 -LF:3 -LH:3 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/lib/errors/UnauthorizedError.ts -FN:2,(anonymous_0) -FNF:1 -FNH:1 -FNDA:16,(anonymous_0) -DA:3,16 -DA:4,16 -DA:8,5 -LF:3 -LH:3 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/middleware/authenticate.ts -FN:5,authenticate -FN:6,(anonymous_17) -FN:6,(anonymous_18) -FNF:3 -FNH:3 -FNDA:125,authenticate -FNDA:73,(anonymous_17) -FNDA:73,(anonymous_18) -DA:2,5 -DA:3,5 -DA:6,125 -DA:7,73 -DA:8,73 -DA:9,73 -DA:10,57 -DA:12,16 -DA:13,16 -DA:14,16 -DA:16,0 -DA:17,0 -DA:19,57 -DA:23,5 -LF:14 -LH:12 -BRDA:5,0,0,105 -BRDA:12,1,0,16 -BRDA:12,1,1,0 -BRF:3 -BRH:2 -end_of_record -TN: -SF:src/repository/article.repo.ts -FN:5,createArticle -FN:12,getArticle -FN:17,getArticleWithLikes -FN:17,(anonymous_12) -FN:33,(anonymous_13) -FN:37,getArticleListWithLikes -FN:38,(anonymous_15) -FN:60,(anonymous_16) -FN:64,(anonymous_17) -FN:73,updateArticleWithLikes -FN:85,(anonymous_20) -FN:90,deleteArticle -FNF:12 -FNH:9 -FNDA:12,createArticle -FNDA:8,getArticle -FNDA:4,getArticleWithLikes -FNDA:4,(anonymous_12) -FNDA:0,(anonymous_13) -FNDA:8,getArticleListWithLikes -FNDA:8,(anonymous_15) -FNDA:34,(anonymous_16) -FNDA:0,(anonymous_17) -FNDA:3,updateArticleWithLikes -FNDA:0,(anonymous_20) -FNDA:1,deleteArticle -DA:2,5 -DA:5,5 -DA:6,12 -DA:9,12 -DA:12,5 -DA:13,8 -DA:14,8 -DA:17,5 -DA:18,4 -DA:25,4 -DA:26,2 -DA:29,2 -DA:33,0 -DA:37,5 -DA:38,8 -DA:45,8 -DA:49,8 -DA:50,8 -DA:60,34 -DA:64,0 -DA:67,8 -DA:73,5 -DA:74,3 -DA:81,3 -DA:85,0 -DA:90,5 -DA:91,1 -LF:27 -LH:24 -BRDA:17,0,0,4 -BRDA:25,1,0,2 -BRDA:25,1,1,2 -BRDA:33,2,0,0 -BRDA:33,2,1,2 -BRDA:39,3,0,8 -BRDA:46,4,0,2 -BRDA:46,4,1,6 -BRDA:53,5,0,0 -BRDA:53,5,1,8 -BRDA:64,6,0,0 -BRDA:64,6,1,34 -BRDA:84,7,0,3 -BRDA:84,7,1,0 -BRF:14 -BRH:10 -end_of_record -TN: -SF:src/repository/comment.repo.ts -FN:5,createComment -FN:14,getComment -FN:21,getCommentList -FN:22,(anonymous_12) -FN:41,updateComment -FN:48,deleteComment -FNF:6 -FNH:0 -FNDA:0,createComment -FNDA:0,getComment -FNDA:0,getCommentList -FNDA:0,(anonymous_12) -FNDA:0,updateComment -FNDA:0,deleteComment -DA:2,5 -DA:5,5 -DA:8,0 -DA:11,0 -DA:14,5 -DA:15,0 -DA:18,0 -DA:21,5 -DA:22,0 -DA:25,0 -DA:31,0 -DA:32,0 -DA:33,0 -DA:35,0 -DA:41,5 -DA:42,0 -DA:48,5 -DA:49,0 -LF:18 -LH:6 -BRDA:26,0,0,0 -BRDA:26,0,1,0 -BRDA:33,1,0,0 -BRDA:33,1,1,0 -BRF:4 -BRH:0 -end_of_record -TN: -SF:src/repository/favorite.repo.ts -FN:4,createFavorite -FN:11,getFavorite -FN:18,getFavoriteMember -FN:24,deleteFavorite -FNF:4 -FNH:1 -FNDA:0,createFavorite -FNDA:0,getFavorite -FNDA:5,getFavoriteMember -FNDA:0,deleteFavorite -DA:2,6 -DA:4,6 -DA:5,0 -DA:8,0 -DA:11,6 -DA:12,0 -DA:15,0 -DA:18,6 -DA:19,5 -DA:24,6 -DA:25,0 -LF:11 -LH:6 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/repository/like.repo.ts -FN:4,createLike -FN:11,getLike -FN:18,deleteLike -FNF:3 -FNH:0 -FNDA:0,createLike -FNDA:0,getLike -FNDA:0,deleteLike -DA:2,5 -DA:4,5 -DA:5,0 -DA:8,0 -DA:11,5 -DA:12,0 -DA:15,0 -DA:18,5 -DA:19,0 -LF:9 -LH:4 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/repository/notification.repo.ts -FN:5,createNotification -FN:25,getNotificationList -FN:37,getNotification -FN:41,patchNotification -FNF:4 -FNH:0 -FNDA:0,createNotification -FNDA:0,getNotificationList -FNDA:0,getNotification -FNDA:0,patchNotification -DA:1,6 -DA:5,6 -DA:12,0 -DA:14,0 -DA:25,6 -DA:26,0 -DA:34,0 -DA:37,6 -DA:38,0 -DA:41,6 -DA:42,0 -LF:11 -LH:5 -BRDA:19,0,0,0 -BRDA:19,0,1,0 -BRDA:19,1,0,0 -BRDA:19,1,1,0 -BRDA:20,2,0,0 -BRDA:20,2,1,0 -BRDA:20,3,0,0 -BRDA:20,3,1,0 -BRF:8 -BRH:0 -end_of_record -TN: -SF:src/repository/product.repo.ts -FN:5,createProduct -FN:11,getProduct -FN:18,getProductWithFavorites -FN:32,(anonymous_13) -FN:38,getProductListWithFavorites -FN:39,(anonymous_15) -FN:66,(anonymous_16) -FN:72,(anonymous_17) -FN:82,getFavoriteProductListByOwnerId -FN:83,(anonymous_19) -FN:118,(anonymous_20) -FN:131,updateProductWithFavorites -FN:144,(anonymous_23) -FN:150,deleteProduct -FNF:14 -FNH:8 -FNDA:14,createProduct -FNDA:10,getProduct -FNDA:4,getProductWithFavorites -FNDA:0,(anonymous_13) -FNDA:8,getProductListWithFavorites -FNDA:8,(anonymous_15) -FNDA:38,(anonymous_16) -FNDA:0,(anonymous_17) -FNDA:0,getFavoriteProductListByOwnerId -FNDA:0,(anonymous_19) -FNDA:0,(anonymous_20) -FNDA:5,updateProductWithFavorites -FNDA:0,(anonymous_23) -FNDA:1,deleteProduct -DA:2,6 -DA:5,6 -DA:6,14 -DA:11,6 -DA:12,10 -DA:15,10 -DA:18,6 -DA:19,4 -DA:23,4 -DA:24,2 -DA:27,2 -DA:32,0 -DA:35,2 -DA:38,6 -DA:39,8 -DA:46,8 -DA:52,8 -DA:56,8 -DA:66,38 -DA:72,0 -DA:76,8 -DA:82,6 -DA:83,0 -DA:86,0 -DA:91,0 -DA:101,0 -DA:118,0 -DA:125,0 -DA:131,6 -DA:132,5 -DA:139,5 -DA:144,0 -DA:147,5 -DA:150,6 -DA:151,1 -LF:35 -LH:26 -BRDA:23,0,0,2 -BRDA:23,0,1,2 -BRDA:31,1,0,0 -BRDA:31,1,1,2 -BRDA:40,2,0,0 -BRDA:46,3,0,2 -BRDA:46,3,1,6 -BRDA:59,4,0,0 -BRDA:59,4,1,8 -BRDA:71,5,0,10 -BRDA:71,5,1,28 -BRDA:86,6,0,0 -BRDA:86,6,1,0 -BRDA:104,7,0,0 -BRDA:104,7,1,0 -BRDA:143,8,0,5 -BRDA:143,8,1,0 -BRF:17 -BRH:9 -end_of_record -TN: -SF:src/repository/user.repo.ts -FN:4,createUser -FN:13,getUser -FN:20,getUserByEmail -FN:27,updateUser -FN:35,deleteUser -FNF:5 -FNH:3 -FNDA:85,createUser -FNDA:57,getUser -FNDA:159,getUserByEmail -FNDA:0,updateUser -FNDA:0,deleteUser -DA:2,5 -DA:4,5 -DA:7,85 -DA:10,85 -DA:13,5 -DA:14,57 -DA:17,57 -DA:20,5 -DA:21,159 -DA:24,159 -DA:27,5 -DA:28,0 -DA:32,0 -DA:35,5 -DA:36,0 -LF:15 -LH:12 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/routers/article.router.ts -FNF:0 -FNH:0 -DA:1,5 -DA:2,5 -DA:3,5 -DA:14,5 -DA:16,5 -DA:18,5 -DA:19,5 -DA:24,5 -DA:29,5 -DA:30,5 -DA:31,5 -DA:32,5 -DA:33,5 -DA:34,5 -DA:36,5 -LF:15 -LH:15 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/routers/auth.router.ts -FNF:0 -FNH:0 -DA:1,5 -DA:2,5 -DA:8,5 -DA:10,5 -DA:12,5 -DA:13,5 -DA:14,5 -DA:15,5 -DA:17,5 -LF:9 -LH:9 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/routers/comment.router.ts -FNF:0 -FNH:0 -DA:1,5 -DA:2,5 -DA:3,5 -DA:4,5 -DA:6,5 -DA:8,5 -DA:9,5 -DA:11,5 -LF:8 -LH:8 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/routers/image.router.ts -FNF:0 -FNH:0 -DA:1,5 -DA:2,5 -DA:3,5 -DA:5,5 -DA:7,5 -DA:9,5 -LF:6 -LH:6 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/routers/notification.router.ts -FNF:0 -FNH:0 -DA:1,5 -DA:2,5 -DA:3,5 -DA:4,5 -DA:6,5 -DA:8,5 -DA:10,5 -DA:12,5 -LF:8 -LH:8 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/routers/product.router.ts -FNF:0 -FNH:0 -DA:1,5 -DA:2,5 -DA:3,5 -DA:14,5 -DA:16,5 -DA:18,5 -DA:19,5 -DA:24,5 -DA:25,5 -DA:26,5 -DA:31,5 -DA:32,5 -DA:33,5 -DA:38,5 -DA:44,5 -LF:15 -LH:15 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/routers/user.router.ts -FNF:0 -FNH:0 -DA:1,5 -DA:2,5 -DA:3,5 -DA:10,5 -DA:12,5 -DA:14,5 -DA:15,5 -DA:16,5 -DA:17,5 -DA:18,5 -DA:20,5 -LF:11 -LH:11 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/service/article.service.ts -FN:10,createArticle -FN:19,getArticle -FN:27,getArticleList -FN:34,updateArticle -FN:48,deleteArticle -FNF:5 -FNH:5 -FNDA:12,createArticle -FNDA:4,getArticle -FNDA:8,getArticleList -FNDA:5,updateArticle -FNDA:3,deleteArticle -DA:1,5 -DA:3,5 -DA:4,5 -DA:10,5 -DA:11,12 -DA:12,12 -DA:19,5 -DA:20,4 -DA:21,4 -DA:22,2 -DA:24,2 -DA:27,5 -DA:30,8 -DA:31,8 -DA:34,5 -DA:35,5 -DA:36,5 -DA:37,1 -DA:40,4 -DA:41,1 -DA:44,3 -DA:45,3 -DA:48,5 -DA:49,3 -DA:50,3 -DA:51,1 -DA:54,2 -DA:55,1 -DA:58,1 -LF:29 -LH:29 -BRDA:21,0,0,2 -BRDA:21,0,1,2 -BRDA:36,1,0,1 -BRDA:36,1,1,4 -BRDA:40,2,0,1 -BRDA:40,2,1,3 -BRDA:50,3,0,1 -BRDA:50,3,1,2 -BRDA:54,4,0,1 -BRDA:54,4,1,1 -BRF:10 -BRH:10 -end_of_record -TN: -SF:src/service/auth.service.ts -FN:12,verifyPassword -FN:16,hashPassword -FN:21,register -FN:39,login -FN:57,refreshToken -FN:76,updateMyPassword -FN:91,authenticate -FNF:7 -FNH:5 -FNDA:72,verifyPassword -FNDA:85,hashPassword -FNDA:86,register -FNDA:73,login -FNDA:0,refreshToken -FNDA:0,updateMyPassword -FNDA:73,authenticate -DA:1,5 -DA:2,5 -DA:3,5 -DA:4,5 -DA:5,5 -DA:6,5 -DA:13,72 -DA:17,85 -DA:18,85 -DA:21,5 -DA:22,86 -DA:23,86 -DA:24,1 -DA:27,85 -DA:29,85 -DA:36,85 -DA:39,5 -DA:40,73 -DA:41,73 -DA:42,1 -DA:45,72 -DA:46,72 -DA:47,1 -DA:50,71 -DA:51,71 -DA:57,5 -DA:58,0 -DA:59,0 -DA:62,0 -DA:64,0 -DA:65,0 -DA:66,0 -DA:69,0 -DA:70,0 -DA:76,5 -DA:77,0 -DA:78,0 -DA:79,0 -DA:82,0 -DA:83,0 -DA:84,0 -DA:87,0 -DA:88,0 -DA:91,5 -DA:92,73 -DA:93,16 -DA:96,57 -DA:97,57 -DA:98,57 -DA:99,0 -DA:101,57 -LF:51 -LH:34 -BRDA:23,0,0,1 -BRDA:23,0,1,85 -BRDA:41,1,0,1 -BRDA:41,1,1,72 -BRDA:46,2,0,1 -BRDA:46,2,1,71 -BRDA:58,3,0,0 -BRDA:58,3,1,0 -BRDA:65,4,0,0 -BRDA:65,4,1,0 -BRDA:78,5,0,0 -BRDA:78,5,1,0 -BRDA:83,6,0,0 -BRDA:83,6,1,0 -BRDA:92,7,0,16 -BRDA:92,7,1,57 -BRDA:98,8,0,0 -BRDA:98,8,1,57 -BRF:18 -BRH:9 -end_of_record -TN: -SF:src/service/comment.service.ts -FN:20,createComment -FN:26,(anonymous_19) -FN:26,(anonymous_20) -FN:36,(anonymous_21) -FN:36,(anonymous_22) -FN:92,getComment -FN:100,getCommentListByArticleId -FN:113,getCommentListByProductId -FN:126,updateComment -FN:139,deleteComment -FNF:10 -FNH:0 -FNDA:0,createComment -FNDA:0,(anonymous_19) -FNDA:0,(anonymous_20) -FNDA:0,(anonymous_21) -FNDA:0,(anonymous_22) -FNDA:0,getComment -FNDA:0,getCommentListByArticleId -FNDA:0,getCommentListByProductId -FNDA:0,updateComment -FNDA:0,deleteComment -DA:1,5 -DA:2,5 -DA:3,5 -DA:4,5 -DA:7,5 -DA:8,5 -DA:10,5 -DA:20,5 -DA:22,0 -DA:25,0 -DA:26,0 -DA:27,0 -DA:28,0 -DA:30,0 -DA:36,0 -DA:37,0 -DA:38,0 -DA:39,0 -DA:47,0 -DA:53,0 -DA:54,0 -DA:57,0 -DA:58,0 -DA:59,0 -DA:66,0 -DA:73,0 -DA:74,0 -DA:81,0 -DA:89,0 -DA:92,5 -DA:93,0 -DA:94,0 -DA:95,0 -DA:97,0 -DA:100,5 -DA:104,0 -DA:105,0 -DA:106,0 -DA:109,0 -DA:110,0 -DA:113,5 -DA:117,0 -DA:118,0 -DA:119,0 -DA:122,0 -DA:123,0 -DA:126,5 -DA:127,0 -DA:128,0 -DA:129,0 -DA:132,0 -DA:133,0 -DA:136,0 -DA:139,5 -DA:140,0 -DA:141,0 -DA:142,0 -DA:145,0 -DA:146,0 -DA:149,0 -LF:60 -LH:13 -BRDA:25,0,0,0 -BRDA:25,0,1,0 -BRDA:28,1,0,0 -BRDA:28,1,1,0 -BRDA:38,2,0,0 -BRDA:38,2,1,0 -BRDA:49,3,0,0 -BRDA:49,3,1,0 -BRDA:49,4,0,0 -BRDA:49,4,1,0 -BRDA:50,5,0,0 -BRDA:50,5,1,0 -BRDA:50,6,0,0 -BRDA:50,6,1,0 -BRDA:57,7,0,0 -BRDA:57,7,1,0 -BRDA:58,8,0,0 -BRDA:58,8,1,0 -BRDA:73,9,0,0 -BRDA:73,9,1,0 -BRDA:94,10,0,0 -BRDA:94,10,1,0 -BRDA:105,11,0,0 -BRDA:105,11,1,0 -BRDA:118,12,0,0 -BRDA:118,12,1,0 -BRDA:128,13,0,0 -BRDA:128,13,1,0 -BRDA:132,14,0,0 -BRDA:132,14,1,0 -BRDA:141,15,0,0 -BRDA:141,15,1,0 -BRDA:145,16,0,0 -BRDA:145,16,1,0 -BRF:34 -BRH:0 -end_of_record -TN: -SF:src/service/favorite.service.ts -FN:6,createFavorite -FN:20,deleteFavorite -FNF:2 -FNH:0 -FNDA:0,createFavorite -FNDA:0,deleteFavorite -DA:1,5 -DA:2,5 -DA:3,5 -DA:4,5 -DA:6,5 -DA:7,0 -DA:8,0 -DA:9,0 -DA:12,0 -DA:13,0 -DA:14,0 -DA:17,0 -DA:20,5 -DA:21,0 -DA:22,0 -DA:23,0 -DA:26,0 -DA:27,0 -DA:28,0 -DA:31,0 -LF:20 -LH:6 -BRDA:8,0,0,0 -BRDA:8,0,1,0 -BRDA:13,1,0,0 -BRDA:13,1,1,0 -BRDA:22,2,0,0 -BRDA:22,2,1,0 -BRDA:27,3,0,0 -BRDA:27,3,1,0 -BRF:8 -BRH:0 -end_of_record -TN: -SF:src/service/like.service.ts -FN:6,createLike -FN:20,deleteLike -FNF:2 -FNH:0 -FNDA:0,createLike -FNDA:0,deleteLike -DA:1,5 -DA:2,5 -DA:3,5 -DA:4,5 -DA:6,5 -DA:7,0 -DA:8,0 -DA:9,0 -DA:12,0 -DA:13,0 -DA:14,0 -DA:17,0 -DA:20,5 -DA:21,0 -DA:22,0 -DA:23,0 -DA:26,0 -DA:27,0 -DA:28,0 -DA:31,0 -LF:20 -LH:6 -BRDA:8,0,0,0 -BRDA:8,0,1,0 -BRDA:13,1,0,0 -BRDA:13,1,1,0 -BRDA:22,2,0,0 -BRDA:22,2,1,0 -BRDA:27,3,0,0 -BRDA:27,3,1,0 -BRF:8 -BRH:0 -end_of_record -TN: -SF:src/service/notification.service.ts -FN:4,getNotificationList -FN:10,updateNotificationInfo -FNF:2 -FNH:0 -FNDA:0,getNotificationList -FNDA:0,updateNotificationInfo -DA:1,5 -DA:2,5 -DA:4,5 -DA:5,0 -DA:7,0 -DA:10,5 -DA:11,0 -DA:12,0 -DA:14,0 -DA:15,0 -LF:10 -LH:4 -BRDA:12,0,0,0 -BRDA:12,0,1,0 -BRF:2 -BRH:0 -end_of_record -TN: -SF:src/service/product.service.ts -FN:16,createProduct -FN:25,getProduct -FN:33,getProductList -FN:34,(anonymous_22) -FN:41,updateProduct -FN:61,(anonymous_25) -FN:71,(anonymous_26) -FN:82,deleteProduct -FNF:8 -FNH:8 -FNDA:15,createProduct -FNDA:6,getProduct -FNDA:9,getProductList -FNDA:9,(anonymous_22) -FNDA:11,updateProduct -FNDA:2,(anonymous_25) -FNDA:2,(anonymous_26) -FNDA:6,deleteProduct -DA:1,6 -DA:2,6 -DA:3,6 -DA:4,6 -DA:5,6 -DA:8,6 -DA:16,6 -DA:17,15 -DA:18,15 -DA:25,6 -DA:26,6 -DA:27,6 -DA:28,3 -DA:30,3 -DA:33,6 -DA:34,9 -DA:37,9 -DA:38,9 -DA:41,6 -DA:42,11 -DA:43,11 -DA:44,2 -DA:46,9 -DA:47,2 -DA:49,7 -DA:51,7 -DA:52,7 -DA:54,7 -DA:55,7 -DA:57,7 -DA:58,2 -DA:60,2 -DA:62,2 -DA:71,2 -DA:72,2 -DA:79,7 -DA:82,6 -DA:83,6 -DA:84,6 -DA:85,2 -DA:87,4 -DA:88,2 -DA:90,2 -LF:43 -LH:43 -BRDA:27,0,0,3 -BRDA:27,0,1,3 -BRDA:35,1,0,1 -BRDA:43,2,0,2 -BRDA:43,2,1,9 -BRDA:46,3,0,2 -BRDA:46,3,1,7 -BRDA:57,4,0,2 -BRDA:57,4,1,5 -BRDA:57,5,0,7 -BRDA:57,5,1,2 -BRDA:58,6,0,1 -BRDA:58,6,1,1 -BRDA:84,7,0,2 -BRDA:84,7,1,4 -BRDA:87,8,0,2 -BRDA:87,8,1,2 -BRF:17 -BRH:17 -end_of_record -TN: -SF:src/service/user.service.ts -FN:10,getUser -FN:19,updateUser -FN:24,getMyProductList -FN:34,getMyFavoriteList -FNF:4 -FNH:0 -FNDA:0,getUser -FNDA:0,updateUser -FNDA:0,getMyProductList -FNDA:0,getMyFavoriteList -DA:3,5 -DA:4,5 -DA:5,5 -DA:10,5 -DA:11,0 -DA:12,0 -DA:13,0 -DA:16,0 -DA:19,5 -DA:20,0 -DA:21,0 -DA:24,5 -DA:28,0 -DA:31,0 -DA:34,5 -DA:38,0 -DA:39,0 -LF:17 -LH:7 -BRDA:12,0,0,0 -BRDA:12,0,1,0 -BRF:2 -BRH:0 -end_of_record -TN: -SF:src/structs/article.structs.ts -FN:7,(anonymous_0) -FNF:1 -FNH:1 -FNDA:17,(anonymous_0) -DA:1,5 -DA:2,5 -DA:4,5 -DA:6,5 -DA:7,17 -DA:12,5 -LF:6 -LH:6 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/structs/auth.structs.ts -FN:4,(anonymous_1) -FNF:1 -FNH:1 -FNDA:166,(anonymous_1) -DA:1,5 -DA:2,5 -DA:4,166 -DA:6,5 -DA:13,5 -LF:5 -LH:5 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/structs/comment.struct.ts -FNF:0 -FNH:0 -DA:1,5 -DA:2,5 -DA:4,5 -DA:10,5 -DA:12,5 -LF:5 -LH:5 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/structs/common.structs.ts -FN:4,(anonymous_0) -FNF:1 -FNH:1 -FNDA:30,(anonymous_0) -DA:1,5 -DA:4,30 -DA:6,5 -DA:10,5 -DA:17,5 -LF:5 -LH:5 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/structs/product.struct.ts -FN:5,(anonymous_0) -FNF:1 -FNH:1 -FNDA:20,(anonymous_0) -DA:1,5 -DA:2,5 -DA:4,5 -DA:5,20 -DA:12,5 -DA:14,5 -LF:6 -LH:6 -BRF:0 -BRH:0 -end_of_record -TN: -SF:src/structs/user.structs.ts -FNF:0 -FNH:0 -DA:1,5 -DA:2,5 -DA:4,5 -DA:12,5 -DA:17,5 -DA:19,5 -LF:6 -LH:6 -BRF:0 -BRH:0 -end_of_record -TN: -SF:test/helper/article.ts -FN:3,createArticlesWithUsers -FN:12,(anonymous_9) -FNF:2 -FNH:2 -FNDA:5,createArticlesWithUsers -FNDA:50,(anonymous_9) -DA:1,2 -DA:3,2 -DA:5,5 -DA:7,5 -DA:12,50 -DA:18,5 -DA:20,5 -LF:7 -LH:7 -BRF:0 -BRH:0 -end_of_record -TN: -SF:test/helper/mockdata.ts -FNF:0 -FNH:0 -DA:1,4 -DA:34,4 -DA:232,4 -LF:3 -LH:3 -BRF:0 -BRH:0 -end_of_record -TN: -SF:test/helper/product.ts -FN:3,createProductsWithUsers -FN:12,(anonymous_9) -FNF:2 -FNH:2 -FNDA:5,createProductsWithUsers -FNDA:120,(anonymous_9) -DA:1,2 -DA:3,2 -DA:5,5 -DA:7,5 -DA:12,120 -DA:18,5 -DA:20,5 -LF:7 -LH:7 -BRF:0 -BRH:0 -end_of_record diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 000000000..0845ad73b --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,46 @@ +name : panda-market + +services: + app: + image: panda-market-app + build: + dockerfile: ./Dockerfile + context: . + container_name: panda-market-app + environment: + - PORT=3000 + - NODE_ENV=development + - DATABASE_URL=postgresql://postgres:pandaNd6@db:5432/panda_market_docker + volumes: + - ./files:/app/public # 생성된 volume에 저장할 파일을 호스트의 ./files 폴더에도 저장 + networks: + - panda-market-net + ports: + - "3000:3000" + depends_on: + - db + db: + image: postgres:15-alpine + container_name: panda-market-db + environment: + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=pandaNd6 + - POSTGRES_DB=panda_market_docker + volumes: + - db_data:/var/lib/postgresql/data # 생성된 volume에 db 데이터 저장 + networks: + - panda-market-net + ports: + - "5432:5432" + +networks: + panda-market-net: + driver: bridge + +volumes: + db_data: + + + + + diff --git a/infra/EC2/reload.sh b/infra/EC2/reload.sh new file mode 100644 index 000000000..789aa2bda --- /dev/null +++ b/infra/EC2/reload.sh @@ -0,0 +1,5 @@ +# git repo 최신 파일 적용 & 패키지 설치 후 빌드 +git pull origin 김지선-sprint10 +npm i +npm run build +pm2 reload all \ No newline at end of file diff --git a/infra/EC2/shell.md b/infra/EC2/shell.md new file mode 100644 index 000000000..353dac7e3 --- /dev/null +++ b/infra/EC2/shell.md @@ -0,0 +1,11 @@ +### EC2 배포 명령어 정리 + +1. 초기 실행 명령어 : start.sh + +2. 배포 한 파일에 문제가 생긴 경우 + 1) pm2 상태 확인 + - pm2 list (현재 실행 중인 프로세스 확인) + - pm2 logs --lines 20 (에러 로그 확인) + - pm2 delete all (모든 프로세스 강제 종료) + 2) git repo 최신 파일 적용, 패키지 추가 및 빌드 , 최종 재실행 : reload.sh + 3) pm2 강제 종료 후 재실행 명령어 : pm2 start dist/src/server.js --name "panda-market" diff --git a/infra/EC2/start.sh b/infra/EC2/start.sh index 1f3ce79bb..b5f0c0d12 100644 --- a/infra/EC2/start.sh +++ b/infra/EC2/start.sh @@ -1,34 +1,3 @@ # 초기 실행 명령어 npm install -g pm2 pm2 start dist/src/server.js --name "panda-market" - -# ----------------------------------------------------- - -# 배포 한 파일에 문제가 생겨서 삭제 후 파일 수정하고 다시 run - -# 1. pm2 상태 확인 -pm2 list -pm2 logs --lines 20 -pm2 delete all - -#2. git 작업 pull & 패키지 추가 및 빌드 -git pull origin 김지선-sprint10 -npm i -npm run build - -# 3. pm2 재실행 -pm2 start dist/src/server.js --name "panda-market" - - -# ----------------------------------------------------- - -# 배포 내용 업데이트 후 다시 run - -# 1. 원격 레포지토리에서 최신 코드 가져오기 -git pull origin 김지선-sprint10 - -# 2. 최신 코드로 빌드 -npm run build - -# 3. 서버 재시작 (모든 프로세스 강제 종료 후 재실행) -pm2 restart all \ No newline at end of file diff --git a/infra/docker/docker_init.md b/infra/docker/docker_init.md new file mode 100644 index 000000000..7ebf7439b --- /dev/null +++ b/infra/docker/docker_init.md @@ -0,0 +1,24 @@ + +# 도커 컨테이너 생성 및 실행 +docker-compose up -d --build + +# 도커 컨테이너 내부 DB 테이블 생성 (Migration) +docker exec -it [앱 이름] npx prisma migrate deploy + +# 초기 데이터 채우기 (Seeding) +docker exec -it [앱 이름] npx prisma db seed + +# 도커 컨테이너 내부 진입 +docker exec -it [앱 이름] bash + +# 도커 컨테이너 내 특정 폴더 확인 (진입 x) +docker exec [앱 이름] ls -l /app/public + +# 도커 컨테이너 중지 +docker-compose down + +# 도커 컨테이너 삭제 +docker-compose down -v + +# 도커 컨테이너 재시작 +docker-compose restart diff --git a/infra/docker/sprint-mission-11_docker_localhost.png b/infra/docker/sprint-mission-11_docker_localhost.png new file mode 100644 index 000000000..0ce046fc1 Binary files /dev/null and b/infra/docker/sprint-mission-11_docker_localhost.png differ diff --git a/infra/docker/sprint-mission-11_docker_terminal.png b/infra/docker/sprint-mission-11_docker_terminal.png new file mode 100644 index 000000000..1a5c56f66 Binary files /dev/null and b/infra/docker/sprint-mission-11_docker_terminal.png differ diff --git a/infra/docker/sprint-mission-11_docker_volume.png b/infra/docker/sprint-mission-11_docker_volume.png new file mode 100644 index 000000000..04c16c513 Binary files /dev/null and b/infra/docker/sprint-mission-11_docker_volume.png differ diff --git a/package.json b/package.json index bdc44546f..b725795bb 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,9 @@ "dev": "nodemon --exec ts-node -r tsconfig-paths/register ./src/server.ts", "build": "tsc && tsc-alias", "test": "dotenv -e .env.test -- npm run prisma:migrate && dotenv -e .env.test -- jest --coverage --runInBand", - "prisma:migrate": "prisma migrate dev" + "prisma:migrate": "prisma migrate dev", + "prisma:deploy": "npx prisma migrate deploy && npx prisma generate", + "typecheck": "tsc --noEmit" }, "dependencies": { "@aws-sdk/client-s3": "^3.980.0", diff --git a/sprint-mission-readme/README-sm10.md b/sprint-mission-readme/README-sm10.md new file mode 100644 index 000000000..167fa4874 --- /dev/null +++ b/sprint-mission-readme/README-sm10.md @@ -0,0 +1,62 @@ +## 요구사항 + +### [ 목표 ] + +- 판다마켓 서비스를 AWS로 배포하기 +- AWS S3 적용 +- AWS RDS 적용 +- AWS EC2에 Express 서버 배포하기 +- (심화) 프로세스 매니저 적용 +- (심화) 리버스 프록시 적용 + + +### [ 작업 내용 ] + +### 1. 기본 요구사항 + +- [x] 프로젝트에 프로덕션 배포를 위한 환경 변수 설정 + +1) AWS S3 적용 + - [x] AWS S3 버킷 생성 및 퍼블릭 액세스 허용 + - [x] 일반 사용자가 S3 업로드된 파일에 접근할 수 있도록 S3 버킷 정책 설정 + - [x] AWS EC2에서 AWS S3를 사용하기 위한 액세스 키를 AWS IAM에서 발급 + - [x] 프로덕션 환경에서는 파일 업로드에 AWS S3를 사용하도록 구현 수정 : /src/controllers/image.s3.controller.ts +2) AWS RDS 적용 + - [x] AWS RDS 프리티어에 해당하는 인스턴스 생성 + - [x] RDS 인스턴스에 대한 보안 그룹 설정 + - [x] 프로덕션 환경에서는 Prisma에 프로젝트 데이터베이스와 연결하도록 수정 +3) AWS EC2에 Express 서버 배포하기 + - [x] AWS EC2 프리티어에 해당하는 인스턴스 생성 + - [x] SSH를 사용해 EC2 인스턴스에 접속해 Express 서버 배포 + +### 2. 심화 요구사항 + +- [x] EC2 인스턴스에서 pm2 프로세스 매니저를 사용하여 애플리케이션을 실행 +- [x] EC2 인스턴스에서 nginx 리버스 프록시를 80번 포트로 설정 + + +## [제출 파일 목록] + +- [x] 접속 가능한 API 엔드포인트 주소 : http://13.125.62.54 +- [x] AWS S3 버킷의 정책 설정 : /infra/S3/policy.png +- [x] AWS RDS 인스턴스의 보안 그룹 설정 + 1. 인바운드 : /infra/RDS/secure-group-inbound.png + 2. 아웃바운드 : /infra/RDS/secure-group-outbound.png +- [x] AWS EC2 인스턴스의 보안 그룹 설정 + 1. 인바운드 : /infra/EC2/secure-group-inbound.png + 2. 아웃바운드 : /infra/EC2/secure-group-outbound.png + 3. 초기 / 최종 URL 비교 : /infra/EC2/secure-group-url.png +- [x] pm2 실행 명령어 : /infra/ec2/start.sh +- [ ] pm2 실행 설정 파일 : /infra/ec2/ecosystem.config.js -> 별도의 설정 없이 실행 +- [x] nginx 실행 설정 파일 : /infra/ec2/nginx.conf + +



+ +## 멘토에게 + +- 이번 미션은 전적으로 AI의 도움을 받아 진행하였으며, images.s3.controller.ts 파일은 Ai가 작성하고 검토만 진행하였습니다 (파일 라우터를 초급 프로젝트 때부터 공부하고 있지만, 여전히 전체 로직이 이해가지 않습니다 😭ㅎㅎ) +- 제출 요청 파일 외에도 S3 테스트를 진행한 결과를 함께 제출합니다(자랑용입니다. 작업 도중 문제가 생겨서 좀 헤멧지만 그래도 성공 했다는게 좀 뿌듯해서요😁) + 1. 터미널을 사용하여 이미지 업로드 : /infra/S3/img_test_terminal.png + 2. 터미널 명령어 : /infra/S3/imgUpload.s3.sh + 3. AWS S3 버킷에 업로드된 이미지 목록 : /infra/S3/img_test_s3.png +- 개인적인 일도 있고해서 미션 8,9에 대한 멘토님 코멘트를 신규 코드에 적용 할 시간이 없네요. 신경 써서 알려주셨는데 죄송합니다😢 diff --git a/src/repository/article.repo.ts b/src/repository/article.repo.ts index 6c949cfe8..6dd439cb6 100644 --- a/src/repository/article.repo.ts +++ b/src/repository/article.repo.ts @@ -36,15 +36,9 @@ export async function getArticleWithLikes(id: number, { userId }: { userId?: num export async function getArticleListWithLikes( { page, pageSize, orderBy, keyword }: PagePaginationParams, - { - userId, - }: { - userId?: number; - } = {} + { userId, }: { userId?: number; } = {} ) { - const where = { - title: keyword ? { contains: keyword } : undefined, - }; + const where = { title: keyword ? { contains: keyword } : undefined, }; const totalCount = await prismaClient.article.count({ where }); const articles = await prismaClient.article.findMany({ diff --git a/src/repository/comment.repo.ts b/src/repository/comment.repo.ts index 2f0bf28cc..e8c84ded6 100644 --- a/src/repository/comment.repo.ts +++ b/src/repository/comment.repo.ts @@ -28,6 +28,17 @@ export async function getCommentList( where, orderBy: { createdAt: 'desc' }, }); + + // 다음 페이지가 있는지 확인 + const hasNextPage = commentsWithCursor.length > limit; + + if (!hasNextPage) { + return { + list: commentsWithCursor, + nextCursor: null, + }; + } + const comments = commentsWithCursor.slice(0, limit); const cursorComment = commentsWithCursor[commentsWithCursor.length - 1]; const nextCursor = cursorComment ? cursorComment.id : null; diff --git a/src/repository/product.repo.ts b/src/repository/product.repo.ts index 03ed3153a..1e4f5a946 100644 --- a/src/repository/product.repo.ts +++ b/src/repository/product.repo.ts @@ -26,8 +26,8 @@ export async function getProductWithFavorites(id: number, userId?: number) { const mappedProduct = { ...product, - favorites: undefined, - favoriteCount: product.favorites.length, + favorites: undefined, // 필요하지 않는 favorites 리스트 제거 + favoriteCount: product.favorites.length, // 필요한 favorite count 계산 isFavorited: userId ? product.favorites.some((favorite) => favorite.userId === userId) : undefined, @@ -37,16 +37,10 @@ export async function getProductWithFavorites(id: number, userId?: number) { export async function getProductListWithFavorites( { page, pageSize, orderBy, keyword }: PagePaginationParams, - { - userId, - }: { - userId?: number; - } = {} + { userId, }: { userId?: number; } = {} ) { const where = keyword - ? { - OR: [{ name: { contains: keyword } }, { description: { contains: keyword } }], - } + ? { OR: [{ name: { contains: keyword } }, { description: { contains: keyword } }], } : {}; const totalCount = await prismaClient.product.count({ @@ -84,9 +78,7 @@ export async function getFavoriteProductListByOwnerId( { page, pageSize, orderBy, keyword }: PagePaginationParams ) { const where = keyword - ? { - OR: [{ name: { contains: keyword } }, { description: { contains: keyword } }], - } + ? { OR: [{ name: { contains: keyword } }, { description: { contains: keyword } }], } : {}; const totalCount = await prismaClient.product.count({ where: { diff --git a/src/service/product.service.ts b/src/service/product.service.ts index 81cf3e397..8b70492d3 100644 --- a/src/service/product.service.ts +++ b/src/service/product.service.ts @@ -49,7 +49,6 @@ export async function updateProduct(id: number, data: UpdateProductData): Promis const updatedProduct = await productsRepository.updateProductWithFavorites(id, data); const productId = existingProduct.id; - const likeProductMember = await favoriteRepository.getFavoriteMember(productId); const originName = existingProduct.name; const cutName = originName.substring(0, 10); @@ -58,6 +57,8 @@ export async function updateProduct(id: number, data: UpdateProductData): Promis if (isPriceChanged) { const priceUpdate = data.price! > existingProduct.price ? '상승하였습니다' : '하락하였습니다'; + + const likeProductMember = await favoriteRepository.getFavoriteMember(productId); await Promise.all( likeProductMember.map((user) => diff --git a/test/authArticle.test.ts b/test/authArticle.test.ts index 5d0a8d028..89084d8dd 100644 --- a/test/authArticle.test.ts +++ b/test/authArticle.test.ts @@ -107,7 +107,7 @@ describe('인증이 필요한 게시글 API 통합 테스트', () => { }); test('게시글이 있는 경우, 전체 목록 조회', async () => { - await createArticlesWithUsers(userSample, articleSample); + await createArticlesWithUsers(); const getResponse = await agent1.get('/articles'); diff --git a/test/authProduct.test.ts b/test/authProduct.test.ts index ee5791efe..84ce79900 100644 --- a/test/authProduct.test.ts +++ b/test/authProduct.test.ts @@ -127,7 +127,7 @@ describe('인증이 필요한 상품 API 통합 테스트', () => { }); test('상품이 있는 경우, 전체 목록 조회', async () => { - await createProductsWithUsers(userSample, productSample); + await createProductsWithUsers(); const getResponse = await agent1.get('/products'); diff --git a/test/helper/article.ts b/test/helper/article.ts index cc3df8174..7f46c937a 100644 --- a/test/helper/article.ts +++ b/test/helper/article.ts @@ -1,6 +1,7 @@ import { prismaClient } from '@lib/prismaClient'; +import { userSample, articleSample } from './mockdata'; -export async function createArticlesWithUsers(userSample: any[], articleSample: any[]) { +export async function createArticlesWithUsers() { // 관계형 USER 먼저 등록 await prismaClient.user.createMany({ data: userSample }); diff --git a/test/helper/product.ts b/test/helper/product.ts index c342398d0..1514b9c11 100644 --- a/test/helper/product.ts +++ b/test/helper/product.ts @@ -1,6 +1,7 @@ import { prismaClient } from '@lib/prismaClient'; +import { userSample, productSample } from './mockdata'; -export async function createProductsWithUsers(userSample: any[], productSample: any[]) { +export async function createProductsWithUsers() { // 관계형 FK 유저 등록 진행 await prismaClient.user.createMany({ data: userSample }); diff --git a/test/publicArticle.test.ts b/test/publicArticle.test.ts index 9e6ea6c43..210f68d6b 100644 --- a/test/publicArticle.test.ts +++ b/test/publicArticle.test.ts @@ -37,7 +37,7 @@ describe('인증이 필요하지 않은 게시글 API 통합 테스트', () => { }); test('게시글이 있고, query가 없는 경우 모든 데이터 반환', async () => { - await createArticlesWithUsers(userSample, articleSample); + await createArticlesWithUsers(); const response = await request(app).get('/articles'); @@ -48,7 +48,7 @@ describe('인증이 필요하지 않은 게시글 API 통합 테스트', () => { }); test('query : Page / PageSize 테스트', async () => { - await createArticlesWithUsers(userSample, articleSample); + await createArticlesWithUsers(); const response = await request(app).get('/articles').query({ page: 2, pageSize: 3 }); @@ -58,7 +58,7 @@ describe('인증이 필요하지 않은 게시글 API 통합 테스트', () => { }); test('query : orderBy 테스트', async () => { - await createArticlesWithUsers(userSample, articleSample); + await createArticlesWithUsers(); const response = await request(app).get('/articles').query({ orderBy: 'oldest' }); @@ -67,7 +67,7 @@ describe('인증이 필요하지 않은 게시글 API 통합 테스트', () => { }); test('query : keyword 테스트', async () => { - await createArticlesWithUsers(userSample, articleSample); + await createArticlesWithUsers(); const response1 = await request(app).get('/articles').query({ keyword: '판다마켓' }); diff --git a/test/publicProduct.test.ts b/test/publicProduct.test.ts index ecf682894..dc0fac77b 100644 --- a/test/publicProduct.test.ts +++ b/test/publicProduct.test.ts @@ -40,7 +40,7 @@ describe('인증이 필요하지 않은 상품 API 통합 테스트', () => { test('상품이 있고, query가 없는 경우 모든 데이터 반환', async () => { // 상품 등록 로직 실행 - await createProductsWithUsers(userSample, productSample); + await createProductsWithUsers(); const response = await request(app).get('/products'); expect(response.status).toBe(200); @@ -51,7 +51,7 @@ describe('인증이 필요하지 않은 상품 API 통합 테스트', () => { test('query : Page / PageSize 테스트', async () => { // 상품 등록 로직 실행 - await createProductsWithUsers(userSample, productSample); + await createProductsWithUsers(); const response = await request(app).get('/products').query({ page: 2, pageSize: 5 }); expect(response.status).toBe(200); @@ -61,7 +61,7 @@ describe('인증이 필요하지 않은 상품 API 통합 테스트', () => { test('query : orderBy 테스트', async () => { // 상품 등록 로직 실행 - await createProductsWithUsers(userSample, productSample); + await createProductsWithUsers(); const response = await request(app).get('/products').query({ orderBy: 'oldest' }); expect(response.status).toBe(200); @@ -70,7 +70,7 @@ describe('인증이 필요하지 않은 상품 API 통합 테스트', () => { test('query : keyword 테스트', async () => { // 상품 등록 로직 실행 - await createProductsWithUsers(userSample, productSample); + await createProductsWithUsers(); // 키워드가 상품명에 있는 경우 const response1 = await request(app).get('/products').query({ keyword: '미니' });