···1-import { Database as SqliteDb } from "bun:sqlite";
2import {
3 Kysely,
4 type Migration,
5 type MigrationProvider,
6 Migrator,
07} from "kysely";
8-import { BunSqliteDialect } from "kysely-bun-sqlite";
910// Types
11···7980export const createDb = (location: string): Database => {
81 return new Kysely<DatabaseSchema>({
82- dialect: new BunSqliteDialect({
83 database: new SqliteDb(location),
84 }),
85 });
···1+import SqliteDb from "better-sqlite3";
2import {
3 Kysely,
4 type Migration,
5 type MigrationProvider,
6 Migrator,
7+ SqliteDialect,
8} from "kysely";
0910// Types
11···7980export const createDb = (location: string): Database => {
81 return new Kysely<DatabaseSchema>({
82+ dialect: new SqliteDialect({
83 database: new SqliteDb(location),
84 }),
85 });
+1
apps/api/src/index.ts
···24import googledrive from "./googledrive/app";
25import { env } from "./lib/env";
26import { requestCounter, requestDuration } from "./metrics";
027import albumTracks from "./schema/album-tracks";
28import albums from "./schema/albums";
29import artistTracks from "./schema/artist-tracks";
···24import googledrive from "./googledrive/app";
25import { env } from "./lib/env";
26import { requestCounter, requestDuration } from "./metrics";
27+import "./profiling";
28import albumTracks from "./schema/album-tracks";
29import albums from "./schema/albums";
30import artistTracks from "./schema/artist-tracks";
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskyApikeyDefs from "./defs";
1112-export type QueryParams = {};
1314export interface InputSchema {
15 /** The name of the API key. */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskyApikeyDefs from "./defs";
1112+export type QueryParams = {}
1314export interface InputSchema {
15 /** The name of the API key. */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskyApikeyDefs from "./defs";
1112-export type QueryParams = {};
1314export interface InputSchema {
15 /** The ID of the API key to update. */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskyApikeyDefs from "./defs";
1112+export type QueryParams = {}
1314export interface InputSchema {
15 /** The ID of the API key to update. */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskyShoutDefs from "../shout/defs";
1112-export type QueryParams = {};
1314export interface InputSchema {
15 /** The unique identifier of the shout to dislike */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskyShoutDefs from "../shout/defs";
1112+export type QueryParams = {}
1314export interface InputSchema {
15 /** The unique identifier of the shout to dislike */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskySongDefs from "../song/defs";
1112-export type QueryParams = {};
1314export interface InputSchema {
15 /** The unique identifier of the song to dislike */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskySongDefs from "../song/defs";
1112+export type QueryParams = {}
1314export interface InputSchema {
15 /** The unique identifier of the song to dislike */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskyShoutDefs from "../shout/defs";
1112-export type QueryParams = {};
1314export interface InputSchema {
15 /** The unique identifier of the shout to like */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskyShoutDefs from "../shout/defs";
1112+export type QueryParams = {}
1314export interface InputSchema {
15 /** The unique identifier of the shout to like */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskySongDefs from "../song/defs";
1112-export type QueryParams = {};
1314export interface InputSchema {
15 /** The unique identifier of the song to like */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskySongDefs from "../song/defs";
1112+export type QueryParams = {}
1314export interface InputSchema {
15 /** The unique identifier of the song to like */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskyScrobbleDefs from "./defs";
1112-export type QueryParams = {};
1314export interface InputSchema {
15 /** The title of the track being scrobbled */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskyScrobbleDefs from "./defs";
1112+export type QueryParams = {}
1314export interface InputSchema {
15 /** The title of the track being scrobbled */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskyShoutDefs from "./defs";
1112-export type QueryParams = {};
1314export interface InputSchema {
15 /** The content of the shout */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskyShoutDefs from "./defs";
1112+export type QueryParams = {}
1314export interface InputSchema {
15 /** The content of the shout */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskyShoutDefs from "./defs";
1112-export type QueryParams = {};
1314export interface InputSchema {
15 /** The unique identifier of the shout to reply to */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskyShoutDefs from "./defs";
1112+export type QueryParams = {}
1314export interface InputSchema {
15 /** The unique identifier of the shout to reply to */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskyShoutDefs from "./defs";
1112-export type QueryParams = {};
1314export interface InputSchema {
15 /** The unique identifier of the shout to report */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskyShoutDefs from "./defs";
1112+export type QueryParams = {}
1314export interface InputSchema {
15 /** The unique identifier of the shout to report */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskySongDefs from "./defs";
1112-export type QueryParams = {};
1314export interface InputSchema {
15 /** The title of the song */
···9import type { HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
10import type * as AppRockskySongDefs from "./defs";
1112+export type QueryParams = {}
1314export interface InputSchema {
15 /** The title of the song */
···8import { CID } from "multiformats/cid";
9import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
1011-export type QueryParams = {};
1213export type InputSchema = undefined;
14export type HandlerInput = undefined;
···8import { CID } from "multiformats/cid";
9import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
1011+export type QueryParams = {}
1213export type InputSchema = undefined;
14export type HandlerInput = undefined;
···8import { CID } from "multiformats/cid";
9import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
1011-export type QueryParams = {};
1213export type InputSchema = undefined;
14export type HandlerInput = undefined;
···8import { CID } from "multiformats/cid";
9import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
1011+export type QueryParams = {}
1213export type InputSchema = undefined;
14export type HandlerInput = undefined;
···8import { CID } from "multiformats/cid";
9import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
1011-export type QueryParams = {};
1213export type InputSchema = undefined;
14export type HandlerInput = undefined;
···8import { CID } from "multiformats/cid";
9import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
1011+export type QueryParams = {}
1213export type InputSchema = undefined;
14export type HandlerInput = undefined;
···8import { CID } from "multiformats/cid";
9import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
1011-export type QueryParams = {};
1213export type InputSchema = undefined;
14export type HandlerInput = undefined;
···8import { CID } from "multiformats/cid";
9import { type HandlerAuth, HandlerPipeThrough } from "@atproto/xrpc-server";
1011+export type QueryParams = {}
1213export type InputSchema = undefined;
14export type HandlerInput = undefined;