diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..e69de29 diff --git a/prisma/seed/index.ts b/prisma/seed/index.ts index 6302203..7478bfb 100644 --- a/prisma/seed/index.ts +++ b/prisma/seed/index.ts @@ -7,7 +7,7 @@ async function main() { console.log("🔌 Connecting to database..."); const userSystemSeedResult = await userSystemSeed(); - const userRoleSeedResult = await userRoleSeed(userSystemSeedResult.id); + await userRoleSeed(userSystemSeedResult.id); console.log("🌳 All seeds completed"); } diff --git a/scripts/create-example-env.ts b/scripts/create-example-env.ts index c7d7dea..2b351e3 100644 --- a/scripts/create-example-env.ts +++ b/scripts/create-example-env.ts @@ -50,7 +50,7 @@ try { // Extract the key and the remainder after "=" const key = line.substring(0, delimiterIndex).trim(); - let remainder = line.substring(delimiterIndex + 1); + const remainder = line.substring(delimiterIndex + 1); // Attempt to separate value and inline comment (if any) let value = remainder; diff --git a/scripts/git-multipush.example.ts b/scripts/git-multipush.example.ts index 937ceed..485e606 100644 --- a/scripts/git-multipush.example.ts +++ b/scripts/git-multipush.example.ts @@ -14,7 +14,7 @@ for (const remote of remotes) { try { execSync(`git push ${remote} main`, { stdio: "inherit" }); } catch (err) { - console.error(`❌ Failed to push to ${remote}`); + console.error(`❌ Failed to push to ${remote}`, err); } } diff --git a/src/helpers/databases/createManyWithUUID.ts b/src/helpers/databases/createManyWithUUID.ts index a2da1b8..e219442 100644 --- a/src/helpers/databases/createManyWithUUID.ts +++ b/src/helpers/databases/createManyWithUUID.ts @@ -1,8 +1,10 @@ import { generateUUIDv7 } from "./uuidv7"; -function createManyWithUUID(items: T[]): T[] { +export const createManyWithUUID = ( + items: T[], +): T[] => { return items.map((i) => ({ ...i, id: i.id ?? generateUUIDv7(), })); -} +}; diff --git a/src/index.ts b/src/index.ts index 01a69cd..aa3f953 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,7 +12,7 @@ async function bootstrap() { sentryInit(); console.log("\x1b[1m\x1b[33m🚀 Starting backend services...\x1b[0m"); - const app = new Elysia() + new Elysia() .use(middleware) .use(routes) .listen(process.env.APP_PORT || 3000); diff --git a/src/middleware/global/appAccessToken.middleware.ts b/src/middleware/global/appAccessToken.middleware.ts index 459d137..35474f6 100644 --- a/src/middleware/global/appAccessToken.middleware.ts +++ b/src/middleware/global/appAccessToken.middleware.ts @@ -1,4 +1,4 @@ -import Elysia, { Context } from "elysia"; +import Elysia from "elysia"; import { returnErrorResponse } from "../../helpers/callback/httpResponse"; export const appAccessTokenMiddleware = () =>