From 98f233e7f5ff0c32c72191536be6860d57333142 Mon Sep 17 00:00:00 2001 From: hansaskov Date: Wed, 25 Dec 2024 21:37:11 +0100 Subject: [PATCH] Bun format root directory --- services/backend/drizzle.config.ts | 22 ++--- services/backend/package.json | 88 +++++++++---------- .../microsoft-identity-association.json | 12 +-- services/backend/tsconfig.json | 46 +++++----- 4 files changed, 82 insertions(+), 86 deletions(-) diff --git a/services/backend/drizzle.config.ts b/services/backend/drizzle.config.ts index f00a83dd..4e739f25 100644 --- a/services/backend/drizzle.config.ts +++ b/services/backend/drizzle.config.ts @@ -1,14 +1,14 @@ -import { defineConfig } from 'drizzle-kit'; +import { defineConfig } from "drizzle-kit"; -if(!process.env.DATABASE_URL) { - throw Error("No Database url found in environment") +if (!process.env.DATABASE_URL) { + throw Error("No Database url found in environment"); } - + export default defineConfig({ - out: './src/db/migrations', - schema: './src/db/collections/index.ts', - dialect: 'postgresql', - dbCredentials: { - url: process.env.DATABASE_URL, - }, -}); \ No newline at end of file + out: "./src/db/migrations", + schema: "./src/db/collections/index.ts", + dialect: "postgresql", + dbCredentials: { + url: process.env.DATABASE_URL, + }, +}); diff --git a/services/backend/package.json b/services/backend/package.json index 8169c3b4..4809e5c4 100644 --- a/services/backend/package.json +++ b/services/backend/package.json @@ -1,45 +1,45 @@ { - "name": "backend", - "main": "./src/index.ts", - "module": "src/index.ts", - "type": "module", - "scripts": { - "dev": "bun --watch src/index.ts", - "build": "bun build src/index.ts --target bun --outdir ./dist", - "compile": "bun build src/index.ts --compile --minify --sourcemap --target bun --outfile backend", - "check": "bun x tsc --noEmit", - "preview": "NODE_ENV=production bun dist/index.js", - "format": "bun x @biomejs/biome format --write src", - "lint": "bun x @biomejs/biome check src", - "lint:fix": "bun x @biomejs/biome check src --write", - "db:generate": "bun x drizzle-kit generate", - "db:push": "bun x drizzle-kit push --verbose --strict", - "db:migrate": "bun x drizzle-kit migrate", - "db:check": "bun x drizzle-kit check", - "db:studio": "bun x --bun drizzle-kit studio" - }, - "dependencies": { - "@bogeychan/elysia-logger": "^0.1.6", - "@elysiajs/eden": "^1.1.3", - "@elysiajs/swagger": "^1.1.6", - "@oslojs/crypto": "^1.0.1", - "@oslojs/encoding": "^1.1.0", - "@sinclair/typebox": "0.32.34", - "arctic": "^2.3.3", - "drizzle-orm": "^0.38.2", - "drizzle-typebox": "0.1.1", - "elysia": "^1.1.26", - "nanoid": "^5.0.9", - "postgres": "^3.4.5" - }, - "devDependencies": { - "@biomejs/biome": "^1.9.4", - "@types/bun": "^1.1.14", - "@types/node": "^22.10.2", - "drizzle-kit": "^0.30.1", - "typescript": "^5.7.2" - }, - "overrides": { - "@sinclair/typebox": "0.32.34" - } -} \ No newline at end of file + "name": "backend", + "main": "./src/index.ts", + "module": "src/index.ts", + "type": "module", + "scripts": { + "dev": "bun --watch src/index.ts", + "build": "bun build src/index.ts --target bun --outdir ./dist", + "compile": "bun build src/index.ts --compile --minify --sourcemap --target bun --outfile backend", + "check": "bun x tsc --noEmit", + "preview": "NODE_ENV=production bun dist/index.js", + "format": "bun x @biomejs/biome format --write src", + "lint": "bun x @biomejs/biome check src", + "lint:fix": "bun x @biomejs/biome check src --write", + "db:generate": "bun x drizzle-kit generate", + "db:push": "bun x drizzle-kit push --verbose --strict", + "db:migrate": "bun x drizzle-kit migrate", + "db:check": "bun x drizzle-kit check", + "db:studio": "bun x --bun drizzle-kit studio" + }, + "dependencies": { + "@bogeychan/elysia-logger": "^0.1.6", + "@elysiajs/eden": "^1.1.3", + "@elysiajs/swagger": "^1.1.6", + "@oslojs/crypto": "^1.0.1", + "@oslojs/encoding": "^1.1.0", + "@sinclair/typebox": "0.32.34", + "arctic": "^2.3.3", + "drizzle-orm": "^0.38.2", + "drizzle-typebox": "0.1.1", + "elysia": "^1.1.26", + "nanoid": "^5.0.9", + "postgres": "^3.4.5" + }, + "devDependencies": { + "@biomejs/biome": "^1.9.4", + "@types/bun": "^1.1.14", + "@types/node": "^22.10.2", + "drizzle-kit": "^0.30.1", + "typescript": "^5.7.2" + }, + "overrides": { + "@sinclair/typebox": "0.32.34" + } +} diff --git a/services/backend/public/.well-known/microsoft-identity-association.json b/services/backend/public/.well-known/microsoft-identity-association.json index 6a4b1053..40105d35 100644 --- a/services/backend/public/.well-known/microsoft-identity-association.json +++ b/services/backend/public/.well-known/microsoft-identity-association.json @@ -1,7 +1,7 @@ { - "associatedApplications": [ - { - "applicationId": "d947007a-bd3d-41fa-a027-f63346796c51" - } - ] -} \ No newline at end of file + "associatedApplications": [ + { + "applicationId": "d947007a-bd3d-41fa-a027-f63346796c51" + } + ] +} diff --git a/services/backend/tsconfig.json b/services/backend/tsconfig.json index 1d85c8ec..70b6d85d 100644 --- a/services/backend/tsconfig.json +++ b/services/backend/tsconfig.json @@ -1,26 +1,22 @@ { - "compilerOptions": { - "lib": [ - "ESNext" - ], - "module": "ESNext", - "target": "ESNext", - "moduleResolution": "Bundler", - "esModuleInterop": true, - "strict": true, - "skipLibCheck": true, - "allowSyntheticDefaultImports": true, - "rootDir": "./src", - "noEmit": true, - "paths": { - "$auth/*": [ "./src/auth/*" ], - "$config/*": [ "./src/config/*" ], - "$db/*": [ "./src/db/*" ], - "$types/*": [ "./src/types/*" ], - "$utils/*": [ "./src/utils/*" ], - } - }, - "include": [ - "src" - ] -} \ No newline at end of file + "compilerOptions": { + "lib": ["ESNext"], + "module": "ESNext", + "target": "ESNext", + "moduleResolution": "Bundler", + "esModuleInterop": true, + "strict": true, + "skipLibCheck": true, + "allowSyntheticDefaultImports": true, + "rootDir": "./src", + "noEmit": true, + "paths": { + "$auth/*": ["./src/auth/*"], + "$config/*": ["./src/config/*"], + "$db/*": ["./src/db/*"], + "$types/*": ["./src/types/*"], + "$utils/*": ["./src/utils/*"] + } + }, + "include": ["src"] +}