diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c62b904f..79f73e92 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ on: - main - dev pull_request: - types: [opened, ready_for_review, converted_to_draft] + types: [opened, ready_for_review, converted_to_draft, synchronize] branches: - main - dev @@ -34,7 +34,7 @@ jobs: run_install: false - name: Install dependencies - run: pnpm install + run: pnpm install --no-frozen-lockfile - name: Run build run: pnpm run build diff --git a/.vscode/settings.json b/.vscode/settings.json index 7e02f536..8a5fd2a3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,8 @@ { + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" + }, "eslint.workingDirectories": [ { "mode": "auto" diff --git a/apps/admin/apis/auth/dashboardApi.ts b/apps/admin/apis/auth/dashboardApi.ts new file mode 100644 index 00000000..c3a12369 --- /dev/null +++ b/apps/admin/apis/auth/dashboardApi.ts @@ -0,0 +1,20 @@ +import { fetcher } from "@wow-class/utils"; +import { apiPath } from "constants/apiPath"; +import { tags } from "constants/tags"; +import type { DashboardApiResponseDto } from "types/dtos/auth"; + +export const dashboardApi = { + getDashboardInfo: async () => { + const response = await fetcher.get( + apiPath.dashboard, + { + next: { tags: [tags.dashboard] }, + } + ); + + const studyRole = response.data?.member.studyRole; + const manageRole = response.data?.member.manageRole; + + return { studyRole, manageRole }; + }, +}; diff --git a/apps/admin/app/error.tsx b/apps/admin/app/error.tsx new file mode 100644 index 00000000..1344c8e2 --- /dev/null +++ b/apps/admin/app/error.tsx @@ -0,0 +1,6 @@ +"use client"; +const ErrorPage = () => { + return
error
; +}; + +export default ErrorPage; diff --git a/apps/admin/app/layout.tsx b/apps/admin/app/layout.tsx index ce7647b0..f7ae5569 100644 --- a/apps/admin/app/layout.tsx +++ b/apps/admin/app/layout.tsx @@ -2,7 +2,6 @@ import "./global.css"; import "wowds-ui/styles.css"; import "@wow-class/ui/styles.css"; -import Navbar from "components/Navbar"; import type { Metadata } from "next"; import { JotaiProvider } from "../components/JotaiProvider"; @@ -20,10 +19,7 @@ const RootLayout = ({ return ( - - - {children} - + {children} ); diff --git a/apps/admin/app/not-found.tsx b/apps/admin/app/not-found.tsx new file mode 100644 index 00000000..3ef55fd2 --- /dev/null +++ b/apps/admin/app/not-found.tsx @@ -0,0 +1,5 @@ +const NotFound = () => { + return
요청하신 페이지를 찾을 수 없어요.
; +}; + +export default NotFound; diff --git a/apps/admin/app/studies/create-study/_components/CreateStudyButton.tsx b/apps/admin/app/studies/create-study/_components/CreateStudyButton.tsx new file mode 100644 index 00000000..f9c8e5a7 --- /dev/null +++ b/apps/admin/app/studies/create-study/_components/CreateStudyButton.tsx @@ -0,0 +1,55 @@ +import { css } from "@styled-system/css"; +import { Flex } from "@styled-system/jsx"; +import Link from "next/link"; +import isAdmin from "utils/isAdmin"; +import { Plus } from "wowds-icons"; + +const CreateStudyButton = async () => { + const adminStatus = await isAdmin(); + + if (!adminStatus) return null; + + return ( + + + + ); +}; + +export default CreateStudyButton; + +const createStudyButtonStyle = css({ + width: "100%", + display: "flex", + justifyContent: "center", + borderRadius: "md", + borderStyle: "dashed", + borderWidth: "1px", + borderColor: "outline", + padding: "32px", + _hover: { + backgroundColor: "backgroundAlternative", + borderWidth: "0px", + cursor: "pointer", + }, +}); + +const PlusIconStyle = css({ + display: "flex", + justifyContent: "center", + alignItems: "center", + width: "20px", + height: "20px", + borderRadius: "full", + backgroundColor: "primary", + color: "white", +}); diff --git a/apps/admin/app/studies/create-study/page.tsx b/apps/admin/app/studies/create-study/page.tsx new file mode 100644 index 00000000..deb90261 --- /dev/null +++ b/apps/admin/app/studies/create-study/page.tsx @@ -0,0 +1,5 @@ +const CreateStudyPage = () => { + return
스터디 생성
; +}; + +export default CreateStudyPage; diff --git a/apps/admin/app/studies/layout.tsx b/apps/admin/app/studies/layout.tsx new file mode 100644 index 00000000..e3a94902 --- /dev/null +++ b/apps/admin/app/studies/layout.tsx @@ -0,0 +1,20 @@ +import { Flex, styled } from "@styled-system/jsx"; +import Navbar from "components/Navbar"; +const StudiesLayout = ({ + children, +}: Readonly<{ + children: React.ReactNode; +}>) => { + return ( + <> + + + + {children} + + + + ); +}; + +export default StudiesLayout; diff --git a/apps/admin/app/studies/page.tsx b/apps/admin/app/studies/page.tsx index c63b2d64..d4bac7d9 100644 --- a/apps/admin/app/studies/page.tsx +++ b/apps/admin/app/studies/page.tsx @@ -1,5 +1,17 @@ -const Studies = () => { - return
Studies
; +import { css } from "@styled-system/css"; +import { Flex } from "@styled-system/jsx"; + +import CreateStudyButton from "./create-study/_components/CreateStudyButton"; + +const StudiesPage = () => { + return ( + <> + +

개설된 스터디

+
+ + + ); }; -export default Studies; +export default StudiesPage; diff --git a/apps/admin/components/Navbar.tsx b/apps/admin/components/Navbar.tsx index 601b9dd2..bf03aa46 100644 --- a/apps/admin/components/Navbar.tsx +++ b/apps/admin/components/Navbar.tsx @@ -56,6 +56,7 @@ export default Navbar; const navbarContainerStyle = css({ width: "250px", + minWidth: "250px", minHeight: "100vh", paddingTop: "54px", borderRightWidth: "arrow", diff --git a/apps/admin/constants/apiPath.ts b/apps/admin/constants/apiPath.ts new file mode 100644 index 00000000..54ac013f --- /dev/null +++ b/apps/admin/constants/apiPath.ts @@ -0,0 +1,3 @@ +export const enum apiPath { + dashboard = "/onboarding/members/me/dashboard", +} diff --git a/apps/admin/constants/tags.ts b/apps/admin/constants/tags.ts new file mode 100644 index 00000000..faca2ba3 --- /dev/null +++ b/apps/admin/constants/tags.ts @@ -0,0 +1,3 @@ +export const enum tags { + dashboard = "dashboard", +} diff --git a/apps/admin/middleware.ts b/apps/admin/middleware.ts new file mode 100644 index 00000000..4e1e165a --- /dev/null +++ b/apps/admin/middleware.ts @@ -0,0 +1,32 @@ +import { dashboardApi } from "apis/auth/dashboardApi"; +import { cookies } from "next/headers"; +import type { NextRequest } from "next/server"; +import { NextResponse } from "next/server"; + +export const config = { + matcher: ["/studies/:path*", "/participants/:path*"], +}; + +const middleware = async (req: NextRequest) => { + const cookieStore = cookies(); + const accessToken = cookieStore.get("accessToken")?.value; + + if (!accessToken) { + return NextResponse.redirect(new URL("/not-found", req.url)); + } + + const { studyRole, manageRole } = await dashboardApi.getDashboardInfo(); + + if (studyRole === "STUDENT" && manageRole === "NONE") { + const url = + process.env.NODE_ENV === "production" + ? process.env.CLIENT_PROD_URL + : process.env.CLIENT_DEV_URL; + + return NextResponse.redirect(new URL("/auth", url)); + } + + return NextResponse.next(); +}; + +export default middleware; diff --git a/apps/admin/types/dtos/auth.ts b/apps/admin/types/dtos/auth.ts new file mode 100644 index 00000000..1bf0eba9 --- /dev/null +++ b/apps/admin/types/dtos/auth.ts @@ -0,0 +1,47 @@ +import type { StatusType } from "../entities/auth"; + +export interface DashboardApiResponseDto { + member: { + memberId: number; + role: "GUEST" | "ADMIN" | "REGULAR"; + manageRole: "ADMIN" | "NONE"; + studyRole: "MENTOR" | "STUDENT"; + basicInfo: { + name: string; + studentId: string; + email: string; + department: string; + phone: string; + discordUsername: string; + nickname: string; + }; + associateRequirement: { + univStatus: StatusType; + discordStatus: Extract; + bevyStatus: Extract; + infoStatus: Extract; + }; + }; + currentRecruitmentRound: { + recruitmentId: number; + name: string; + period: { + startDate: string; + endDate: string; + open: boolean; + }; + fee: number; + roundType: "FIRST" | "SECOND"; + roundTypeValue: string; + }; + currentMembership: { + membershipId: number; + memberId: number; + recruitmentId: number; + regularRequirement: { + paymentStatus: Extract; + paymentSatisfied: boolean; + allSatisfied: boolean; + }; + }; +} diff --git a/apps/admin/types/entities/auth.ts b/apps/admin/types/entities/auth.ts new file mode 100644 index 00000000..a26a5338 --- /dev/null +++ b/apps/admin/types/entities/auth.ts @@ -0,0 +1 @@ +export type StatusType = "UNSATISFIED" | "IN_PROGRESS" | "SATISFIED"; diff --git a/apps/admin/types/role.ts b/apps/admin/types/role.ts new file mode 100644 index 00000000..8b50442e --- /dev/null +++ b/apps/admin/types/role.ts @@ -0,0 +1,3 @@ +export type ManageRole = "ADMIN" | "NONE"; +export type StudyRole = "MENTOR" | "STUDENT"; +export type UserRoleType = "GUEST" | "ASSOCIATE" | "REGULAR"; diff --git a/apps/admin/types/status.ts b/apps/admin/types/status.ts new file mode 100644 index 00000000..5d968b77 --- /dev/null +++ b/apps/admin/types/status.ts @@ -0,0 +1,2 @@ +export type Status = "UNSATISFIED" | "SATISFIED"; +export type UnivEmailStatus = "IN_PROGRESS" | "UNSATISFIED" | "SATISFIED"; diff --git a/apps/admin/types/user.ts b/apps/admin/types/user.ts new file mode 100644 index 00000000..81a5ee08 --- /dev/null +++ b/apps/admin/types/user.ts @@ -0,0 +1,33 @@ +import type { ManageRole, StudyRole, UserRoleType } from "./role"; +import type { Status, UnivEmailStatus } from "./status"; + +export type User = { + memberId: string; // C000000 (학번) + role: UserRoleType; + basicInfo: UserBasicInfo; + manageRole: ManageRole; + studyRole: StudyRole; + associateRequirement: { + univStatus: UnivEmailStatus; + discordStatus: Status; + bevyStatus: Status; + infoStatus: Status; + }; +}; + +export type AssociateRequirement = { + univStatus: UnivEmailStatus; + discordStatus: Status; + bevyStatus: Status; + infoStatus: Status; +}; + +export type UserBasicInfo = { + name: string; + studentId: string; + email: string; + department: string; + phone: string; + discordUsername: string; + nickname: string; +}; diff --git a/apps/admin/utils/isAdmin.ts b/apps/admin/utils/isAdmin.ts new file mode 100644 index 00000000..011dc0c3 --- /dev/null +++ b/apps/admin/utils/isAdmin.ts @@ -0,0 +1,8 @@ +import { dashboardApi } from "apis/auth/dashboardApi"; + +const isAdmin = async (): Promise => { + const { manageRole } = await dashboardApi.getDashboardInfo(); + return manageRole === "ADMIN"; +}; + +export default isAdmin; diff --git a/apps/client/apis/dashboardApi.ts b/apps/client/apis/dashboardApi.ts index 445b1f2c..6650ad95 100644 --- a/apps/client/apis/dashboardApi.ts +++ b/apps/client/apis/dashboardApi.ts @@ -1,22 +1,14 @@ import { fetcher } from "@wow-class/utils"; import { apiPath } from "constants/apiPath"; import { tags } from "constants/tags"; -import { cookies } from "next/headers"; import type { DashboardApiResponseDto } from "types/dtos/auth"; export const dashboardApi = { getDashboardInfo: async () => { - const cookieStore = cookies(); - const accessToken = cookieStore.get("accessToken")?.value; - - // NOTE: middleware에서 호출하기 위해서 별도로 헤더 주입 const response = await fetcher.get( apiPath.dashboard, { next: { tags: [tags.dashboard] }, - headers: { - Authorization: `Bearer ${accessToken}`, - }, } ); diff --git a/apps/client/apis/studyApplyApi.ts b/apps/client/apis/studyApplyApi.ts index 58326258..44e64bf0 100644 --- a/apps/client/apis/studyApplyApi.ts +++ b/apps/client/apis/studyApplyApi.ts @@ -9,6 +9,7 @@ export const studyApplyApi = { apiPath.applyStudy, { next: { tags: [tags.studyApply] }, + cache: "force-cache", } ); @@ -20,21 +21,11 @@ export const studyApplyApi = { null ); - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - return response.data; + return { success: response.ok }; }, cancelStudyApplication: async (studyId: number) => { const response = await fetcher.delete(`${apiPath.applyStudy}/${studyId}`); - if (!response.ok) { - const errorData = await response.json(); - throw new Error(errorData); - } - - return response.data; + return { success: response.ok }; }, }; diff --git a/apps/client/app/(afterLogin)/my-study/my-homework/_components/HomeworkBoxWithLinkEdit.tsx b/apps/client/app/(afterLogin)/my-study/my-homework/_components/HomeworkBoxWithLinkEdit.tsx index 772ec131..e1a47f41 100644 --- a/apps/client/app/(afterLogin)/my-study/my-homework/_components/HomeworkBoxWithLinkEdit.tsx +++ b/apps/client/app/(afterLogin)/my-study/my-homework/_components/HomeworkBoxWithLinkEdit.tsx @@ -1,7 +1,7 @@ "use client"; import { Space, Text } from "@wow-class/ui"; -import { padWithZero, parseDate } from "@wow-class/utils"; +import { padWithZero, parseISODate } from "@wow-class/utils"; import { tags } from "constants/tags"; import { revalidateTag } from "next/cache"; import type { SubmittableAssignment } from "types/dtos/study-detail-dashboard"; @@ -34,7 +34,7 @@ export const HomeworkBoxWithLinkEdit = ({ descriptionLink, submissionLink, }) => { - const { year, month, day, hours, minutes } = parseDate(deadline); + const { year, month, day, hours, minutes } = parseISODate(deadline); const deadlineText = `종료일시: ${year}년 ${month}월 ${day}일 ${padWithZero( hours diff --git a/apps/client/app/(afterLogin)/my-study/my-homework/_components/HomeworkHistory/HomeworkHistoryItem.tsx b/apps/client/app/(afterLogin)/my-study/my-homework/_components/HomeworkHistory/HomeworkHistoryItem.tsx index 460699d8..ff3dfff8 100644 --- a/apps/client/app/(afterLogin)/my-study/my-homework/_components/HomeworkHistory/HomeworkHistoryItem.tsx +++ b/apps/client/app/(afterLogin)/my-study/my-homework/_components/HomeworkHistory/HomeworkHistoryItem.tsx @@ -1,6 +1,6 @@ import { Flex, styled } from "@styled-system/jsx"; import { Space, Table, Text } from "@wow-class/ui"; -import { padWithZero, parseDate } from "@wow-class/utils"; +import { padWithZero, parseISODate } from "@wow-class/utils"; import type { ComponentProps } from "react"; import type { AssignmentHistoryDto } from "types/dtos/study-history"; import type { AssignmentSubmissionStatusType } from "types/entities/assignment"; @@ -22,7 +22,7 @@ export const HomeworkHistoryItem = ({ history }: HomeworkHistoryItemProps) => { submissionLink, } = history; - const { year, month, day, hours, minutes } = parseDate(deadline); + const { year, month, day, hours, minutes } = parseISODate(deadline); const deadlineText = `종료: ${year}년 ${month}월 ${day}일 ${padWithZero( hours diff --git a/apps/client/app/(afterLogin)/my-study/my-homework/_components/mockData.ts b/apps/client/app/(afterLogin)/my-study/my-homework/_components/mockData.ts index e7ddb2da..3f488b9f 100644 --- a/apps/client/app/(afterLogin)/my-study/my-homework/_components/mockData.ts +++ b/apps/client/app/(afterLogin)/my-study/my-homework/_components/mockData.ts @@ -17,7 +17,7 @@ export const history: AssignmentHistoryDto[] = [ deadline: "2024-08-24T06:02:17.417Z", descriptionLink: "http://example.com/assignment2", submissionLink: "", - assignmentSubmissionStatus: "FAIL", + assignmentSubmissionStatus: "FAILURE", week: 2, }, ]; @@ -31,7 +31,7 @@ export const studyDashBoardData: StudyDetailDashboardDto = { assignmentStatus: "OPEN", week: 1, title: "React Basics", - assignmentSubmissionStatus: "FAIL", + assignmentSubmissionStatus: "FAILURE", descriptionLink: "https://example.com/assignments/react-basics", deadline: "2024-08-18T17:56:01.155Z", submissionLink: "https://example.com/submissions/react-basics", diff --git a/apps/client/app/(afterLogin)/study-apply/_components/StudyItem.tsx b/apps/client/app/(afterLogin)/study-apply/_components/StudyItem.tsx index c10e6691..08613ba3 100644 --- a/apps/client/app/(afterLogin)/study-apply/_components/StudyItem.tsx +++ b/apps/client/app/(afterLogin)/study-apply/_components/StudyItem.tsx @@ -1,9 +1,9 @@ "use client"; import { css } from "@styled-system/css"; -import { styled } from "@styled-system/jsx"; +import { Flex, styled } from "@styled-system/jsx"; import { Table, Text } from "@wow-class/ui"; -import { parseDate, splitTime } from "@wow-class/utils"; +import { parseISODate, splitTime } from "@wow-class/utils"; import { studyApplyApi } from "apis/studyApplyApi"; import { dayToKorean } from "constants/dayToKorean"; import type { ComponentProps } from "react"; @@ -16,66 +16,72 @@ interface StudyItemProps { } const StudyItem = ({ study }: StudyItemProps) => { - //NOTE: 모달이 열리도록 수정 예정 - const handleApplyButtonClick = () => { - studyApplyApi - .applyStudy(study.studyId) - .then(() => { - console.log("success"); - }) - .catch((error) => { - console.error("스터디 신청 실패:", error.errorMessage || error); - }); + const { + studyId, + title, + introduction, + notionLink, + mentorName, + studyType, + dayOfWeek, + startTime: startTimeString, + openingDate: openingDateString, + totalWeek, + } = study; + + const handleClickApplyButton = async () => { + const result = await studyApplyApi.applyStudy(studyId); + + if (!result.success) { + console.error("스터디 신청 실패"); + } else { + console.log("스터디 신청 성공"); + } }; - //NOTE: 임시로 신청 취소 버튼 만듬 (추후에 응답에 신청 여부에 따라 하나의 버튼에서 이루어질 수 있도록 수정) - const handleCancelButtonClick = () => { - studyApplyApi - .cancelStudyApplication(study.studyId) - .then(() => { - console.log("success"); - }) - .catch((error) => { - console.error("스터디 취소 실패:", error.errorMessage || error); - }); + const handleClickCancelButton = async () => { + const result = await studyApplyApi.cancelStudyApplication(studyId); + + if (!result.success) { + console.error("스터디 신청 실패"); + } else { + console.log("스터디 취소 성공"); + } }; - const startTime = splitTime(study.startTime); - const openingDate = parseDate(study.openingDate); + const startTime = splitTime(startTimeString); + const openingDate = parseISODate(openingDateString); + const studyTime = `${dayToKorean[dayOfWeek.toUpperCase()]} ${startTime.hours}:${startTime.minutes} - ${ + Number(startTime.hours) + 1 + }:${startTime.minutes}`; return ( - ["color"] - } - > - {study.studyType} + + + {title} + + {studyType} - } - /> - {study.mentorName} - - {`${dayToKorean[study.dayOfWeek.toUpperCase()]} ${startTime.hours}:${startTime.minutes} - ${ - Number(startTime.hours) + 1 - }:${startTime.minutes}`} - - {study.totalWeek}주 코스 + + + {`${introduction} -`} + + {notionLink} + + + + {mentorName} + {studyTime} + {totalWeek}주 코스 {`${openingDate.month}.${openingDate.day} 개강`} - - diff --git a/apps/client/app/error.tsx b/apps/client/app/error.tsx new file mode 100644 index 00000000..1344c8e2 --- /dev/null +++ b/apps/client/app/error.tsx @@ -0,0 +1,6 @@ +"use client"; +const ErrorPage = () => { + return
error
; +}; + +export default ErrorPage; diff --git a/apps/client/types/entities/assignment.ts b/apps/client/types/entities/assignment.ts index 221ff900..627d8ff7 100644 --- a/apps/client/types/entities/assignment.ts +++ b/apps/client/types/entities/assignment.ts @@ -1 +1 @@ -export type AssignmentSubmissionStatusType = "FAIL" | "SUCCESS"; //TODO: 과제 휴강 여부 추가 +export type AssignmentSubmissionStatusType = "FAILURE" | "SUCCESS"; //TODO: 과제 휴강 여부 추가 diff --git a/package.json b/package.json index 838b051c..8caa0e99 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,6 @@ "clsx": "^2.1.1", "wowds-icons": "^0.1.3", "wowds-tokens": "^0.1.1", - "wowds-ui": "^0.1.13" + "wowds-ui": "^0.1.8" } } diff --git a/packages/ui/src/components/Table/Table.stories.tsx b/packages/ui/src/components/Table/Table.stories.tsx index 29aa1008..01148079 100644 --- a/packages/ui/src/components/Table/Table.stories.tsx +++ b/packages/ui/src/components/Table/Table.stories.tsx @@ -1,5 +1,4 @@ import type { Meta, StoryObj } from "@storybook/react"; -import Tag from "wowds-ui/Tag"; import Text from "../Text"; import Table from "."; @@ -31,46 +30,3 @@ export const Default: Story = { ), }, }; - -export const WithContent: Story = { - args: { - children: ( - <> - 기초 웹스터디 - - 온라인 세션 - - } - /> - 오른쪽 컨텐츠 - - ), - }, -}; - -export const WithoutSubText: Story = { - args: { - children: ( - <> - - 기초 웹스터디 - - 온라인 세션 - - } - /> - - - 오른쪽 컨텐츠 - - - ), - }, -}; diff --git a/packages/ui/src/components/Table/index.tsx b/packages/ui/src/components/Table/index.tsx index 3f38d9eb..20245341 100644 --- a/packages/ui/src/components/Table/index.tsx +++ b/packages/ui/src/components/Table/index.tsx @@ -1,13 +1,5 @@ import { Flex } from "@styled-system/jsx"; -import type { PropsWithChildren, ReactNode } from "react"; - -import Text from "../Text"; - -interface TableContentProps { - text: string; - subText?: string; - rightContent?: ReactNode; -} +import type { PropsWithChildren } from "react"; /** * @description Table 컴포넌트. 기본적으로 space-between로 정렬되어 있습니다. @@ -50,26 +42,4 @@ Table.Right = ({ children }: PropsWithChildren) => { ); }; -/** - * @description Table.Content 컴포넌트 - * @param {string} text - 텍스트 - * @param {string} subText - 서브 텍스트 - * @param {ReactNode} rightContent - 텍스트 영역의 오른쪽 컨텐츠 - */ -Table.Content = ({ text, subText, rightContent }: TableContentProps) => { - return ( - - - {text && {text}} - {rightContent} - - {subText && ( - - {subText} - - )} - - ); -}; - export default Table; diff --git a/packages/ui/src/styles.css b/packages/ui/src/styles.css index cb522b7f..aa255d96 100644 --- a/packages/ui/src/styles.css +++ b/packages/ui/src/styles.css @@ -239,8 +239,6 @@ progress { --colors-mono-950: #121212; --colors-white: #ffffff; --colors-black: #000000; - --spacing-xxs: 0.25rem; - --spacing-xs: 0.5rem; --border-widths-button: 1px; --colors-primary: #368ff7; --colors-success: #2a8642; @@ -400,18 +398,6 @@ progress { .h_80px:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) { height: 80px; } -.gap_xxs:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) { - gap: var(--spacing-xxs); -} -.gap_xs:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) { - gap: var(--spacing-xs); -} -.c_sub:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) { - color: var(--colors-sub); -} -.c_blue:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) { - color: blue; -} .c_textBlack:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) { color: var(--colors-text-black); } @@ -658,6 +644,9 @@ progress { .c_errorBackground:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) { color: var(--colors-error-background); } +.c_sub:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) { + color: var(--colors-sub); +} .c_outline:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) { color: var(--colors-outline); } @@ -793,9 +782,3 @@ progress { .jc_flex-end:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) { justify-content: flex-end; } -.flex-d_column:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) { - flex-direction: column; -} -.jc_center:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#) { - justify-content: center; -} diff --git a/packages/utils/package.json b/packages/utils/package.json index 157b48c2..5410d84a 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -2,18 +2,22 @@ "name": "@wow-class/utils", "version": "0.0.0", "private": true, - "scripts": { - "test": "jest" - }, "exports": { ".": "./src/index.ts" }, + "scripts": { + "test": "jest" + }, "devDependencies": { "@types/jest": "^29.5.12", + "@wow-class/eslint-config": "workspace:*", "@wow-class/typescript-config": "workspace:*", "jest": "^29.7.0", "jest-fetch-mock": "^3.0.3", - "ts-jest": "^29.2.4", - "@wow-class/eslint-config": "workspace:*" + "typescript": "^5.3.3", + "ts-jest": "^29.2.4" + }, + "dependencies": { + "next": "^14.2.5" } } diff --git a/packages/utils/src/fetcher/index.ts b/packages/utils/src/fetcher/index.ts index df222dc9..c3194f67 100644 --- a/packages/utils/src/fetcher/index.ts +++ b/packages/utils/src/fetcher/index.ts @@ -87,9 +87,14 @@ class Fetcher { ): Promise> { options = await this.interceptRequest(options); + const fetchOptions: RequestInit = { + ...options, + credentials: "include", + }; + const fullUrl = this.baseUrl + url; - let response: ApiResponse = await fetch(fullUrl, options); + let response: ApiResponse = await fetch(fullUrl, fetchOptions); await this.handleError(response); @@ -157,6 +162,8 @@ class Fetcher { } } +const isClient = typeof window !== "undefined"; + const fetcher = new Fetcher({ baseUrl: process.env.NODE_ENV === "production" @@ -165,4 +172,22 @@ const fetcher = new Fetcher({ defaultHeaders: { "Content-Type": "application/json" }, }); +if (!isClient) { + fetcher.addRequestInterceptor(async (options) => { + const { cookies } = await import("next/headers"); + + const cookieStore = cookies(); + const accessToken = cookieStore.get("accessToken")?.value; + + if (accessToken) { + options.headers = { + ...options.headers, + Authorization: `Bearer ${accessToken}`, + }; + } + + return options; + }); +} + export default fetcher; diff --git a/packages/utils/src/formatDate.ts b/packages/utils/src/formatDate.ts new file mode 100644 index 00000000..b1fa32aa --- /dev/null +++ b/packages/utils/src/formatDate.ts @@ -0,0 +1,18 @@ +/** + * + * @description ISO Date 형식의 string 을 hours, minutes, seconds, year, month, day 로 파싱합니다. + * @example parseDate("2021-08-31T00:00:00.000Z") -> { year: 2021, month: 8, day: 31, hours: 0, minutes: 0, seconds: 0 } + */ + +export const parseISODate = (dateString: string) => { + const date = new Date(dateString); + + return { + year: date.getFullYear(), + month: date.getMonth() + 1, + day: date.getDate(), + hours: date.getHours(), + minutes: date.getMinutes(), + seconds: date.getSeconds(), + }; +}; diff --git a/packages/utils/src/formatTime.ts b/packages/utils/src/formatTime.ts new file mode 100644 index 00000000..b2202b81 --- /dev/null +++ b/packages/utils/src/formatTime.ts @@ -0,0 +1,22 @@ +/** + * @description 10보다 작은 숫자에 0을 붙여 반환합니다. + * @example padWithZero(2) -> "02" + */ + +export const padWithZero = (number: number) => { + return number.toString().padStart(2, "0"); +}; + +/** + * @description 시간을 받아 시간, 분, 초로 나누어 반환합니다. + * @example splitTime("12:30:00") -> { hours: "12", minutes: "30", seconds: "00" } + */ + +export const splitTime = (timeString: string) => { + const [hours, minutes, seconds] = timeString.split(":"); + return { + hours, + minutes, + seconds, + }; +}; diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts index 5787f691..05260e73 100644 --- a/packages/utils/src/index.ts +++ b/packages/utils/src/index.ts @@ -1,4 +1,3 @@ export { default as fetcher } from "./fetcher"; -export { default as padWithZero } from "./padWithZero"; -export { default as parseDate } from "./parseDate"; -export { default as splitTime } from "./splitTime"; +export * from "./formatDate"; +export * from "./formatTime"; diff --git a/packages/utils/tsconfig.json b/packages/utils/tsconfig.json index 92343a69..36cb6214 100644 --- a/packages/utils/tsconfig.json +++ b/packages/utils/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "@wow-class/typescript-config/basic.json", + "compilerOptions": { + "baseUrl": "./src" + }, "include": ["src", "jest.setup.ts"], "exclude": ["node_modules"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bbe7626c..479e80da 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,7 +18,7 @@ importers: specifier: ^0.1.1 version: 0.1.3 wowds-ui: - specifier: ^0.1.13 + specifier: ^0.1.8 version: 0.1.13(next@14.2.5)(react-dom@18.3.1)(react@18.3.1) devDependencies: '@pandacss/dev': @@ -216,16 +216,16 @@ importers: version: 8.2.8(storybook@8.2.8) '@storybook/nextjs': specifier: ^8.2.8 - version: 8.2.8(esbuild@0.21.5)(next@14.2.5)(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.3.3)(webpack@5.93.0) + version: 8.2.8(esbuild@0.21.5)(next@14.2.5)(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.4.5)(webpack@5.93.0) '@storybook/react': specifier: ^8.2.7 - version: 8.2.8(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.3.3) + version: 8.2.8(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.4.5) '@storybook/react-vite': specifier: ^8.2.7 - version: 8.2.8(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.3.3)(vite@5.3.5) + version: 8.2.8(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.4.5)(vite@5.3.5) '@turbo/gen': specifier: ^1.12.4 - version: 1.12.4(@types/node@20.11.24)(typescript@5.3.3) + version: 1.12.4(@types/node@20.11.24)(typescript@5.4.5) '@types/eslint': specifier: ^8.56.5 version: 8.56.5 @@ -252,15 +252,19 @@ importers: version: 8.57.0 eslint-plugin-storybook: specifier: ^0.8.0 - version: 0.8.0(eslint@8.57.0)(typescript@5.3.3) + version: 0.8.0(eslint@8.57.0)(typescript@5.4.5) storybook: specifier: ^8.2.7 version: 8.2.8 typescript: specifier: ^5.3.3 - version: 5.3.3 + version: 5.4.5 packages/utils: + dependencies: + next: + specifier: ^14.2.5 + version: 14.2.5(@babel/core@7.25.2)(react-dom@18.3.1)(react@18.3.1) devDependencies: '@types/jest': specifier: ^29.5.12 @@ -280,6 +284,9 @@ importers: ts-jest: specifier: ^29.2.4 version: 29.2.4(@babel/core@7.25.2)(jest@29.7.0)(typescript@5.4.5) + typescript: + specifier: ^5.3.3 + version: 5.4.5 packages: @@ -2838,7 +2845,7 @@ packages: chalk: 4.1.2 dev: true - /@joshwooding/vite-plugin-react-docgen-typescript@0.3.1(typescript@5.3.3)(vite@5.3.5): + /@joshwooding/vite-plugin-react-docgen-typescript@0.3.1(typescript@5.4.5)(vite@5.3.5): resolution: {integrity: sha512-pdoMZ9QaPnVlSM+SdU/wgg0nyD/8wQ7y90ttO2CMCyrrm7RxveYIJ5eNfjPaoMFqW41LZra7QO9j+xV4Y18Glw==} peerDependencies: typescript: '>= 4.3.x' @@ -2850,8 +2857,8 @@ packages: glob: 7.2.3 glob-promise: 4.2.2(glob@7.2.3) magic-string: 0.27.0 - react-docgen-typescript: 2.2.2(typescript@5.3.3) - typescript: 5.3.3 + react-docgen-typescript: 2.2.2(typescript@5.4.5) + typescript: 5.4.5 vite: 5.3.5(@types/node@20.11.24) dev: true @@ -3600,7 +3607,7 @@ packages: util-deprecate: 1.0.2 dev: true - /@storybook/builder-vite@8.2.8(storybook@8.2.8)(typescript@5.3.3)(vite@5.3.5): + /@storybook/builder-vite@8.2.8(storybook@8.2.8)(typescript@5.4.5)(vite@5.3.5): resolution: {integrity: sha512-p9EJfZkX9ZsVi1Qr3jYyCJaZZ/2pt0KVTOYnDzNnhi3P/suU6O3Lp/YCV5+KOfAmlg2IgTND0EidqZinqPIBSg==} peerDependencies: '@preact/preset-vite': '*' @@ -3626,13 +3633,13 @@ packages: magic-string: 0.30.11 storybook: 8.2.8 ts-dedent: 2.2.0 - typescript: 5.3.3 + typescript: 5.4.5 vite: 5.3.5(@types/node@20.11.24) transitivePeerDependencies: - supports-color dev: true - /@storybook/builder-webpack5@8.2.8(esbuild@0.21.5)(storybook@8.2.8)(typescript@5.3.3): + /@storybook/builder-webpack5@8.2.8(esbuild@0.21.5)(storybook@8.2.8)(typescript@5.4.5): resolution: {integrity: sha512-1eH8OYcsjkFtpodJNsrrgDsR7oDPLpo7FdoF67S9g/mRxTl1RCwhMVdeBHgtfge9kHQ1TlpK9tTXine4G3uA3Q==} peerDependencies: storybook: ^8.2.8 @@ -3651,7 +3658,7 @@ packages: css-loader: 6.11.0(webpack@5.93.0) es-module-lexer: 1.5.4 express: 4.19.2 - fork-ts-checker-webpack-plugin: 8.0.0(typescript@5.3.3)(webpack@5.93.0) + fork-ts-checker-webpack-plugin: 8.0.0(typescript@5.4.5)(webpack@5.93.0) fs-extra: 11.2.0 html-webpack-plugin: 5.6.0(webpack@5.93.0) magic-string: 0.30.11 @@ -3662,7 +3669,7 @@ packages: style-loader: 3.3.4(webpack@5.93.0) terser-webpack-plugin: 5.3.10(esbuild@0.21.5)(webpack@5.93.0) ts-dedent: 2.2.0 - typescript: 5.3.3 + typescript: 5.4.5 url: 0.11.4 util: 0.12.5 util-deprecate: 1.0.2 @@ -3794,7 +3801,7 @@ packages: storybook: 8.2.8 dev: true - /@storybook/nextjs@8.2.8(esbuild@0.21.5)(next@14.2.5)(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.3.3)(webpack@5.93.0): + /@storybook/nextjs@8.2.8(esbuild@0.21.5)(next@14.2.5)(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.4.5)(webpack@5.93.0): resolution: {integrity: sha512-j7ip8JzLGuw1AzRkPZC/dCymYUAj4kVyS3CNmlGEms7h4pAaPr3oTuIRO0AMzRfR3DId4DRho3P4eTLHF5QdIA==} engines: {node: '>=18.0.0'} peerDependencies: @@ -3824,9 +3831,9 @@ packages: '@babel/preset-typescript': 7.24.7(@babel/core@7.25.2) '@babel/runtime': 7.25.0 '@pmmmwh/react-refresh-webpack-plugin': 0.5.15(react-refresh@0.14.2)(webpack@5.93.0) - '@storybook/builder-webpack5': 8.2.8(esbuild@0.21.5)(storybook@8.2.8)(typescript@5.3.3) - '@storybook/preset-react-webpack': 8.2.8(esbuild@0.21.5)(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.3.3) - '@storybook/react': 8.2.8(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.3.3) + '@storybook/builder-webpack5': 8.2.8(esbuild@0.21.5)(storybook@8.2.8)(typescript@5.4.5) + '@storybook/preset-react-webpack': 8.2.8(esbuild@0.21.5)(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.4.5) + '@storybook/react': 8.2.8(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.4.5) '@storybook/test': 8.2.8(storybook@8.2.8) '@types/node': 18.19.43 '@types/semver': 7.5.0 @@ -3838,9 +3845,9 @@ packages: loader-utils: 3.3.1 next: 14.2.5(@babel/core@7.25.2)(react-dom@18.3.1)(react@18.3.1) node-polyfill-webpack-plugin: 2.0.1(webpack@5.93.0) - pnp-webpack-plugin: 1.7.0(typescript@5.3.3) + pnp-webpack-plugin: 1.7.0(typescript@5.4.5) postcss: 8.4.41 - postcss-loader: 8.1.1(postcss@8.4.41)(typescript@5.3.3)(webpack@5.93.0) + postcss-loader: 8.1.1(postcss@8.4.41)(typescript@5.4.5)(webpack@5.93.0) react: 18.3.1 react-dom: 18.3.1(react@18.3.1) react-refresh: 0.14.2 @@ -3853,7 +3860,7 @@ packages: ts-dedent: 2.2.0 tsconfig-paths: 4.2.0 tsconfig-paths-webpack-plugin: 4.1.0 - typescript: 5.3.3 + typescript: 5.4.5 webpack: 5.93.0(esbuild@0.21.5) optionalDependencies: sharp: 0.33.4 @@ -3882,7 +3889,7 @@ packages: - webpack-plugin-serve dev: true - /@storybook/preset-react-webpack@8.2.8(esbuild@0.21.5)(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.3.3): + /@storybook/preset-react-webpack@8.2.8(esbuild@0.21.5)(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.4.5): resolution: {integrity: sha512-mFeuoKXn2mielz8rix11QcOZr5sNWIIKZ8Le6PG2jPRfLmLWNgL8vJEVPy8y4lWPfzo+Q2tnNefLbMombtga5w==} engines: {node: '>=18.0.0'} peerDependencies: @@ -3895,8 +3902,8 @@ packages: optional: true dependencies: '@storybook/core-webpack': 8.2.8(storybook@8.2.8) - '@storybook/react': 8.2.8(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.3.3) - '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.3.3)(webpack@5.93.0) + '@storybook/react': 8.2.8(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.4.5) + '@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0(typescript@5.4.5)(webpack@5.93.0) '@types/node': 18.19.43 '@types/semver': 7.5.0 find-up: 5.0.0 @@ -3909,7 +3916,7 @@ packages: semver: 7.6.2 storybook: 8.2.8 tsconfig-paths: 4.2.0 - typescript: 5.3.3 + typescript: 5.4.5 webpack: 5.93.0(esbuild@0.21.5) transitivePeerDependencies: - '@swc/core' @@ -3927,7 +3934,7 @@ packages: storybook: 8.2.8 dev: true - /@storybook/react-docgen-typescript-plugin@1.0.6--canary.9.0c3f3b7.0(typescript@5.3.3)(webpack@5.93.0): + /@storybook/react-docgen-typescript-plugin@1.0.6--canary.9.0c3f3b7.0(typescript@5.4.5)(webpack@5.93.0): resolution: {integrity: sha512-KUqXC3oa9JuQ0kZJLBhVdS4lOneKTOopnNBK4tUAgoxWQ3u/IjzdueZjFr7gyBrXMoU6duutk3RQR9u8ZpYJ4Q==} peerDependencies: typescript: '>= 4.x' @@ -3938,9 +3945,9 @@ packages: find-cache-dir: 3.3.2 flat-cache: 3.0.4 micromatch: 4.0.7 - react-docgen-typescript: 2.2.2(typescript@5.3.3) + react-docgen-typescript: 2.2.2(typescript@5.4.5) tslib: 2.6.2 - typescript: 5.3.3 + typescript: 5.4.5 webpack: 5.93.0(esbuild@0.21.5) transitivePeerDependencies: - supports-color @@ -3958,7 +3965,7 @@ packages: storybook: 8.2.8 dev: true - /@storybook/react-vite@8.2.8(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.3.3)(vite@5.3.5): + /@storybook/react-vite@8.2.8(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.4.5)(vite@5.3.5): resolution: {integrity: sha512-xzXWyhFnLoFtJGgj8F5j/33QB4YTyEX61On6kolt7WFAjRFaUWJGYUC8cPPL4PNwsdouyCrnHvlJj77AvFlvfQ==} engines: {node: '>=18.0.0'} peerDependencies: @@ -3967,10 +3974,10 @@ packages: storybook: ^8.2.8 vite: ^4.0.0 || ^5.0.0 dependencies: - '@joshwooding/vite-plugin-react-docgen-typescript': 0.3.1(typescript@5.3.3)(vite@5.3.5) + '@joshwooding/vite-plugin-react-docgen-typescript': 0.3.1(typescript@5.4.5)(vite@5.3.5) '@rollup/pluginutils': 5.1.0 - '@storybook/builder-vite': 8.2.8(storybook@8.2.8)(typescript@5.3.3)(vite@5.3.5) - '@storybook/react': 8.2.8(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.3.3) + '@storybook/builder-vite': 8.2.8(storybook@8.2.8)(typescript@5.4.5)(vite@5.3.5) + '@storybook/react': 8.2.8(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.4.5) find-up: 5.0.0 magic-string: 0.30.11 react: 18.3.1 @@ -3988,7 +3995,7 @@ packages: - vite-plugin-glimmerx dev: true - /@storybook/react@8.2.8(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.3.3): + /@storybook/react@8.2.8(react-dom@18.3.1)(react@18.3.1)(storybook@8.2.8)(typescript@5.4.5): resolution: {integrity: sha512-Nln0DDTQ930P4J+SEkWbLSgaDe8eDd5gP6h3l4b5RwT7sRuSyHtTtYHPCnU9U7sLQ3AbMsclgtJukHXDitlccg==} engines: {node: '>=18.0.0'} peerDependencies: @@ -4023,7 +4030,7 @@ packages: storybook: 8.2.8 ts-dedent: 2.2.0 type-fest: 2.19.0 - typescript: 5.3.3 + typescript: 5.4.5 util-deprecate: 1.0.2 dev: true @@ -4103,7 +4110,7 @@ packages: dependencies: '@adobe/css-tools': 4.4.0 '@babel/runtime': 7.25.0 - aria-query: 5.3.0 + aria-query: 5.1.3 chalk: 3.0.0 css.escape: 1.5.1 dom-accessibility-api: 0.6.3 @@ -4149,8 +4156,9 @@ packages: resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} dev: true - /@turbo/gen@1.12.4(@types/node@20.11.24)(typescript@5.3.3): + /@turbo/gen@1.12.4(@types/node@20.11.24)(typescript@5.4.5): resolution: {integrity: sha512-3Z8KZ6Vnc2x6rr8sNJ4QNYpkAttLBfb91uPzDlFDY7vgJg+vfXT8YWyZznVL+19ZixF2C/F4Ucp4/YjG2e1drg==} + hasBin: true dependencies: '@turbo/workspaces': 1.12.4 chalk: 2.4.2 @@ -4160,7 +4168,7 @@ packages: minimatch: 9.0.3 node-plop: 0.26.3 proxy-agent: 6.3.0 - ts-node: 10.9.1(@types/node@20.11.24)(typescript@5.3.3) + ts-node: 10.9.1(@types/node@20.11.24)(typescript@5.4.5) update-check: 1.5.4 validate-npm-package-name: 5.0.0 transitivePeerDependencies: @@ -4173,6 +4181,7 @@ packages: /@turbo/workspaces@1.12.4: resolution: {integrity: sha512-a1hF8Nr6MOeCpvlLR569dGTlzgRLj2Rxo6dTb4jtL+jhHwCb94A9kDPgcRnYGFr45mgulICarVaNZxDjw4/riQ==} + hasBin: true dependencies: chalk: 2.4.2 commander: 10.0.1 @@ -4662,27 +4671,6 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@5.62.0(typescript@5.3.3): - resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/visitor-keys': 5.62.0 - debug: 4.3.4 - globby: 11.1.0 - is-glob: 4.0.3 - semver: 7.6.2 - tsutils: 3.21.0(typescript@5.3.3) - typescript: 5.3.3 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/typescript-estree@5.62.0(typescript@5.4.5): resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -4748,26 +4736,6 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@5.62.0(eslint@8.57.0)(typescript@5.3.3): - resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@types/json-schema': 7.0.12 - '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.3.3) - eslint: 8.57.0 - eslint-scope: 5.1.1 - semver: 7.6.2 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - /@typescript-eslint/utils@5.62.0(eslint@8.57.0)(typescript@5.4.5): resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -6323,7 +6291,7 @@ packages: yaml: 1.10.2 dev: true - /cosmiconfig@9.0.0(typescript@5.3.3): + /cosmiconfig@9.0.0(typescript@5.4.5): resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==} engines: {node: '>=14'} peerDependencies: @@ -6336,7 +6304,7 @@ packages: import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 - typescript: 5.3.3 + typescript: 5.4.5 dev: true /create-ecdh@4.0.4: @@ -6922,14 +6890,6 @@ packages: objectorarray: 1.0.5 dev: true - /enhanced-resolve@5.15.0: - resolution: {integrity: sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==} - engines: {node: '>=10.13.0'} - dependencies: - graceful-fs: 4.2.11 - tapable: 2.2.1 - dev: true - /enhanced-resolve@5.17.1: resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} engines: {node: '>=10.13.0'} @@ -7330,11 +7290,11 @@ packages: eslint-plugin-import: '*' dependencies: debug: 4.3.4 - enhanced-resolve: 5.15.0 + enhanced-resolve: 5.17.1 eslint: 8.57.0 eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.17.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.17.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) - fast-glob: 3.3.1 + fast-glob: 3.3.2 get-tsconfig: 4.7.2 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -7673,22 +7633,6 @@ packages: eslint: 8.57.0 dev: true - /eslint-plugin-storybook@0.8.0(eslint@8.57.0)(typescript@5.3.3): - resolution: {integrity: sha512-CZeVO5EzmPY7qghO2t64oaFM+8FTaD4uzOEjHKp516exyTKo+skKAL9GI3QALS2BXhyALJjNtwbmr1XinGE8bA==} - engines: {node: '>= 18'} - peerDependencies: - eslint: '>=6' - dependencies: - '@storybook/csf': 0.0.1 - '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.3.3) - eslint: 8.57.0 - requireindex: 1.2.0 - ts-dedent: 2.2.0 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - /eslint-plugin-storybook@0.8.0(eslint@8.57.0)(typescript@5.4.5): resolution: {integrity: sha512-CZeVO5EzmPY7qghO2t64oaFM+8FTaD4uzOEjHKp516exyTKo+skKAL9GI3QALS2BXhyALJjNtwbmr1XinGE8bA==} engines: {node: '>= 18'} @@ -8027,17 +7971,6 @@ packages: resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} dev: true - /fast-glob@3.3.1: - resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} - engines: {node: '>=8.6.0'} - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.7 - dev: true - /fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} @@ -8234,7 +8167,7 @@ packages: signal-exit: 4.1.0 dev: true - /fork-ts-checker-webpack-plugin@8.0.0(typescript@5.3.3)(webpack@5.93.0): + /fork-ts-checker-webpack-plugin@8.0.0(typescript@5.4.5)(webpack@5.93.0): resolution: {integrity: sha512-mX3qW3idpueT2klaQXBzrIM/pHw+T0B/V9KHEvNrqijTq9NFnMZU6oreVxDYcf33P8a5cW+67PjodNHthGnNVg==} engines: {node: '>=12.13.0', yarn: '>=1.0.0'} peerDependencies: @@ -8253,7 +8186,7 @@ packages: schema-utils: 3.3.0 semver: 7.6.2 tapable: 2.2.1 - typescript: 5.3.3 + typescript: 5.4.5 webpack: 5.93.0(esbuild@0.21.5) dev: true @@ -8576,6 +8509,7 @@ packages: /handlebars@4.7.8: resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} engines: {node: '>=0.4.7'} + hasBin: true dependencies: minimist: 1.2.8 neo-async: 2.6.2 @@ -10543,6 +10477,7 @@ packages: /mkdirp@0.5.6: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} + hasBin: true dependencies: minimist: 1.2.8 dev: true @@ -11295,11 +11230,11 @@ packages: engines: {node: '>=4'} dev: true - /pnp-webpack-plugin@1.7.0(typescript@5.3.3): + /pnp-webpack-plugin@1.7.0(typescript@5.4.5): resolution: {integrity: sha512-2Rb3vm+EXble/sMXNSu6eoBx8e79gKqhNq9F5ZWW6ERNCTE/Q0wQNne5541tE5vKjfM8hpNCYL+LGc1YTfI0dg==} engines: {node: '>=6'} dependencies: - ts-pnp: 1.2.0(typescript@5.3.3) + ts-pnp: 1.2.0(typescript@5.4.5) transitivePeerDependencies: - typescript dev: true @@ -11334,7 +11269,7 @@ packages: postcss: 8.4.39 dev: true - /postcss-loader@8.1.1(postcss@8.4.41)(typescript@5.3.3)(webpack@5.93.0): + /postcss-loader@8.1.1(postcss@8.4.41)(typescript@5.4.5)(webpack@5.93.0): resolution: {integrity: sha512-0IeqyAsG6tYiDRCYKQJLAmgQr47DX6N7sFSWvQxt6AcupX8DIdmykuk/o/tx0Lze3ErGHJEp5OSRxrelC6+NdQ==} engines: {node: '>= 18.12.0'} peerDependencies: @@ -11347,7 +11282,7 @@ packages: webpack: optional: true dependencies: - cosmiconfig: 9.0.0(typescript@5.3.3) + cosmiconfig: 9.0.0(typescript@5.4.5) jiti: 1.21.6 postcss: 8.4.41 semver: 7.6.2 @@ -11684,6 +11619,7 @@ packages: /rc@1.2.8: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} + hasBin: true dependencies: deep-extend: 0.6.0 ini: 1.3.8 @@ -11701,12 +11637,12 @@ packages: react-dom: 18.3.1(react@18.3.1) dev: true - /react-docgen-typescript@2.2.2(typescript@5.3.3): + /react-docgen-typescript@2.2.2(typescript@5.4.5): resolution: {integrity: sha512-tvg2ZtOpOi6QDwsb3GZhOjDkkX0h8Z2gipvTg6OVMUyoYoURhEiRNePT8NZItTVCDh39JJHnLdfCOkzoLbFnTg==} peerDependencies: typescript: '>= 4.3.x' dependencies: - typescript: 5.3.3 + typescript: 5.4.5 dev: true /react-docgen@7.0.3: @@ -12089,6 +12025,8 @@ packages: /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported + hasBin: true dependencies: glob: 7.2.3 dev: true @@ -13121,7 +13059,7 @@ packages: code-block-writer: 12.0.0 dev: true - /ts-node@10.9.1(@types/node@20.11.24)(typescript@5.3.3): + /ts-node@10.9.1(@types/node@20.11.24)(typescript@5.4.5): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -13141,13 +13079,13 @@ packages: '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 '@types/node': 20.11.24 - acorn: 8.10.0 + acorn: 8.12.1 acorn-walk: 8.2.0 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.3.3 + typescript: 5.4.5 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: true @@ -13156,7 +13094,7 @@ packages: resolution: {integrity: sha512-aafbuAQOTEeWmA7wtcL94w6I89EgLD7F+IlWkr596wYxeb0oveWDO5dQpv85YP0CGbxXT/qXBIeV6IYLcoZ2uA==} dev: true - /ts-pnp@1.2.0(typescript@5.3.3): + /ts-pnp@1.2.0(typescript@5.4.5): resolution: {integrity: sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw==} engines: {node: '>=6'} peerDependencies: @@ -13165,7 +13103,7 @@ packages: typescript: optional: true dependencies: - typescript: 5.3.3 + typescript: 5.4.5 dev: true /tsconfck@3.0.2(typescript@5.4.5): @@ -13215,16 +13153,6 @@ packages: /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - /tsutils@3.21.0(typescript@5.3.3): - resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} - engines: {node: '>= 6'} - peerDependencies: - typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' - dependencies: - tslib: 1.14.1 - typescript: 5.3.3 - dev: true - /tsutils@3.21.0(typescript@5.4.5): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -13401,11 +13329,13 @@ packages: /typescript@5.3.3: resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} engines: {node: '>=14.17'} + hasBin: true dev: true /typescript@5.4.5: resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} engines: {node: '>=14.17'} + hasBin: true dev: true /ufo@1.5.4: @@ -13415,6 +13345,7 @@ packages: /uglify-js@3.17.4: resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} engines: {node: '>=0.8.0'} + hasBin: true requiresBuild: true dev: true optional: true diff --git a/turbo.json b/turbo.json index 807e3247..9bbc6961 100644 --- a/turbo.json +++ b/turbo.json @@ -1,6 +1,7 @@ { "$schema": "https://turbo.build/schema.json", "ui": "tui", + "globalEnv": ["NEXT_PUBLIC_DEV_BASE_URL", "NEXT_PUBLIC_PROD_BASE_URL"], "tasks": { "build": { "dependsOn": ["^build"],