@cuboapp/api-backend 1.0.5 → 1.0.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuboapp/api-backend",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Backend Api for CuboApp",
5
5
  "main": "src/index.ts",
6
6
  "repository": "git@github.com:cuboapp/api-backend.git",
@@ -11,8 +11,8 @@
11
11
  "access": "public"
12
12
  },
13
13
  "dependencies": {
14
- "@cuboapp/config": "^0.0.6",
15
- "@cuboapp/types": "^1.0.20",
14
+ "@cuboapp/config": "^0.0.9",
15
+ "@cuboapp/types": "^1.0.21",
16
16
  "lodash-es": "^4.17.21",
17
17
  "pg": "^8.13.3",
18
18
  "sequelize": "^6.37.6"
package/pnpm-lock.yaml CHANGED
@@ -9,11 +9,11 @@ importers:
9
9
  .:
10
10
  dependencies:
11
11
  '@cuboapp/config':
12
- specifier: ^0.0.6
13
- version: 0.0.6
12
+ specifier: ^0.0.9
13
+ version: 0.0.9
14
14
  '@cuboapp/types':
15
- specifier: ^1.0.20
16
- version: 1.0.20
15
+ specifier: ^1.0.21
16
+ version: 1.0.21
17
17
  lodash-es:
18
18
  specifier: ^4.17.21
19
19
  version: 4.17.21
@@ -36,14 +36,11 @@ importers:
36
36
 
37
37
  packages:
38
38
 
39
- '@cuboapp/config@0.0.6':
40
- resolution: {integrity: sha512-2sQKqPYUK3YH46CPgbJXzvzD8QLxHm5CVrSAj78rxDzqX/xnnAAqOYfn4QS6B/4GZxRexNp2OkKH5c2ea+dXRg==}
39
+ '@cuboapp/config@0.0.9':
40
+ resolution: {integrity: sha512-xkCZFOGTO6E8FhowmebthZ50deslWyak6HxhSPGUqktRazMa/6DVyZnTFQBs4Xt271GBXoRekXy8xNGVJnzCrg==}
41
41
 
42
- '@cuboapp/types@1.0.19':
43
- resolution: {integrity: sha512-CZyut9MmCT+5bBBbZF3ETiJnRbgnExvx/+zT/UKj4NxZKlqQAnzX8hWIFMBbed3YoSkbS+cdZcJE26k5mLNPjw==}
44
-
45
- '@cuboapp/types@1.0.20':
46
- resolution: {integrity: sha512-PDeJ4GOsVA6OhC1ryd8XwBrnZ7k6mB48GEnMLDdgw3ACRxV2KaWc/5bDrZUdfRjggOAXmwEhX+8rvqfNvp93hg==}
42
+ '@cuboapp/types@1.0.21':
43
+ resolution: {integrity: sha512-DIxfZRAEVX+PupP86Lii6lQXZ+CC6MWDxNUOO1FSWfJVqphXtvW52DFguhd9tu+TN50sHYS/BcjMLD1nJXw4KQ==}
47
44
 
48
45
  '@types/debug@4.1.12':
49
46
  resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==}
@@ -232,17 +229,13 @@ packages:
232
229
 
233
230
  snapshots:
234
231
 
235
- '@cuboapp/config@0.0.6':
232
+ '@cuboapp/config@0.0.9':
236
233
  dependencies:
237
- '@cuboapp/types': 1.0.19
234
+ '@cuboapp/types': 1.0.21
238
235
  dotenv: 16.4.7
239
236
  dotenv-expand: 12.0.1
240
237
 
241
- '@cuboapp/types@1.0.19':
242
- dependencies:
243
- '@types/events': 3.0.3
244
-
245
- '@cuboapp/types@1.0.20':
238
+ '@cuboapp/types@1.0.21':
246
239
  dependencies:
247
240
  '@types/events': 3.0.3
248
241
 
@@ -42,7 +42,8 @@ export class ApiHelpersConvert<T extends CuboApiEntitiesMap<T>> {
42
42
 
43
43
  const rowValue = get(row, initialValueKey, undefined)
44
44
 
45
- if (!withEl.entity.id && withEl.entity.alias === 'users') {
45
+ // todo: fix fields from core
46
+ if (!withEl.entity && withEl.entity.alias === 'users') {
46
47
  userFieldsPrepared.push(withEl.full_key)
47
48
 
48
49
  switch (rowValue) {
@@ -291,6 +291,7 @@ export class ApiHelpers<T extends CuboApiEntitiesMap<T>> {
291
291
  let password: string = ''
292
292
  let schema: string = ''
293
293
  let dialect: string = ''
294
+ let dialectModule: any = undefined
294
295
 
295
296
  if (!this.api.config.db) {
296
297
  throw 'DB connection is not configured'
@@ -307,6 +308,7 @@ export class ApiHelpers<T extends CuboApiEntitiesMap<T>> {
307
308
  }
308
309
 
309
310
  database = cfg.database as string
311
+ dialectModule = cfg.dialectModule as string
310
312
  host = cfg.host as string
311
313
  port = cfg.port as number
312
314
  username = cfg.username as string
@@ -330,6 +332,10 @@ export class ApiHelpers<T extends CuboApiEntitiesMap<T>> {
330
332
  schema
331
333
  }
332
334
 
335
+ if (dialectModule) {
336
+ config.dialectModule = dialectModule
337
+ }
338
+
333
339
  // cert for yandex cloud
334
340
  if (/yandexcloud/.test(config.host!)) {
335
341
  config.dialectOptions = {