From e91fb1688db5e7ac4210124d5ddfc40537f614c0 Mon Sep 17 00:00:00 2001 From: James Cook Date: Sun, 16 Apr 2023 21:06:10 +0100 Subject: [PATCH] feat: restructure src/ --- src/{ => core}/baseClient.ts | 4 ++-- src/{ => core}/parentClient.ts | 6 +++--- src/{ => core}/studentClient.ts | 4 ++-- src/index.ts | 4 ++-- src/{ => utils}/consts.ts | 0 src/{ => utils}/utils.ts | 0 6 files changed, 9 insertions(+), 9 deletions(-) rename src/{ => core}/baseClient.ts (99%) rename src/{ => core}/parentClient.ts (94%) rename src/{ => core}/studentClient.ts (94%) rename src/{ => utils}/consts.ts (100%) rename src/{ => utils}/utils.ts (100%) diff --git a/src/baseClient.ts b/src/core/baseClient.ts similarity index 99% rename from src/baseClient.ts rename to src/core/baseClient.ts index fae6b4c..6a301ec 100644 --- a/src/baseClient.ts +++ b/src/core/baseClient.ts @@ -16,8 +16,8 @@ import type { GetStudentInfoResponse, HomeworksResponse, LessonsResponse, -} from "./types.js"; -import { PING_INTERVAL } from "./consts.js"; +} from "../types.js"; +import { PING_INTERVAL } from "../utils/consts.js"; /** * Shared client for both parent and student. This is not exported and should not be used directly diff --git a/src/parentClient.ts b/src/core/parentClient.ts similarity index 94% rename from src/parentClient.ts rename to src/core/parentClient.ts index 0d441fd..67dff45 100644 --- a/src/parentClient.ts +++ b/src/core/parentClient.ts @@ -1,9 +1,9 @@ import ky from "ky-universal"; -import type { GetPupilsResponse } from "./types.js"; +import type { GetPupilsResponse } from "../types.js"; import { BaseClient } from "./baseClient.js"; -import { API_BASE_PARENT, BASE_URL } from "./consts.js"; -import { parseCookies } from "./utils.js"; +import { API_BASE_PARENT, BASE_URL } from "../utils/consts.js"; +import { parseCookies } from "../utils/utils.js"; /** * Parent Client */ diff --git a/src/studentClient.ts b/src/core/studentClient.ts similarity index 94% rename from src/studentClient.ts rename to src/core/studentClient.ts index b6e3d59..750c9b9 100644 --- a/src/studentClient.ts +++ b/src/core/studentClient.ts @@ -1,6 +1,6 @@ -import { API_BASE_STUDENT, BASE_URL } from "./consts.js"; +import { API_BASE_STUDENT, BASE_URL } from "../utils/consts.js"; import { BaseClient } from "./baseClient.js"; -import { parseCookies } from "./utils.js"; +import { parseCookies } from "../utils/utils.js"; import ky from "ky-universal"; /** diff --git a/src/index.ts b/src/index.ts index d3bf997..97b2b06 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ -export * from "./studentClient.js"; -export * from "./parentClient.js"; +export * from "./core/studentClient.js"; +export * from "./core/parentClient.js"; export { Student, ActivityPoint, diff --git a/src/consts.ts b/src/utils/consts.ts similarity index 100% rename from src/consts.ts rename to src/utils/consts.ts diff --git a/src/utils.ts b/src/utils/utils.ts similarity index 100% rename from src/utils.ts rename to src/utils/utils.ts