-
-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove redundant code from crawler worker and refactor hand…
…ling of asset types (#253) * refactoring asset types Extracted out functions to silently delete assets and to update them after crawling Generalized the mapping of assets to bookmark fields to make extending them easier * revert silentDeleteAsset and hide better-sqlite3 --------- Co-authored-by: MohamedBassem <[email protected]>
- Loading branch information
1 parent
e107f8b
commit ccbff18
Showing
3 changed files
with
80 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,17 @@ | ||
import Database from "better-sqlite3"; | ||
import { ExtractTablesWithRelations } from "drizzle-orm"; | ||
import { SQLiteTransaction } from "drizzle-orm/sqlite-core"; | ||
|
||
import * as schema from "./schema"; | ||
|
||
export { db } from "./drizzle"; | ||
export * as schema from "./schema"; | ||
export { SqliteError } from "better-sqlite3"; | ||
|
||
// This is exported here to avoid leaking better-sqlite types outside of this package. | ||
export type HoarderDBTransaction = SQLiteTransaction< | ||
"sync", | ||
Database.RunResult, | ||
typeof schema, | ||
ExtractTablesWithRelations<typeof schema> | ||
>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters