From 8d105f07bcf7f96ab5ba4e9f3a771ebbb72fab26 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 25 Feb 2022 04:48:23 +0100 Subject: [PATCH] chore: Improve formatting --- src/interfaces/file.ts | 12 ++++++------ src/interfaces/pack.ts | 2 +- src/services/pack_service.ts | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/interfaces/file.ts b/src/interfaces/file.ts index 41b57b1..b631129 100644 --- a/src/interfaces/file.ts +++ b/src/interfaces/file.ts @@ -1,6 +1,6 @@ -interface File { - path: string; - name: string; -} - -export default File; +interface File { + path: string; + name: string; +} + +export default File; diff --git a/src/interfaces/pack.ts b/src/interfaces/pack.ts index 7840429..9781495 100644 --- a/src/interfaces/pack.ts +++ b/src/interfaces/pack.ts @@ -1,4 +1,4 @@ -import File from './file'; +import File from "./file"; interface Pack { name: string; diff --git a/src/services/pack_service.ts b/src/services/pack_service.ts index 24dcbbd..b108826 100644 --- a/src/services/pack_service.ts +++ b/src/services/pack_service.ts @@ -2,10 +2,10 @@ import Pack from "../interfaces/pack"; import File from "../interfaces/file"; import fs from "fs"; import * as fsWalk from "@nodelib/fs.walk"; -import os from 'os'; +import os from "os"; import { resolve } from "path/posix"; -const PACK_BASE_PATH =`${os.homedir()}/beatpacks`; +const PACK_BASE_PATH = `${os.homedir()}/beatpacks`; export default class PackService { private static packList: Pack[] = []; @@ -15,7 +15,7 @@ export default class PackService { public static getInitialList = async (): Promise => { let packs = await fs.readdirSync(PACK_BASE_PATH, { withFileTypes: true }); packs = packs.filter((pack) => pack.isDirectory()); - + PackService.packList = await Promise.all( packs.map((pack) => PackService.getPackInfo(pack.name)) ); @@ -38,7 +38,7 @@ export default class PackService { packFiles.map(async (file) => { files.push({ path: file.path, - name: file.name + name: file.name, }); if (file.name === "bpm.txt") {