Migrate Synapsis to embedded Turso
CI / smoke (push) Has been cancelled

This commit is contained in:
2026-07-14 15:50:12 -07:00
parent b4a9d82d05
commit 60f7dba46c
184 changed files with 8375 additions and 53945 deletions
+5 -5
View File
@@ -89,7 +89,7 @@ async function loadSessionsByTokens(tokens: string[]): Promise<SessionRecord[]>
}
const sessionRecords = await db.query.sessions.findMany({
where: inArray(sessions.token, uniqueTokens),
where: { token: { in: uniqueTokens } },
with: {
user: true,
},
@@ -296,7 +296,7 @@ export async function registerUser(
// Check if handle is taken
const existingHandle = await db.query.users.findFirst({
where: eq(users.handle, handle.toLowerCase()),
where: { handle: handle.toLowerCase() },
});
if (existingHandle) {
@@ -305,7 +305,7 @@ export async function registerUser(
// Check if email is taken
const existingEmail = await db.query.users.findFirst({
where: eq(users.email, email.toLowerCase()),
where: { email: email.toLowerCase() },
});
if (existingEmail) {
@@ -339,7 +339,7 @@ export async function registerUser(
const did = generateDID(publicKey);
const passwordHash = await hashPassword(password);
const nodeDomain = process.env.NEXT_PUBLIC_NODE_DOMAIN || 'localhost:3000';
const nodeDomain = process.env.NEXT_PUBLIC_NODE_DOMAIN || 'localhost:43821';
// Generate avatar and upload to user's S3 storage
const fullHandle = `${handle.toLowerCase()}@${nodeDomain}`;
@@ -393,7 +393,7 @@ export async function authenticateUser(
password: string
): Promise<typeof users.$inferSelect> {
const user = await db.query.users.findFirst({
where: eq(users.email, email.toLowerCase()),
where: { email: email.toLowerCase() },
});
if (!user || !user.passwordHash) {
+1 -1
View File
@@ -26,7 +26,7 @@ interface RemoteIdentity {
export async function lookupRemoteKey(did: string): Promise<string> {
// 1. Check Cache
const cached = await db.query.remoteIdentityCache.findFirst({
where: eq(remoteIdentityCache.did, did),
where: { did: did },
});
const now = new Date();
+1 -1
View File
@@ -96,7 +96,7 @@ export async function verifyUserAction(signedAction: SignedAction): Promise<{
// 3. FETCH USER & KEY
const user = await db.query.users.findFirst({
where: eq(users.did, payload.did),
where: { did: payload.did },
});
if (!user) {