Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/roamjsauth/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const logic = async ({
.from(oauthClients)
.innerJoin(apps, eq(apps.id, oauthClients.appId))
.where(and(eq(oauthClients.id, otp), eq(apps.code, service)));
// await cxn.end();
await cxn.end();
return { success: !!oauth };
};

Expand Down
2 changes: 1 addition & 1 deletion api/roamjsauth/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const logic = async ({
.from(oauthClients)
.innerJoin(apps, eq(apps.id, oauthClients.appId))
.where(and(eq(oauthClients.id, otp), eq(apps.code, service)));
// await cxn.end();
await cxn.end();
if (!oauth) return { code: 204 };
return { auth: oauth.secret };
};
Expand Down
2 changes: 1 addition & 1 deletion api/roamjsauth/put.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const logic = async ({
id: otp,
})
.onConflictDoUpdate({ target: oauthClients.id, set: { secret: auth } });
// await cxn.end();
await cxn.end();
return { success: true };
};

Expand Down
2 changes: 1 addition & 1 deletion data/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ resource "aws_s3_bucket_policy" "bucket_policy" {
role: (lambdaRoleMapping[lambdaPath] ?? lambdaRole).arn,
handler: `${functionNames[lambdaPath]}.handler`,
filename: dummyFile.outputPath,
runtime: "nodejs18.x",
runtime: "roamjs" in functionNames[lambdaPath] ? "nodejs20.x" : "nodejs18.x",
publish: false,
timeout: lambdaTimeouts[lambdaPath] ?? 60,
memorySize: 5120,
Expand Down
40 changes: 40 additions & 0 deletions patches/drizzle-orm+0.45.1.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,43 @@ index 15564ce..5578429 100644
}
export type MySQLWithReplicas<Q> = Q & {
$primary: Q;
diff --git a/node_modules/drizzle-orm/mysql-core/db.js b/node_modules/drizzle-orm/mysql-core/db.js
index cdb0cd1..35e3c6f 100644
--- a/node_modules/drizzle-orm/mysql-core/db.js
+++ b/node_modules/drizzle-orm/mysql-core/db.js
@@ -227,6 +227,9 @@ class MySqlDatabase {
execute(query) {
return this.session.execute(typeof query === "string" ? sql.raw(query) : query.getSQL());
}
+ async end() {
+ return await this.session.end();
+ }
transaction(transaction, config) {
return this.session.transaction(transaction, config);
}
diff --git a/node_modules/drizzle-orm/pg-core/db.d.ts b/node_modules/drizzle-orm/pg-core/db.d.ts
index 202f79f..016af70 100644
--- a/node_modules/drizzle-orm/pg-core/db.d.ts
+++ b/node_modules/drizzle-orm/pg-core/db.d.ts
@@ -279,6 +279,7 @@ export declare class PgDatabase<TQueryResult extends PgQueryResultHKT, TFullSche
protected authToken?: NeonAuthToken;
execute<TRow extends Record<string, unknown> = Record<string, unknown>>(query: SQLWrapper | string): PgRaw<PgQueryResultKind<TQueryResult, TRow>>;
transaction<T>(transaction: (tx: PgTransaction<TQueryResult, TFullSchema, TSchema>) => Promise<T>, config?: PgTransactionConfig): Promise<T>;
+ end(): Promise;
}
export type PgWithReplicas<Q> = Q & {
$primary: Q;
diff --git a/node_modules/drizzle-orm/pg-core/db.js b/node_modules/drizzle-orm/pg-core/db.js
index a0f5337..850c508 100644
--- a/node_modules/drizzle-orm/pg-core/db.js
+++ b/node_modules/drizzle-orm/pg-core/db.js
@@ -269,6 +269,9 @@ class PgDatabase {
refreshMaterializedView(view) {
return new PgRefreshMaterializedView(view, this.session, this.dialect);
}
+ async end() {
+ return await this.session.end();
+ }
authToken;
execute(query) {
const sequel = typeof query === "string" ? sql.raw(query) : query.getSQL();
Loading