initial commit
This commit is contained in:
commit
7e466e29d2
28 changed files with 17360 additions and 0 deletions
17
entrypoints/background.ts
Normal file
17
entrypoints/background.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { registerService } from "@webext-core/proxy-service";
|
||||
import { createTodosRepo } from "@/utils/todo-repo";
|
||||
import { createBlockedSitesRepo } from "@/utils/blocked-site-repo";
|
||||
import { BLOCKED_SITES_REPO_KEY, TODOS_REPO_KEY } from "@/utils/proxy-service-keys";
|
||||
import { openExtensionDatabase } from "@/utils/database";
|
||||
|
||||
export default defineBackground(() => {
|
||||
console.log('[ba-ka] starting let me focus service extension', { id: browser.runtime.id });
|
||||
|
||||
const idbProimise = openExtensionDatabase();
|
||||
|
||||
const todosRepo = createTodosRepo(idbProimise)
|
||||
registerService(TODOS_REPO_KEY, todosRepo)
|
||||
|
||||
const blockedSitesRepo = createBlockedSitesRepo(idbProimise)
|
||||
registerService(BLOCKED_SITES_REPO_KEY, blockedSitesRepo)
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue