reworked html serving, added new permissions for api/auth, updated adapters

This commit is contained in:
dswbx
2024-11-23 11:21:09 +01:00
parent 6077f0e64f
commit 2433833ad0
30 changed files with 418 additions and 298 deletions

View File

@@ -42,6 +42,7 @@ export type DbFunctions = {
};
export abstract class Connection {
cls = "bknd:connection";
kysely: Kysely<any>;
constructor(
@@ -52,6 +53,15 @@ export abstract class Connection {
this.kysely = kysely;
}
/**
* This is a helper function to manage Connection classes
* coming from different places
* @param conn
*/
static isConnection(conn: any): conn is Connection {
return conn?.cls === "bknd:connection";
}
getIntrospector(): ConnectionIntrospector {
return this.kysely.introspection as ConnectionIntrospector;
}