🚨 fix: resolve linting type error
This commit is contained in:
0
.github/workflows/ci.yaml
vendored
Normal file
0
.github/workflows/ci.yaml
vendored
Normal file
@ -7,7 +7,7 @@ async function main() {
|
|||||||
console.log("🔌 Connecting to database...");
|
console.log("🔌 Connecting to database...");
|
||||||
|
|
||||||
const userSystemSeedResult = await userSystemSeed();
|
const userSystemSeedResult = await userSystemSeed();
|
||||||
const userRoleSeedResult = await userRoleSeed(userSystemSeedResult.id);
|
await userRoleSeed(userSystemSeedResult.id);
|
||||||
|
|
||||||
console.log("🌳 All seeds completed");
|
console.log("🌳 All seeds completed");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,7 +50,7 @@ try {
|
|||||||
|
|
||||||
// Extract the key and the remainder after "="
|
// Extract the key and the remainder after "="
|
||||||
const key = line.substring(0, delimiterIndex).trim();
|
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)
|
// Attempt to separate value and inline comment (if any)
|
||||||
let value = remainder;
|
let value = remainder;
|
||||||
|
|||||||
@ -14,7 +14,7 @@ for (const remote of remotes) {
|
|||||||
try {
|
try {
|
||||||
execSync(`git push ${remote} main`, { stdio: "inherit" });
|
execSync(`git push ${remote} main`, { stdio: "inherit" });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(`❌ Failed to push to ${remote}`);
|
console.error(`❌ Failed to push to ${remote}`, err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
import { generateUUIDv7 } from "./uuidv7";
|
import { generateUUIDv7 } from "./uuidv7";
|
||||||
|
|
||||||
function createManyWithUUID<T extends { id?: string }>(items: T[]): T[] {
|
export const createManyWithUUID = <T extends { id?: string }>(
|
||||||
|
items: T[],
|
||||||
|
): T[] => {
|
||||||
return items.map((i) => ({
|
return items.map((i) => ({
|
||||||
...i,
|
...i,
|
||||||
id: i.id ?? generateUUIDv7(),
|
id: i.id ?? generateUUIDv7(),
|
||||||
}));
|
}));
|
||||||
}
|
};
|
||||||
|
|||||||
@ -12,7 +12,7 @@ async function bootstrap() {
|
|||||||
sentryInit();
|
sentryInit();
|
||||||
|
|
||||||
console.log("\x1b[1m\x1b[33m🚀 Starting backend services...\x1b[0m");
|
console.log("\x1b[1m\x1b[33m🚀 Starting backend services...\x1b[0m");
|
||||||
const app = new Elysia()
|
new Elysia()
|
||||||
.use(middleware)
|
.use(middleware)
|
||||||
.use(routes)
|
.use(routes)
|
||||||
.listen(process.env.APP_PORT || 3000);
|
.listen(process.env.APP_PORT || 3000);
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import Elysia, { Context } from "elysia";
|
import Elysia from "elysia";
|
||||||
import { returnErrorResponse } from "../../helpers/callback/httpResponse";
|
import { returnErrorResponse } from "../../helpers/callback/httpResponse";
|
||||||
|
|
||||||
export const appAccessTokenMiddleware = () =>
|
export const appAccessTokenMiddleware = () =>
|
||||||
|
|||||||
Reference in New Issue
Block a user