diff --git a/.github/tt.yml b/.github/tt.yml deleted file mode 100644 index 495c9347..00000000 --- a/.github/tt.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: map_test -on: - push: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - - name: Generate deployment package - run: zip -r deploy.zip . - - - name: Get timestamp - uses: gerred/actions/current-time@master - id: current-time - - - name: Run string replace - uses: frabert/replace-string-action@master - id: format-time - with: - pattern: '[:\.]+' - string: '${{ steps.current-time.outputs.time }}' - replace-with: '-' - flags: 'g' - - - name: Beanstalk Deploy for app - uses: einaregilsson/beanstalk-deploy@v16 - with: - aws_access_key: ${{secrets.AWS_ACCESS_KEY_ID}} - aws_secret_key: ${{secrets.AWS_SECRET_ACCESS_KEY}} - application_name: makers.web - environment_name: Makersweb-env - region: ap-northeast-2 - version_label: 'makers-${{ steps.format-time.outputs.replaced }}' - deployment_package: deploy.zip - - - name: Deployed! - run: echo App deployed to ELB diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index bbc94ff8..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: CI/CD Docker - -on: - push: - branches: [main, develop] -env: - DOCKER_IMAGE: ghcr.io/sopt-makers/sopt-web-product-backend - VERSION: ${{ github.sha }} - -jobs: - build: - name: Build - runs-on: ubuntu-latest - steps: - - name: Check out source code - uses: actions/checkout@v2 - - name: Set up docker buildx - id: buildx - uses: docker/setup-buildx-action@v1 - - name: Cache docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VERSION }} # runner 설정에서 읽어들일거에요. - restore-keys: | - ${{ runner.os }}-buildx- - - name: Login to ghcr - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.CR_PAT }} - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - builder: ${{ steps.buildx.outputs.name }} - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ env.DOCKER_IMAGE }}:${{ env.VERSION }} - - deploy: - needs: build - name: Deploy - runs-on: [self-hosted, label-development] - steps: - - name: Login to ghcr - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.CR_PAT }} - - name: Docker run - run: | - docker ps -q --filter "name=web_docker" | grep -q . && docker stop web_docker && docker rm -fv web_docker - docker run -d -p 8080:8080 --name cicd --restart always ${{ env.DOCKER_IMAGE }}:${{ env.VERSION }} diff --git a/.gitignore b/.gitignore index 600d2d33..b8f22461 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.vscode \ No newline at end of file +.vscode +/.idea/ diff --git a/main/.gitignore b/main/.gitignore index 166946ba..9f8add33 100644 --- a/main/.gitignore +++ b/main/.gitignore @@ -19,6 +19,7 @@ bin/ ### IntelliJ IDEA ### .idea +.idea/ *.iws *.iml *.ipr diff --git a/main/build.gradle b/main/build.gradle index c3d7edae..eaf8cb66 100644 --- a/main/build.gradle +++ b/main/build.gradle @@ -2,6 +2,7 @@ plugins { id 'java' id 'org.springframework.boot' version '3.1.5' id 'io.spring.dependency-management' version '1.1.3' + id 'jacoco' } group = 'org.sopt.makers.crew' @@ -24,7 +25,6 @@ repositories { dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' // https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-ui - implementation 'io.hypersistence:hypersistence-utils-hibernate-62:3.6.0' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.springframework.boot:spring-boot-starter-webflux:3.1.5' implementation 'org.springframework.boot:spring-boot-starter-actuator' @@ -36,16 +36,47 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' implementation group: 'org.postgresql', name: 'postgresql', version: '42.6.0' + // jsonb 타입 핸들링 위함 + implementation 'io.hypersistence:hypersistence-utils-hibernate-62:3.6.0' + implementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.11.5' implementation group: 'io.jsonwebtoken', name: 'jjwt-impl', version: '0.11.5' implementation group: 'io.jsonwebtoken', name: 'jjwt-jackson', version: '0.11.5' implementation 'com.auth0:java-jwt:4.4.0' + // h2 + runtimeOnly 'com.h2database:h2' + + // mac m1 setting + implementation 'io.netty:netty-resolver-dns-native-macos:4.1.68.Final:osx-aarch_64' + implementation 'org.springframework.cloud:spring-cloud-starter-openfeign:4.0.3' + + // test container + testImplementation 'org.testcontainers:testcontainers:1.17.3' // TC 의존성 + testImplementation 'org.testcontainers:junit-jupiter:1.16.2' // TC 의존성 + testImplementation 'org.testcontainers:postgresql:1.17.3' // PostgreSQL 컨테이너 사용 + testImplementation 'org.testcontainers:jdbc' // DB와의 JDBC connection + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.14.0' + + } tasks.named('test') { useJUnitPlatform() + + finalizedBy jacocoTestCoverageVerification + + jacoco { + excludes += [ + "org/crew/main/MainApplication.class", + "**/response/*", + "**/config/*", + "**/dto/*", + "**/vo/*", + "**/exception/*", + ] + } } ext { @@ -58,4 +89,44 @@ dependencyManagement { mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" } +} + +jacocoTestReport { + reports { + xml.required.set(true) + csv.required.set(true) + html.required.set(true) + } + + afterEvaluate { + classDirectories.setFrom( + files(classDirectories.files.collect { + fileTree(dir: it, excludes: [ + "org/crew/main/MainApplication.class", + "**/response/*", + "**/config/*", + "org/crew/**/*Dto.*", + "**/dto/*", + "**/vo/*", + "**/exception/*", + ]) + }) + ) + } +} + +jacocoTestCoverageVerification { + violationRules { + rule { + // ... + + excludes = [ + '*.*Application', + '*.*Exception', + '*.Dto', + '*.response' + // ... + ] + } + } } \ No newline at end of file diff --git a/main/src/main/java/org/sopt/makers/crew/main/common/config/SecurityConfig.java b/main/src/main/java/org/sopt/makers/crew/main/common/config/SecurityConfig.java index f1b3942b..53c5a2e0 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/common/config/SecurityConfig.java +++ b/main/src/main/java/org/sopt/makers/crew/main/common/config/SecurityConfig.java @@ -1,6 +1,7 @@ package org.sopt.makers.crew.main.common.config; import java.util.Arrays; +import java.util.stream.Stream; import lombok.RequiredArgsConstructor; import org.sopt.makers.crew.main.common.config.jwt.JwtAuthenticationEntryPoint; import org.sopt.makers.crew.main.common.config.jwt.JwtAuthenticationFilter; @@ -14,6 +15,7 @@ import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; +import org.springframework.security.web.util.matcher.AntPathRequestMatcher; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.CorsConfigurationSource; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; @@ -39,7 +41,7 @@ public class SecurityConfig { private static final String[] AUTH_WHITELIST = { "/health", - "meeting/v2/org-user/**" + "/meeting/v2/org-user/**" }; @Bean @@ -51,8 +53,14 @@ SecurityFilterChain devSecurityFilterChain(HttpSecurity http) throws Exception { (sessionManagement) -> sessionManagement.sessionCreationPolicy( SessionCreationPolicy.STATELESS)) .authorizeHttpRequests( - authorize -> authorize.requestMatchers(AUTH_WHITELIST).permitAll() - .requestMatchers(SWAGGER_URL).permitAll() + authorize -> authorize.requestMatchers(Stream + .of(SWAGGER_URL) + .map(AntPathRequestMatcher::antMatcher) + .toArray(AntPathRequestMatcher[]::new)).permitAll() + .requestMatchers(Stream + .of(AUTH_WHITELIST) + .map(AntPathRequestMatcher::antMatcher) + .toArray(AntPathRequestMatcher[]::new)).permitAll() .anyRequest().authenticated()) .addFilterBefore( new JwtAuthenticationFilter(this.jwtTokenProvider, this.jwtAuthenticationEntryPoint), @@ -62,6 +70,32 @@ SecurityFilterChain devSecurityFilterChain(HttpSecurity http) throws Exception { return http.build(); } + @Bean + @Profile("test") + SecurityFilterChain testSecurityFilterChain(HttpSecurity http) throws Exception { + http.csrf((csrfConfig) -> csrfConfig.disable()) + .cors(Customizer.withDefaults()) + .sessionManagement( + (sessionManagement) -> sessionManagement.sessionCreationPolicy( + SessionCreationPolicy.STATELESS)) + .authorizeHttpRequests( + authorize -> authorize.requestMatchers(Stream + .of(SWAGGER_URL) + .map(AntPathRequestMatcher::antMatcher) + .toArray(AntPathRequestMatcher[]::new)).permitAll() + .requestMatchers(Stream + .of(AUTH_WHITELIST) + .map(AntPathRequestMatcher::antMatcher) + .toArray(AntPathRequestMatcher[]::new)).permitAll() + .anyRequest().authenticated()) + .addFilterBefore( + new JwtAuthenticationFilter(this.jwtTokenProvider, this.jwtAuthenticationEntryPoint), + UsernamePasswordAuthenticationFilter.class) + .exceptionHandling(exceptionHandling -> exceptionHandling + .authenticationEntryPoint(this.jwtAuthenticationEntryPoint)); + return http.build(); + } + @Bean @Profile("prod") SecurityFilterChain prodSecurityFilterChain(HttpSecurity http) throws Exception { @@ -71,9 +105,15 @@ SecurityFilterChain prodSecurityFilterChain(HttpSecurity http) throws Exception (sessionManagement) -> sessionManagement.sessionCreationPolicy( SessionCreationPolicy.STATELESS)) .authorizeHttpRequests( - authorize -> authorize.requestMatchers(AUTH_WHITELIST).permitAll() - .requestMatchers(SWAGGER_URL).permitAll() - .anyRequest().authenticated()) + authorize -> authorize.requestMatchers(Stream + .of(SWAGGER_URL) + .map(AntPathRequestMatcher::antMatcher) + .toArray(AntPathRequestMatcher[]::new)).permitAll() + .requestMatchers(Stream + .of(AUTH_WHITELIST) + .map(AntPathRequestMatcher::antMatcher) + .toArray(AntPathRequestMatcher[]::new)).permitAll() + .anyRequest().authenticated()) .addFilterBefore( new JwtAuthenticationFilter(this.jwtTokenProvider, this.jwtAuthenticationEntryPoint), UsernamePasswordAuthenticationFilter.class) diff --git a/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/Meeting.java b/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/Meeting.java index 6f9222f1..a2a7b5f6 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/Meeting.java +++ b/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/Meeting.java @@ -22,8 +22,10 @@ import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; +import org.hibernate.annotations.JdbcTypeCode; import org.hibernate.annotations.Parameter; import org.hibernate.annotations.Type; +import org.hibernate.type.SqlTypes; import org.sopt.makers.crew.main.entity.apply.Apply; import org.sopt.makers.crew.main.entity.meeting.converter.MeetingCategoryConverter; import org.sopt.makers.crew.main.entity.meeting.enums.EnMeetingStatus; @@ -80,8 +82,9 @@ public class Meeting { /** * 이미지 */ - @Column(name = "imageURL") + @Column(name = "imageURL",columnDefinition = "jsonb") @Type(JsonBinaryType.class) + //@JdbcTypeCode(SqlTypes.JSON) private List imageURL; /** @@ -184,7 +187,7 @@ public class Meeting { private List posts; @Builder - public Meeting(User user, Integer userId, String title, MeetingCategory category, + public Meeting(User user, Integer userId, List appliedInfo, String title, MeetingCategory category, List imageURL, LocalDateTime startDate, LocalDateTime endDate, Integer capacity, String desc, String processDesc, LocalDateTime mStartDate, LocalDateTime mEndDate, String leaderDesc, String targetDesc, String note, Boolean isMentorNeeded, @@ -192,6 +195,7 @@ public Meeting(User user, Integer userId, String title, MeetingCategory category Integer targetActiveGeneration, MeetingJoinablePart[] joinableParts) { this.user = user; this.userId = userId; + this.appliedInfo = appliedInfo; this.title = title; this.category = category; this.imageURL = imageURL; diff --git a/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/vo/ImageUrlVO.java b/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/vo/ImageUrlVO.java index ae5e3016..c4d3bcf3 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/vo/ImageUrlVO.java +++ b/main/src/main/java/org/sopt/makers/crew/main/entity/meeting/vo/ImageUrlVO.java @@ -6,7 +6,7 @@ @Getter @RequiredArgsConstructor public class ImageUrlVO { - - private Integer id; - private String url; -} \ No newline at end of file + + private final Integer id; + private final String url; +} diff --git a/main/src/main/java/org/sopt/makers/crew/main/entity/user/User.java b/main/src/main/java/org/sopt/makers/crew/main/entity/user/User.java index da6e2530..e2b19fec 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/entity/user/User.java +++ b/main/src/main/java/org/sopt/makers/crew/main/entity/user/User.java @@ -54,7 +54,7 @@ public class User { /** * 활동 목록 */ - @Column(name = "activities") + @Column(name = "activities",columnDefinition = "jsonb") @Type(JsonBinaryType.class) private List activities; @@ -125,4 +125,6 @@ public void addLike(Like like) { public void addReport(Report report) { this.reports.add(report); } + + public void setUserIdForTest(Integer userId){ this.id = userId;} } diff --git a/main/src/main/java/org/sopt/makers/crew/main/entity/user/vo/UserActivityVO.java b/main/src/main/java/org/sopt/makers/crew/main/entity/user/vo/UserActivityVO.java index 32149ea0..4a06ab06 100644 --- a/main/src/main/java/org/sopt/makers/crew/main/entity/user/vo/UserActivityVO.java +++ b/main/src/main/java/org/sopt/makers/crew/main/entity/user/vo/UserActivityVO.java @@ -9,7 +9,7 @@ @ToString public class UserActivityVO { - private String part; - private int generation; + private final String part; + private final int generation; } \ No newline at end of file diff --git a/main/src/main/resources/application-test.yml b/main/src/main/resources/application-test.yml new file mode 100644 index 00000000..8415f784 --- /dev/null +++ b/main/src/main/resources/application-test.yml @@ -0,0 +1,55 @@ + + +server: + port: 4000 + +spring: + config: + activate: + on-profile: test + import: application-secret.properties + datasource: + driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver + url: jdbc:tc:postgresql:///test-database + # username: root + # password: + jpa: + hibernate: + naming: + physical-strategy: org.sopt.makers.crew.main.common.config.CamelCaseNamingStrategy + ddl-auto: create + properties: + hibernate: + show_sql: true + format_sql: true + storage_engine: innodb + +jwt: + header: Authorization + secret: ${TEST_JWT_SECRET} + access-token: + expire-length: ${ACCESS_TOKEN_EXPIRED_TIME} # 10분 + +aws-property: + aws-region: ${AWS_REGION} + s3-bucket-name: ${AWS_S3_BUCKET_NAME} + access-key: ${AWS_ACCESS_KEY_ID} + secret-key: ${AWS_SECRET_ACCESS_KEY} + +springdoc: + packages-to-scan: org.sopt.makers.crew + default-consumes-media-type: application/json;charset=UTF-8 + default-produces-media-type: application/json;charset=UTF-8 + swagger-ui: + tags-sorter: alpha + operations-sorter: alpha + api-docs: + path: /api-docs/json + groups: + enabled: true + +push-notification: + web-url: ${DEV_WEB_PAGE_URL} + x-api-key: ${DEV_PUSH_API_KEY} + service: ${PUSH_NOTIFICATION_SERVICE} + push-server-url: ${DEV_PUSH_SERVER_URL} \ No newline at end of file diff --git a/main/src/test/java/org/sopt/makers/crew/main/MainApplicationTests.java b/main/src/test/java/org/sopt/makers/crew/main/MainApplicationTests.java index 8152f9cd..87edcd9c 100644 --- a/main/src/test/java/org/sopt/makers/crew/main/MainApplicationTests.java +++ b/main/src/test/java/org/sopt/makers/crew/main/MainApplicationTests.java @@ -1,12 +1,20 @@ package org.sopt.makers.crew.main; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.ActiveProfiles; +import org.testcontainers.junit.jupiter.Testcontainers; + @SpringBootTest +@Testcontainers +@ActiveProfiles("test") +@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE) class MainApplicationTests { - // @Test - // void contextLoads() { - // } + @Test + void contextLoads() { + } } diff --git a/main/src/test/java/org/sopt/makers/crew/main/entity/user/UserFixture.java b/main/src/test/java/org/sopt/makers/crew/main/entity/user/UserFixture.java new file mode 100644 index 00000000..1510fa78 --- /dev/null +++ b/main/src/test/java/org/sopt/makers/crew/main/entity/user/UserFixture.java @@ -0,0 +1,22 @@ +package org.sopt.makers.crew.main.entity.user; + +import java.util.ArrayList; +import java.util.List; +import org.sopt.makers.crew.main.entity.user.enums.UserPart; +import org.sopt.makers.crew.main.entity.user.vo.UserActivityVO; + +public class UserFixture { + + public static User createStaticUser() { + List activityVOS = new ArrayList<>(); + activityVOS.add(new UserActivityVO(UserPart.SERVER.getValue(), 33)); + activityVOS.add(new UserActivityVO(UserPart.SERVER.getValue(), 34)); + + return User.builder() + .name("송민규") + .orgId(1) + .activities(activityVOS) + .phone("010-9472-6796") + .build(); + } +} diff --git a/main/src/test/java/org/sopt/makers/crew/main/entity/user/UserRepositoryTest.java b/main/src/test/java/org/sopt/makers/crew/main/entity/user/UserRepositoryTest.java new file mode 100644 index 00000000..1bd8ea9b --- /dev/null +++ b/main/src/test/java/org/sopt/makers/crew/main/entity/user/UserRepositoryTest.java @@ -0,0 +1,31 @@ +package org.sopt.makers.crew.main.entity.user; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase; +import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; +import org.springframework.test.context.ActiveProfiles; + +@DataJpaTest +@ActiveProfiles("test") +@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE) +public class UserRepositoryTest { + + @Autowired + private UserRepository userRepository; + + @Test + void 유저저장_성공(){ + // given + User user = UserFixture.createStaticUser(); + + // when + User savedUser = userRepository.save(user); + + // then + Assertions.assertThat(savedUser) + .extracting("name", "phone") + .containsExactly(user.getName(), user.getPhone()); + } +} diff --git a/main/src/test/java/org/sopt/makers/crew/main/meeting/v2/service/MeetingV2ServiceTest.java b/main/src/test/java/org/sopt/makers/crew/main/meeting/v2/service/MeetingV2ServiceTest.java new file mode 100644 index 00000000..3747f920 --- /dev/null +++ b/main/src/test/java/org/sopt/makers/crew/main/meeting/v2/service/MeetingV2ServiceTest.java @@ -0,0 +1,136 @@ +package org.sopt.makers.crew.main.meeting.v2.service; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.doReturn; + +import java.time.LocalDateTime; +import java.time.Month; +import java.util.ArrayList; +import java.util.List; +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.InjectMocks; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.sopt.makers.crew.main.entity.apply.Apply; +import org.sopt.makers.crew.main.entity.apply.ApplyRepository; +import org.sopt.makers.crew.main.entity.apply.enums.EnApplyStatus; +import org.sopt.makers.crew.main.entity.meeting.Meeting; +import org.sopt.makers.crew.main.entity.meeting.MeetingRepository; +import org.sopt.makers.crew.main.entity.meeting.enums.MeetingCategory; +import org.sopt.makers.crew.main.entity.meeting.enums.MeetingJoinablePart; +import org.sopt.makers.crew.main.entity.meeting.vo.ImageUrlVO; +import org.sopt.makers.crew.main.entity.user.User; +import org.sopt.makers.crew.main.entity.user.UserFixture; +import org.sopt.makers.crew.main.entity.user.UserRepository; +import org.sopt.makers.crew.main.entity.user.enums.UserPart; +import org.sopt.makers.crew.main.entity.user.vo.UserActivityVO; +import org.sopt.makers.crew.main.meeting.v2.dto.query.MeetingV2GetAllMeetingByOrgUserQueryDto; +import org.sopt.makers.crew.main.meeting.v2.dto.response.MeetingV2GetAllMeetingByOrgUserDto; + +@ExtendWith(MockitoExtension.class) +public class MeetingV2ServiceTest { + @InjectMocks + private MeetingV2ServiceImpl meetingV2Service; + @Mock + private UserRepository userRepository; + @Mock + private ApplyRepository applyRepository; + @Mock + private MeetingRepository meetingRepository; + + + private List applies; + + private User ownerUser; + + private User applyUser; + + private Meeting meeting; + + @BeforeEach + void init() { + List activityVOS = new ArrayList<>(); + activityVOS.add(new UserActivityVO(UserPart.SERVER.getValue(), 33)); + + ownerUser = User.builder() + .name("송민규") + .orgId(1) + .activities(activityVOS) + .phone("010-9472-6796") + .build(); + ownerUser.setUserIdForTest(1); + + applyUser = User.builder() + .name("홍길동") + .orgId(2) + .activities(activityVOS) + .phone("010-1234-5678") + .build(); + applyUser.setUserIdForTest(2); + + ImageUrlVO imageUrlVO = new ImageUrlVO(1, "www.~~"); + + meeting = Meeting.builder() + .user(ownerUser) + .userId(ownerUser.getId()) + .title("사람 구해요") + .category(MeetingCategory.STUDY) + .imageURL(List.of(imageUrlVO)) + .startDate(LocalDateTime.of(2024, Month.MARCH, 17, 0, 0)) + .endDate(LocalDateTime.of(2024, Month.MARCH, 20, 23, 59)) + .capacity(10) + .desc("열정 많은 사람 구해요") + .processDesc("이렇게 할거에여") + .mStartDate(LocalDateTime.of(2024, Month.APRIL, 1, 0, 0)) + .mEndDate(LocalDateTime.of(2030, Month.APRIL, 20, 0, 0)) + .leaderDesc("저는 이런 사람이에요.") + .targetDesc("이런 사람이 왔으면 좋겠어요") + .note("유의사항은 이거에요") + .isMentorNeeded(true) + .canJoinOnlyActiveGeneration(true) + .createdGeneration(33) + .targetActiveGeneration(33) + .joinableParts(MeetingJoinablePart.values()) + .appliedInfo(new ArrayList<>()) + .build(); + + + Apply apply = Apply.builder() + .meeting(meeting) + .meetingId(1) + .user(applyUser) + .userId(2) + .content("제 지원동기는요") + .status(EnApplyStatus.APPROVE) + .build(); + + + meeting.addApply(apply); + + applies = new ArrayList<>(); + applies.add(apply); + } + + @Test + void 내모임조회_성공() { + // given + User user = UserFixture.createStaticUser(); + doReturn(user).when(userRepository).findByOrgIdOrThrow(any()); + doReturn(applies).when(applyRepository).findAllByUserIdAndStatus(any(), any()); + + MeetingV2GetAllMeetingByOrgUserQueryDto dto = new MeetingV2GetAllMeetingByOrgUserQueryDto( + applyUser.getOrgId(), 1, 12); + + // when + MeetingV2GetAllMeetingByOrgUserDto myMeetings = meetingV2Service.getAllMeetingByOrgUser(dto); + + // then + Assertions.assertThat(myMeetings.getMeetings().get(0)) + .extracting("isMeetingLeader", "title", "category", "mStartDate", "mEndDate", "isActiveMeeting") + .containsExactly(false, meeting.getTitle(), meeting.getCategory().getValue(), meeting.getMStartDate(), + meeting.getMEndDate(), true); + } +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..37781e6b --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "sopt-crew-backend", + "lockfileVersion": 2, + "requires": true, + "packages": {} +} diff --git a/server/package-lock.json b/server/package-lock.json index 6602267e..49a86bf3 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -1,12 +1,12 @@ { "name": "sopt_web_product_server", - "version": "1.1.2", + "version": "1.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sopt_web_product_server", - "version": "1.1.2", + "version": "1.1.0", "license": "UNLICENSED", "dependencies": { "@aws-sdk/client-s3": "^3.540.0", @@ -32,7 +32,7 @@ "dayjs": "^1.11.10", "json2csv": "^6.0.0-alpha.2", "multer": "^1.4.5-lts.1", - "multer-s3": "^3.0.1", + "multer-s3": "^2.10.0", "passport": "^0.7.0", "passport-jwt": "^4.0.1", "path": "^0.12.7", @@ -1042,84 +1042,6 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/is-array-buffer": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/is-array-buffer/-/is-array-buffer-3.188.0.tgz", - "integrity": "sha512-n69N4zJZCNd87Rf4NzufPzhactUeM877Y0Tp/F3KiHqGeTnVjYUa4Lv1vLBjqtfjYb2HWT3NKlYn5yzrhaEwiQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/lib-storage/-/lib-storage-3.188.0.tgz", - "integrity": "sha512-6odOJn3Gvb4ty8/tUg2PZ9W1XRfXN0buubFZZ8HOuovOVk1PnaxZMYXbo0MGComizFMOBefK5LxBNXHXl/81yQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/middleware-endpoint": "3.188.0", - "@aws-sdk/smithy-client": "3.188.0", - "buffer": "5.6.0", - "events": "3.3.0", - "stream-browserify": "3.0.0", - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - }, - "peerDependencies": { - "@aws-sdk/abort-controller": "^3.0.0", - "@aws-sdk/client-s3": "^3.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@aws-sdk/middleware-stack": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-stack/-/middleware-stack-3.188.0.tgz", - "integrity": "sha512-HuqP7hVnnx+aHfE6TutlMgjF0b2Ft08s9CDwyZ7ZhmYodQv/iPba7OGL4qz44oq7mdqlltN9sJkXczSAw0Zbaw==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@aws-sdk/smithy-client": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/smithy-client/-/smithy-client-3.188.0.tgz", - "integrity": "sha512-heJ1/++zOTU64CxbIRNm3hQgA2muln/HSUz4fDP8T0O8DwJwi9glvJcuoU0yatdjUELMKXMzgzsZSV/+F5EZ6g==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/middleware-stack": "3.188.0", - "@aws-sdk/types": "3.188.0", - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/@aws-sdk/types": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.188.0.tgz", - "integrity": "sha512-5z4ewjuRFPXYPCV3gaoHDCdjwrpBUs+12uZFBEbGE0S4UV+YrOPN5ehy+rpAGbhrsKYDxbAg9tHLkX4vRDFVgw==", - "license": "Apache-2.0", - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/lib-storage/node_modules/buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", - "license": "MIT", - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, "node_modules/@aws-sdk/middleware-bucket-endpoint": { "version": "3.535.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.535.0.tgz", @@ -1149,113 +1071,6 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/middleware-endpoint": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-endpoint/-/middleware-endpoint-3.188.0.tgz", - "integrity": "sha512-+jYv63h7O7g355QZhDLFHUGQvFNuaWvBKwdGNDbToxyMFlN9sKb7Y3SORjh95h5AmY6+SQgqHrg12MBC1YjGbg==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/middleware-serde": "3.188.0", - "@aws-sdk/protocol-http": "3.188.0", - "@aws-sdk/signature-v4": "3.188.0", - "@aws-sdk/types": "3.188.0", - "@aws-sdk/url-parser": "3.188.0", - "@aws-sdk/util-config-provider": "3.188.0", - "@aws-sdk/util-middleware": "3.188.0", - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/middleware-endpoint/node_modules/@aws-sdk/middleware-serde": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-serde/-/middleware-serde-3.188.0.tgz", - "integrity": "sha512-+0dw3ZPDEBv/DqSX9MmLQ2lPvxrO761pJXgDssYNVMY7C+PLB5pU6vKwXbmYAXk/FRwYyRjfKOf2WEvRwen0uw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.188.0", - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/middleware-endpoint/node_modules/@aws-sdk/protocol-http": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/protocol-http/-/protocol-http-3.188.0.tgz", - "integrity": "sha512-9f5hTzcsQnl64HFUZsD61pT4kmAMgh7nYdPEUQcVmVy0X3rGsbf7CItjxp/tIG/OiJrsM7Rb6hM0gwZO4PHSdQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.188.0", - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/middleware-endpoint/node_modules/@aws-sdk/querystring-parser": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/querystring-parser/-/querystring-parser-3.188.0.tgz", - "integrity": "sha512-QT6yLy0hVxOpCBENytwGj2d6V3NkltebCS+6aGPFzeduYuk+YxE1UkK41vhhhsCpJt5srW1zNDbaUzDRLMRGhQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.188.0", - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/middleware-endpoint/node_modules/@aws-sdk/signature-v4": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4/-/signature-v4-3.188.0.tgz", - "integrity": "sha512-YRyXFWfbblcOuMm/gcd1MGRFiwxrzaMfnZs8OAqtxLyA4b+fT59C7z2XTAHbjBcCrYEbDR9kF7yPkjn1uxDO8g==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/is-array-buffer": "3.188.0", - "@aws-sdk/types": "3.188.0", - "@aws-sdk/util-hex-encoding": "3.188.0", - "@aws-sdk/util-middleware": "3.188.0", - "@aws-sdk/util-uri-escape": "3.188.0", - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/middleware-endpoint/node_modules/@aws-sdk/types": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.188.0.tgz", - "integrity": "sha512-5z4ewjuRFPXYPCV3gaoHDCdjwrpBUs+12uZFBEbGE0S4UV+YrOPN5ehy+rpAGbhrsKYDxbAg9tHLkX4vRDFVgw==", - "license": "Apache-2.0", - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/@aws-sdk/middleware-endpoint/node_modules/@aws-sdk/url-parser": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/url-parser/-/url-parser-3.188.0.tgz", - "integrity": "sha512-KdLkmhuFOL7oPhkgVSIMBkaNXxwHqYsHmvZiGOFXT+q28u/Ho85i6ZqgY6FX+/6pfCiF12yDRTBNkqL6SnPwaQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/querystring-parser": "3.188.0", - "@aws-sdk/types": "3.188.0", - "tslib": "^2.3.1" - } - }, - "node_modules/@aws-sdk/middleware-endpoint/node_modules/@aws-sdk/util-middleware": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-middleware/-/util-middleware-3.188.0.tgz", - "integrity": "sha512-Rm2IFzr+b4M/N6aqYndqyCxnxlwtMMDtGU1uRxaOpVapskKpf8H0aF0U/FCN4t70x5HXql0l2Fv4d3CH9CRGig==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, "node_modules/@aws-sdk/middleware-expect-continue": { "version": "3.535.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.535.0.tgz", @@ -1621,18 +1436,6 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/util-config-provider": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-config-provider/-/util-config-provider-3.188.0.tgz", - "integrity": "sha512-LBA7tLbi7v4uvbOJhSnjJrxbcRifKK/1ZVK94JTV2MNSCCyNkFotyEI5UWDl10YKriTIUyf7o5cakpiDZ3O4xg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, "node_modules/@aws-sdk/util-endpoints": { "version": "3.540.0", "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.540.0.tgz", @@ -1659,18 +1462,6 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/util-hex-encoding": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-hex-encoding/-/util-hex-encoding-3.188.0.tgz", - "integrity": "sha512-QyWovTtjQ2RYxqVM+STPh65owSqzuXURnfoof778spyX4iQ4z46wOge1YV2ZtwS8w5LWd9eeVvDrLu5POPYOnA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, "node_modules/@aws-sdk/util-locate-window": { "version": "3.535.0", "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.535.0.tgz", @@ -1682,18 +1473,6 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/util-uri-escape": { - "version": "3.188.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-uri-escape/-/util-uri-escape-3.188.0.tgz", - "integrity": "sha512-4Y6AYZMT483Tiuq8dxz5WHIiPNdSFPGrl6tRTo2Oi2FcwypwmFhqgEGcqxeXDUJktvaCBxeA08DLr/AemVhPCg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.3.1" - }, - "engines": { - "node": ">= 12.0.0" - } - }, "node_modules/@aws-sdk/util-user-agent-browser": { "version": "3.535.0", "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.535.0.tgz", @@ -2370,7 +2149,7 @@ "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "0.3.9" @@ -2383,7 +2162,7 @@ "version": "0.3.9", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", @@ -2957,7 +2736,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=6.0.0" @@ -2986,7 +2765,7 @@ "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true + "devOptional": true }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", @@ -4318,28 +4097,28 @@ "version": "1.0.9", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/@tsconfig/node12": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/@tsconfig/node14": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/@tsconfig/node16": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/@types/babel__core": { @@ -5099,7 +4878,7 @@ "version": "8.11.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", - "dev": true, + "devOptional": true, "bin": { "acorn": "bin/acorn" }, @@ -5129,7 +4908,7 @@ "version": "8.2.0", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=0.4.0" @@ -5307,7 +5086,7 @@ "version": "4.1.3", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/argparse": { @@ -6384,7 +6163,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/cross-env": { @@ -6569,7 +6348,7 @@ "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, + "devOptional": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" @@ -7116,6 +6895,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.8.x" @@ -9541,7 +9321,7 @@ "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true, + "devOptional": true, "license": "ISC" }, "node_modules/makeerror": { @@ -9727,21 +9507,13 @@ } }, "node_modules/multer-s3": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/multer-s3/-/multer-s3-3.0.1.tgz", - "integrity": "sha512-BFwSO80a5EW4GJRBdUuSHblz2jhVSAze33ZbnGpcfEicoT0iRolx4kWR+AJV07THFRCQ78g+kelKFdjkCCaXeQ==", - "license": "MIT", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/multer-s3/-/multer-s3-2.10.0.tgz", + "integrity": "sha512-RZsiqG19C9gE82lB7v8duJ+TMIf70fWYHlIwuNcsanOH1ePBoPXZvboEQxEow9jUkk7WQsuyVA2TgriOuDrVrw==", "dependencies": { - "@aws-sdk/lib-storage": "^3.46.0", "file-type": "^3.3.0", "html-comment-regex": "^1.1.2", "run-parallel": "^1.1.6" - }, - "engines": { - "node": ">= 12.0.0" - }, - "peerDependencies": { - "@aws-sdk/client-s3": "^3.0.0" } }, "node_modules/mute-stream": { @@ -10619,6 +10391,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, "license": "MIT", "dependencies": { "inherits": "^2.0.3", @@ -11199,16 +10972,6 @@ "node": ">= 0.8" } }, - "node_modules/stream-browserify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", - "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", - "license": "MIT", - "dependencies": { - "inherits": "~2.0.4", - "readable-stream": "^3.5.0" - } - }, "node_modules/streamsearch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", @@ -11221,6 +10984,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" @@ -11774,7 +11538,7 @@ "version": "10.9.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, + "devOptional": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -12114,7 +11878,7 @@ "version": "5.4.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", - "dev": true, + "devOptional": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -12288,7 +12052,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/v8-to-istanbul": { @@ -12637,7 +12401,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, + "devOptional": true, "license": "MIT", "engines": { "node": ">=6" diff --git a/server/package.json b/server/package.json index c4af9da5..ecf5a1b4 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "sopt_web_product_server", - "version": "1.1.2", + "version": "1.1.0", "description": "", "author": "", "private": true, @@ -47,7 +47,7 @@ "dayjs": "^1.11.10", "json2csv": "^6.0.0-alpha.2", "multer": "^1.4.5-lts.1", - "multer-s3": "^3.0.1", + "multer-s3": "^2.10.0", "passport": "^0.7.0", "passport-jwt": "^4.0.1", "path": "^0.12.7",