From 62d3eba91d3694e2b1cb99e5a64b7ad4e74ea306 Mon Sep 17 00:00:00 2001 From: Ru Chern Chong Date: Fri, 22 Dec 2023 19:34:51 +0800 Subject: [PATCH] Refactor for consistency and better naming --- packages/core/src/updater.ts | 4 ++-- packages/core/src/{lib => utils}/downloadFile.ts | 0 packages/core/src/{lib => utils}/extractZipFile.ts | 0 packages/core/src/{lib => utils}/filterDataLast12Months.ts | 0 packages/core/src/{lib => utils}/sortByMake.ts | 0 5 files changed, 2 insertions(+), 2 deletions(-) rename packages/core/src/{lib => utils}/downloadFile.ts (100%) rename packages/core/src/{lib => utils}/extractZipFile.ts (100%) rename packages/core/src/{lib => utils}/filterDataLast12Months.ts (100%) rename packages/core/src/{lib => utils}/sortByMake.ts (100%) diff --git a/packages/core/src/updater.ts b/packages/core/src/updater.ts index 154e3cc..4bb4d7d 100644 --- a/packages/core/src/updater.ts +++ b/packages/core/src/updater.ts @@ -1,7 +1,7 @@ import fs from "fs/promises"; import * as d3 from "d3"; -import { downloadFile } from "./lib/downloadFile"; -import { extractZipFile } from "./lib/extractZipFile"; +import { downloadFile } from "./utils/downloadFile"; +import { extractZipFile } from "./utils/extractZipFile"; import db from "../../config/db"; const EXTRACT_PATH: string = "/tmp"; diff --git a/packages/core/src/lib/downloadFile.ts b/packages/core/src/utils/downloadFile.ts similarity index 100% rename from packages/core/src/lib/downloadFile.ts rename to packages/core/src/utils/downloadFile.ts diff --git a/packages/core/src/lib/extractZipFile.ts b/packages/core/src/utils/extractZipFile.ts similarity index 100% rename from packages/core/src/lib/extractZipFile.ts rename to packages/core/src/utils/extractZipFile.ts diff --git a/packages/core/src/lib/filterDataLast12Months.ts b/packages/core/src/utils/filterDataLast12Months.ts similarity index 100% rename from packages/core/src/lib/filterDataLast12Months.ts rename to packages/core/src/utils/filterDataLast12Months.ts diff --git a/packages/core/src/lib/sortByMake.ts b/packages/core/src/utils/sortByMake.ts similarity index 100% rename from packages/core/src/lib/sortByMake.ts rename to packages/core/src/utils/sortByMake.ts