chore: More turbo fixes

This commit is contained in:
MohamedBassem
2025-07-27 14:54:29 +01:00
parent 8f1cb065d7
commit 77ae89b222
28 changed files with 108 additions and 58 deletions

View File

@@ -1,5 +1,3 @@
pnpm typecheck
pnpm format --check
pnpm lint
pnpm preflight
pnpm exec sherif
pnpm run --filter @karakeep/open-api check

View File

@@ -1,13 +1,13 @@
{
"name": "browser-extension",
"name": "@karakeep/browser-extension",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"format": "prettier .",
"format:fix": "prettier . --write",
"format": "prettier . --cache --check",
"format:fix": "prettier . --cache --write",
"lint": "oxlint .",
"lint:fix": "oxlint . --fix",
"preview": "vite preview",

View File

@@ -18,7 +18,8 @@
"strict": true,
"noUnusedLocals": false,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
},
"include": ["src", "vite.config.ts"],
"exclude": ["node_modules"]

View File

@@ -36,8 +36,8 @@
"run": "tsx src/index.ts",
"lint": "oxlint .",
"lint:fix": "oxlint . --fix",
"format": "prettier . --ignore-path ../../.prettierignore",
"format:fix": "prettier . --write --ignore-path ../../.prettierignore",
"format": "prettier . --cache --ignore-path ../../.prettierignore --check",
"format:fix": "prettier . --cache --write --ignore-path ../../.prettierignore",
"typecheck": "tsc --noEmit"
},
"repository": {

View File

@@ -10,8 +10,8 @@
"preview": "vite preview",
"lint": "oxlint .",
"lint:fix": "oxlint . --fix",
"format": "prettier . --ignore-path ../../.prettierignore",
"format:fix": "prettier . --ignore-path ../../.prettierignore --write",
"format": "prettier . --cache --ignore-path ../../.prettierignore --check",
"format:fix": "prettier . --cache --ignore-path ../../.prettierignore --write",
"typecheck": "tsc --noEmit"
},
"dependencies": {

View File

@@ -5,7 +5,8 @@
"baseUrl": ".",
"paths": {
"@/*": ["./*"]
}
},
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "vite.config.ts"],
"exclude": ["node_modules"]

View File

@@ -27,8 +27,8 @@
"run": "tsx src/index.ts",
"lint": "oxlint .",
"lint:fix": "oxlint . --fix",
"format": "prettier . --ignore-path ../../.prettierignore",
"format:fix": "prettier . --write --ignore-path ../../.prettierignore",
"format": "prettier . --cache --ignore-path ../../.prettierignore --check",
"format:fix": "prettier . --cache --write --ignore-path ../../.prettierignore",
"typecheck": "tsc --noEmit"
},
"repository": {

View File

@@ -9,8 +9,8 @@
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"format": "prettier .",
"format:fix": "prettier . --write",
"format": "prettier . --cache --check",
"format:fix": "prettier . --cache --write",
"lint": "oxlint .",
"lint:fix": "oxlint . --fix",
"typecheck": "tsc --noEmit"

View File

@@ -13,8 +13,8 @@
"lint:fix": "oxlint . --fix",
"test": "vitest",
"typecheck": "tsc --noEmit",
"format": "prettier --check . --ignore-path ../../.gitignore",
"format:fix": "prettier --write . --ignore-path ../../.gitignore"
"format": "prettier --cache --check . --ignore-path ../../.gitignore",
"format:fix": "prettier --cache --write . --ignore-path ../../.gitignore"
},
"dependencies": {
"@auth/drizzle-adapter": "~1.5.0",

View File

@@ -10,7 +10,8 @@
],
"paths": {
"@/*": ["./*"]
}
},
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules", ".next"]

View File

@@ -61,8 +61,8 @@
"build:watch": "tsdown --watch",
"lint": "oxlint .",
"lint:fix": "oxlint . --fix",
"format": "prettier . --ignore-path ../../.prettierignore",
"format:fix": "prettier . --ignore-path ../../.prettierignore --write",
"format": "prettier . --cache --ignore-path ../../.prettierignore --check",
"format:fix": "prettier . --cache --ignore-path ../../.prettierignore --write",
"typecheck": "tsc --noEmit"
},
"prettier": "@karakeep/prettier-config"

View File

@@ -14,11 +14,13 @@
"workers": "pnpm --filter @karakeep/workers run start",
"web": "pnpm --filter @karakeep/web run dev",
"prepare": "husky",
"format": "turbo --no-daemon format --continue -- --cache-location node_modules/.cache/.prettiercache",
"format:fix": "turbo --no-daemon format --continue -- --write --cache-location node_modules/.cache/.prettiercache",
"lint": "turbo --no-daemon lint --continue --",
"lint:fix": "turbo --no-daemon lint --continue -- --fix",
"typecheck": "turbo --no-daemon typecheck"
"format": "turbo --no-daemon format --continue",
"format:fix": "turbo --no-daemon format:fix --continue",
"lint": "turbo --no-daemon lint --continue",
"lint:fix": "turbo --no-daemon lint:fix --continue",
"typecheck": "turbo --no-daemon typecheck",
"preflight": "turbo run --no-daemon typecheck lint format",
"preflight:fix": "turbo run --no-daemon typecheck lint:fix format:fix"
},
"dependencies": {
"husky": "^9.0.11"

View File

@@ -6,8 +6,8 @@
"type": "module",
"scripts": {
"typecheck": "tsc --noEmit",
"format": "prettier . --ignore-path ../../.prettierignore",
"format:fix": "prettier . --write --ignore-path ../../.prettierignore",
"format": "prettier . --cache --ignore-path ../../.prettierignore --check",
"format:fix": "prettier . --cache --write --ignore-path ../../.prettierignore",
"lint": "oxlint .",
"lint:fix": "oxlint . --fix",
"test": "vitest"

View File

@@ -1,5 +1,7 @@
import "dotenv/config";
import type { Config } from "drizzle-kit";
import serverConfig from "@karakeep/shared/config";
const databaseURL = serverConfig.dataDir

View File

@@ -1,24 +1,26 @@
import "dotenv/config";
import { drizzle } from "drizzle-orm/better-sqlite3";
import Database from "better-sqlite3";
import * as schema from "./schema";
import { migrate } from "drizzle-orm/better-sqlite3/migrator";
import path from "path";
import Database from "better-sqlite3";
import { drizzle } from "drizzle-orm/better-sqlite3";
import { migrate } from "drizzle-orm/better-sqlite3/migrator";
import serverConfig from "@karakeep/shared/config";
import dbConfig from "./drizzle.config";
import * as schema from "./schema";
const sqlite = new Database(dbConfig.dbCredentials.url);
if (serverConfig.database.walMode) {
sqlite.pragma('journal_mode = WAL');
sqlite.pragma('synchronous = NORMAL');
sqlite.pragma("journal_mode = WAL");
sqlite.pragma("synchronous = NORMAL");
} else {
sqlite.pragma('journal_mode = DELETE');
sqlite.pragma("journal_mode = DELETE");
}
sqlite.pragma('cache_size = -65536');
sqlite.pragma('foreign_keys = ON');
sqlite.pragma('temp_store = MEMORY');
sqlite.pragma("cache_size = -65536");
sqlite.pragma("foreign_keys = ON");
sqlite.pragma("temp_store = MEMORY");
export const db = drizzle(sqlite, { schema });
export type DB = typeof db;

View File

@@ -1,4 +1,5 @@
import { db } from "./drizzle";
import { migrate } from "drizzle-orm/better-sqlite3/migrator";
import { db } from "./drizzle";
migrate(db, { migrationsFolder: "./drizzle" });

View File

@@ -9,7 +9,11 @@
"typecheck": "tsc --noEmit",
"migrate": "tsx migrate.ts",
"generate": "drizzle-kit generate",
"studio": "drizzle-kit studio"
"studio": "drizzle-kit studio",
"format": "prettier . --cache --ignore-path ../../.prettierignore --check",
"format:fix": "prettier . --cache --write --ignore-path ../../.prettierignore",
"lint": "oxlint .",
"lint:fix": "oxlint . --fix"
},
"dependencies": {
"@auth/core": "^0.27.0",

View File

@@ -40,7 +40,9 @@ export const users = sqliteTable("user", {
role: text("role", { enum: ["admin", "user"] }).default("user"),
bookmarkQuota: integer("bookmarkQuota"),
storageQuota: integer("storageQuota"),
browserCrawlingEnabled: integer("browserCrawlingEnabled", { mode: "boolean" }),
browserCrawlingEnabled: integer("browserCrawlingEnabled", {
mode: "boolean",
}),
});
export const accounts = sqliteTable(

View File

@@ -6,8 +6,8 @@
"type": "module",
"scripts": {
"typecheck": "tsc --noEmit",
"format": "prettier . --ignore-path ../../.prettierignore",
"format:fix": "prettier . --write --ignore-path ../../.prettierignore",
"format": "prettier . --cache --ignore-path ../../.prettierignore --check",
"format:fix": "prettier . --cache --write --ignore-path ../../.prettierignore",
"lint": "oxlint .",
"lint:fix": "oxlint . --fix",
"test": "vitest run",

View File

@@ -18,8 +18,8 @@
"typecheck": "tsc --noEmit",
"check": "tsx index.ts check",
"generate": "tsx index.ts",
"format": "prettier . --ignore-path ../../.prettierignore",
"format:fix": "prettier . --write --ignore-path ../../.prettierignore",
"format": "prettier . --cache --ignore-path ../../.prettierignore --check",
"format:fix": "prettier . --cache --write --ignore-path ../../.prettierignore",
"lint": "oxlint .",
"lint:fix": "oxlint . --fix"
},

View File

@@ -31,8 +31,8 @@
"run": "tsx src/index.ts",
"lint": "oxlint .",
"lint:fix": "oxlint . --fix",
"format": "prettier . --ignore-path ../../.prettierignore",
"format:fix": "prettier . --write --ignore-path ../../.prettierignore",
"format": "prettier . --cache --ignore-path ../../.prettierignore --check",
"format:fix": "prettier . --cache --write --ignore-path ../../.prettierignore",
"typecheck": "tsc --noEmit"
},
"repository": {

View File

@@ -26,8 +26,10 @@
},
"scripts": {
"typecheck": "tsc --noEmit",
"format": "prettier . --ignore-path ../../.prettierignore",
"lint": "oxlint ."
"format": "prettier . --cache --ignore-path ../../.prettierignore --check",
"format:fix": "prettier . --cache --write --ignore-path ../../.prettierignore",
"lint": "oxlint .",
"lint:fix": "oxlint . --fix"
},
"prettier": "@karakeep/prettier-config"
}

View File

@@ -29,8 +29,8 @@
},
"scripts": {
"typecheck": "tsc --noEmit",
"format": "prettier . --ignore-path ../../.prettierignore",
"format:fix": "prettier . --write --ignore-path ../../.prettierignore",
"format": "prettier . --cache --ignore-path ../../.prettierignore --check",
"format:fix": "prettier . --cache --write --ignore-path ../../.prettierignore",
"lint": "oxlint .",
"lint:fix": "oxlint . --fix",
"test": "vitest"

View File

@@ -6,8 +6,8 @@
"type": "module",
"scripts": {
"typecheck": "tsc --noEmit",
"format": "prettier . --ignore-path ../../.prettierignore",
"format:fix": "prettier . --write --ignore-path ../../.prettierignore",
"format": "prettier . --cache --ignore-path ../../.prettierignore --check",
"format:fix": "prettier . --cache --write --ignore-path ../../.prettierignore",
"lint": "oxlint .",
"lint:fix": "oxlint . --fix",
"test": "vitest"

21
pnpm-lock.yaml generated
View File

@@ -960,9 +960,18 @@ importers:
'@karakeep/trpc':
specifier: workspace:*
version: link:../trpc
'@trpc/server':
specifier: ^11.4.3
version: 11.4.3(typescript@5.8.3)
drizzle-orm:
specifier: ^0.44.2
version: 0.44.2(@opentelemetry/api@1.9.0)(@types/better-sqlite3@7.6.13)(better-sqlite3@11.3.0)(gel@2.1.0)
hono:
specifier: ^4.7.10
version: 4.7.11
prom-client:
specifier: ^15.1.3
version: 15.1.3
rss:
specifier: ^1.2.2
version: 1.2.2
@@ -1046,9 +1055,15 @@ importers:
'@karakeep/trpc':
specifier: workspace:^0.1.0
version: link:../trpc
'@trpc/client':
specifier: ^11.4.3
version: 11.4.3(@trpc/server@11.4.3(typescript@5.8.3))(typescript@5.8.3)
superjson:
specifier: ^2.2.1
version: 2.2.1
zod:
specifier: ^3.24.2
version: 3.24.2
devDependencies:
'@karakeep/prettier-config':
specifier: workspace:^0.1.0
@@ -1167,6 +1182,9 @@ importers:
'@types/nodemailer':
specifier: ^6.4.17
version: 6.4.17
vite-tsconfig-paths:
specifier: ^4.3.1
version: 4.3.2(typescript@5.8.3)(vite@7.0.6(@types/node@22.15.30)(jiti@2.4.2)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.41.0)(tsx@4.20.3)(yaml@2.8.0))
vitest:
specifier: ^3.2.4
version: 3.2.4(@types/debug@4.1.12)(@types/node@22.15.30)(happy-dom@17.4.9)(jiti@2.4.2)(jsdom@26.1.0)(lightningcss@1.30.1)(sass@1.89.1)(terser@5.41.0)(tsx@4.20.3)(yaml@2.8.0)
@@ -1222,6 +1240,9 @@ importers:
drizzle-orm:
specifier: ^0.44.2
version: 0.44.2(@opentelemetry/api@1.9.0)(@types/better-sqlite3@7.6.13)(better-sqlite3@11.3.0)(gel@2.1.0)
liteque:
specifier: ^0.5.0
version: 0.5.0(@opentelemetry/api@1.9.0)(@types/better-sqlite3@7.6.13)(@types/react@19.1.8)(better-sqlite3@11.3.0)(react@18.3.1)
nodemailer:
specifier: ^7.0.4
version: 7.0.4

View File

@@ -8,7 +8,8 @@
},
"scripts": {
"clean": "rm -rf .turbo node_modules",
"format": "prettier --check . --ignore-path ../../.gitignore",
"format": "prettier . --cache --ignore-path ../../.prettierignore --check",
"format:fix": "prettier . --cache --write --ignore-path ../../.prettierignore",
"typecheck": "tsc --noEmit"
},
"dependencies": {

View File

@@ -11,8 +11,8 @@
"license": "MIT",
"scripts": {
"clean": "rm -rf .turbo node_modules",
"format": "prettier .",
"format:fix": "prettier . --write",
"format": "prettier . --cache --ignore-path ../../.prettierignore --check",
"format:fix": "prettier . --cache --write --ignore-path ../../.prettierignore",
"lint": "oxlint .",
"lint:fix": "oxlint . --fix",
"typecheck": "tsc --noEmit"

View File

@@ -19,7 +19,8 @@
"next-env.d.ts",
".expo/**",
".output/**",
".vercel/output/**"
".vercel/output/**",
"dist/**"
]
},
"dev": {
@@ -28,7 +29,13 @@
},
"format": {
"outputs": [
"node_modules/.cache/.prettiercache"
"node_modules/.cache/prettier/.prettier-cache"
],
"outputLogs": "new-only"
},
"format:fix": {
"outputs": [
"node_modules/.cache/prettier/.prettier-cache"
],
"outputLogs": "new-only"
},
@@ -37,6 +44,11 @@
"^topo"
]
},
"lint:fix": {
"dependsOn": [
"^topo"
]
},
"typecheck": {
"dependsOn": [
"^topo"