@teamkeel/functions-runtime 0.273.6 → 0.273.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -3
- package/pnpm-lock.yaml +215 -813
- package/src/database.js +0 -15
package/src/database.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const { Kysely, PostgresDialect } = require("kysely");
|
|
2
2
|
const pg = require("pg");
|
|
3
|
-
const { DataApiDialect } = require("kysely-data-api");
|
|
4
|
-
const RDSDataService = require("aws-sdk/clients/rdsdataservice");
|
|
5
3
|
|
|
6
4
|
function mustEnv(key) {
|
|
7
5
|
const v = process.env[key];
|
|
@@ -21,19 +19,6 @@ function getDialect() {
|
|
|
21
19
|
}),
|
|
22
20
|
});
|
|
23
21
|
|
|
24
|
-
case "dataapi":
|
|
25
|
-
return new DataApiDialect({
|
|
26
|
-
mode: "postgres",
|
|
27
|
-
driver: {
|
|
28
|
-
client: new RDSDataService({
|
|
29
|
-
region: mustEnv("KEEL_DB_REGION"),
|
|
30
|
-
}),
|
|
31
|
-
database: mustEnv("KEEL_DB_NAME"),
|
|
32
|
-
secretArn: mustEnv("KEEL_DB_SECRET_ARN"),
|
|
33
|
-
resourceArn: mustEnv("KEEL_DB_RESOURCE_ARN"),
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
|
|
37
22
|
default:
|
|
38
23
|
throw Error("unexpected KEEL_DB_CONN_TYPE: " + dbConnType);
|
|
39
24
|
}
|