@teamkeel/functions-runtime 0.256.0 → 0.258.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamkeel/functions-runtime",
3
- "version": "0.256.0",
3
+ "version": "0.258.0",
4
4
  "description": "Internal package used by @teamkeel/sdk",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -4,8 +4,8 @@ const { sql } = require("kysely");
4
4
  const { getDatabase } = require("./database");
5
5
  const KSUID = require("ksuid");
6
6
 
7
- process.env.DB_CONN_TYPE = "pg";
8
- process.env.DB_CONN = `postgresql://postgres:postgres@localhost:5432/functions-runtime`;
7
+ process.env.KEEL_DB_CONN_TYPE = "pg";
8
+ process.env.KEEL_DB_CONN = `postgresql://postgres:postgres@localhost:5432/functions-runtime`;
9
9
 
10
10
  let personAPI;
11
11
  let postAPI;
package/src/database.js CHANGED
@@ -12,12 +12,12 @@ function mustEnv(key) {
12
12
  }
13
13
 
14
14
  function getDialect() {
15
- const dbConnType = process.env["DB_CONN_TYPE"];
15
+ const dbConnType = process.env["KEEL_DB_CONN_TYPE"];
16
16
  switch (dbConnType) {
17
17
  case "pg":
18
18
  return new PostgresDialect({
19
19
  pool: new pg.Pool({
20
- connectionString: mustEnv("DB_CONN"),
20
+ connectionString: mustEnv("KEEL_DB_CONN"),
21
21
  }),
22
22
  });
23
23
 
@@ -26,16 +26,16 @@ function getDialect() {
26
26
  mode: "postgres",
27
27
  driver: {
28
28
  client: new RDSDataService({
29
- region: mustEnv("DB_REGION"),
29
+ region: mustEnv("KEEL_DB_REGION"),
30
30
  }),
31
- database: mustEnv("DB_NAME"),
32
- secretArn: mustEnv("DB_SECRET_ARN"),
33
- resourceArn: mustEnv("DB_RESOURCE_ARN"),
31
+ database: mustEnv("KEEL_DB_NAME"),
32
+ secretArn: mustEnv("KEEL_DB_SECRET_ARN"),
33
+ resourceArn: mustEnv("KEEL_DB_RESOURCE_ARN"),
34
34
  },
35
35
  });
36
36
 
37
37
  default:
38
- throw Error("unexpected DB_CONN_TYPE: " + dbConnType);
38
+ throw Error("unexpected KEEL_DB_CONN_TYPE: " + dbConnType);
39
39
  }
40
40
  }
41
41
 
@@ -131,8 +131,8 @@ describe("ModelAPI error handling", () => {
131
131
  let db;
132
132
 
133
133
  beforeEach(async () => {
134
- process.env.DB_CONN_TYPE = "pg";
135
- process.env.DB_CONN = `postgresql://postgres:postgres@localhost:5432/functions-runtime`;
134
+ process.env.KEEL_DB_CONN_TYPE = "pg";
135
+ process.env.KEEL_DB_CONN = `postgresql://postgres:postgres@localhost:5432/functions-runtime`;
136
136
 
137
137
  db = getDatabase();
138
138