@budibase/worker 2.3.14 → 2.3.16

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.
Files changed (111) hide show
  1. package/coverage/clover.xml +93 -90
  2. package/coverage/coverage-final.json +1 -1
  3. package/coverage/lcov-report/index.html +10 -10
  4. package/coverage/lcov-report/src/api/controllers/global/auth.ts.html +17 -8
  5. package/coverage/lcov-report/src/api/controllers/global/configs.ts.html +1 -1
  6. package/coverage/lcov-report/src/api/controllers/global/email.ts.html +1 -1
  7. package/coverage/lcov-report/src/api/controllers/global/events.ts.html +1 -1
  8. package/coverage/lcov-report/src/api/controllers/global/index.html +11 -11
  9. package/coverage/lcov-report/src/api/controllers/global/license.ts.html +1 -1
  10. package/coverage/lcov-report/src/api/controllers/global/roles.ts.html +1 -1
  11. package/coverage/lcov-report/src/api/controllers/global/self.ts.html +1 -1
  12. package/coverage/lcov-report/src/api/controllers/global/templates.ts.html +1 -1
  13. package/coverage/lcov-report/src/api/controllers/global/users.ts.html +1 -1
  14. package/coverage/lcov-report/src/api/controllers/global/workspaces.ts.html +1 -1
  15. package/coverage/lcov-report/src/api/controllers/system/accounts.ts.html +1 -1
  16. package/coverage/lcov-report/src/api/controllers/system/environment.ts.html +1 -1
  17. package/coverage/lcov-report/src/api/controllers/system/index.html +1 -1
  18. package/coverage/lcov-report/src/api/controllers/system/migrations.ts.html +1 -1
  19. package/coverage/lcov-report/src/api/controllers/system/restore.ts.html +1 -1
  20. package/coverage/lcov-report/src/api/controllers/system/status.ts.html +1 -1
  21. package/coverage/lcov-report/src/api/controllers/system/tenants.ts.html +1 -1
  22. package/coverage/lcov-report/src/api/index.html +1 -1
  23. package/coverage/lcov-report/src/api/index.ts.html +1 -1
  24. package/coverage/lcov-report/src/api/routes/global/auth.ts.html +1 -1
  25. package/coverage/lcov-report/src/api/routes/global/configs.ts.html +1 -1
  26. package/coverage/lcov-report/src/api/routes/global/email.ts.html +1 -1
  27. package/coverage/lcov-report/src/api/routes/global/events.ts.html +1 -1
  28. package/coverage/lcov-report/src/api/routes/global/index.html +1 -1
  29. package/coverage/lcov-report/src/api/routes/global/license.ts.html +1 -1
  30. package/coverage/lcov-report/src/api/routes/global/roles.ts.html +1 -1
  31. package/coverage/lcov-report/src/api/routes/global/self.ts.html +1 -1
  32. package/coverage/lcov-report/src/api/routes/global/templates.ts.html +1 -1
  33. package/coverage/lcov-report/src/api/routes/global/users.ts.html +1 -1
  34. package/coverage/lcov-report/src/api/routes/global/workspaces.ts.html +1 -1
  35. package/coverage/lcov-report/src/api/routes/index.html +1 -1
  36. package/coverage/lcov-report/src/api/routes/index.ts.html +1 -1
  37. package/coverage/lcov-report/src/api/routes/system/accounts.ts.html +1 -1
  38. package/coverage/lcov-report/src/api/routes/system/environment.ts.html +1 -1
  39. package/coverage/lcov-report/src/api/routes/system/index.html +1 -1
  40. package/coverage/lcov-report/src/api/routes/system/migrations.ts.html +1 -1
  41. package/coverage/lcov-report/src/api/routes/system/restore.ts.html +1 -1
  42. package/coverage/lcov-report/src/api/routes/system/status.ts.html +1 -1
  43. package/coverage/lcov-report/src/api/routes/system/tenants.ts.html +1 -1
  44. package/coverage/lcov-report/src/api/routes/validation/index.html +1 -1
  45. package/coverage/lcov-report/src/api/routes/validation/index.ts.html +1 -1
  46. package/coverage/lcov-report/src/api/routes/validation/users.ts.html +1 -1
  47. package/coverage/lcov-report/src/constants/index.html +1 -1
  48. package/coverage/lcov-report/src/constants/index.ts.html +1 -1
  49. package/coverage/lcov-report/src/constants/templates/index.html +1 -1
  50. package/coverage/lcov-report/src/constants/templates/index.ts.html +1 -1
  51. package/coverage/lcov-report/src/db/index.html +1 -1
  52. package/coverage/lcov-report/src/db/index.ts.html +1 -1
  53. package/coverage/lcov-report/src/environment.ts.html +1 -1
  54. package/coverage/lcov-report/src/index.html +1 -1
  55. package/coverage/lcov-report/src/index.ts.html +1 -1
  56. package/coverage/lcov-report/src/middleware/cloudRestricted.ts.html +1 -1
  57. package/coverage/lcov-report/src/middleware/index.html +1 -1
  58. package/coverage/lcov-report/src/migrations/functions/globalInfoSyncUsers.ts.html +1 -1
  59. package/coverage/lcov-report/src/migrations/functions/index.html +1 -1
  60. package/coverage/lcov-report/src/migrations/index.html +1 -1
  61. package/coverage/lcov-report/src/migrations/index.ts.html +1 -1
  62. package/coverage/lcov-report/src/sdk/accounts/accounts.ts.html +1 -1
  63. package/coverage/lcov-report/src/sdk/accounts/index.html +1 -1
  64. package/coverage/lcov-report/src/sdk/accounts/index.ts.html +1 -1
  65. package/coverage/lcov-report/src/sdk/index.html +1 -1
  66. package/coverage/lcov-report/src/sdk/index.ts.html +1 -1
  67. package/coverage/lcov-report/src/sdk/users/events.ts.html +1 -1
  68. package/coverage/lcov-report/src/sdk/users/index.html +1 -1
  69. package/coverage/lcov-report/src/sdk/users/index.ts.html +1 -1
  70. package/coverage/lcov-report/src/sdk/users/users.ts.html +1 -1
  71. package/coverage/lcov-report/src/tests/TestConfiguration.ts.html +1 -1
  72. package/coverage/lcov-report/src/tests/api/accounts.ts.html +1 -1
  73. package/coverage/lcov-report/src/tests/api/auth.ts.html +1 -1
  74. package/coverage/lcov-report/src/tests/api/base.ts.html +1 -1
  75. package/coverage/lcov-report/src/tests/api/configs.ts.html +1 -1
  76. package/coverage/lcov-report/src/tests/api/email.ts.html +1 -1
  77. package/coverage/lcov-report/src/tests/api/environment.ts.html +1 -1
  78. package/coverage/lcov-report/src/tests/api/groups.ts.html +1 -1
  79. package/coverage/lcov-report/src/tests/api/index.html +1 -1
  80. package/coverage/lcov-report/src/tests/api/index.ts.html +1 -1
  81. package/coverage/lcov-report/src/tests/api/license.ts.html +1 -1
  82. package/coverage/lcov-report/src/tests/api/migrations.ts.html +1 -1
  83. package/coverage/lcov-report/src/tests/api/restore.ts.html +1 -1
  84. package/coverage/lcov-report/src/tests/api/roles.ts.html +1 -1
  85. package/coverage/lcov-report/src/tests/api/self.ts.html +1 -1
  86. package/coverage/lcov-report/src/tests/api/status.ts.html +1 -1
  87. package/coverage/lcov-report/src/tests/api/templates.ts.html +1 -1
  88. package/coverage/lcov-report/src/tests/api/tenants.ts.html +1 -1
  89. package/coverage/lcov-report/src/tests/api/users.ts.html +1 -1
  90. package/coverage/lcov-report/src/tests/controllers.ts.html +1 -1
  91. package/coverage/lcov-report/src/tests/index.html +1 -1
  92. package/coverage/lcov-report/src/tests/index.ts.html +1 -1
  93. package/coverage/lcov-report/src/tests/mocks/email.ts.html +1 -1
  94. package/coverage/lcov-report/src/tests/mocks/index.html +1 -1
  95. package/coverage/lcov-report/src/tests/mocks/index.ts.html +1 -1
  96. package/coverage/lcov-report/src/tests/structures/configs.ts.html +1 -1
  97. package/coverage/lcov-report/src/tests/structures/groups.ts.html +1 -1
  98. package/coverage/lcov-report/src/tests/structures/index.html +1 -1
  99. package/coverage/lcov-report/src/tests/structures/index.ts.html +1 -1
  100. package/coverage/lcov-report/src/tests/structures/users.ts.html +1 -1
  101. package/coverage/lcov-report/src/utilities/appService.ts.html +1 -1
  102. package/coverage/lcov-report/src/utilities/email.ts.html +1 -1
  103. package/coverage/lcov-report/src/utilities/fileSystem.ts.html +1 -1
  104. package/coverage/lcov-report/src/utilities/index.html +1 -1
  105. package/coverage/lcov-report/src/utilities/index.ts.html +1 -1
  106. package/coverage/lcov-report/src/utilities/redis.ts.html +1 -1
  107. package/coverage/lcov-report/src/utilities/templates.ts.html +1 -1
  108. package/coverage/lcov-report/src/utilities/users.ts.html +1 -1
  109. package/coverage/lcov.info +132 -129
  110. package/package.json +6 -6
  111. package/src/api/controllers/global/auth.ts +5 -2
@@ -218,43 +218,43 @@ TN:
218
218
  SF:src/api/controllers/global/auth.ts
219
219
  FN:22,(anonymous_1)
220
220
  FN:26,(anonymous_2)
221
- FN:51,(anonymous_3)
222
- FN:64,(anonymous_4)
223
- FN:70,(anonymous_5)
224
- FN:82,(anonymous_6)
225
- FN:113,(anonymous_7)
226
- FN:133,(anonymous_8)
227
- FN:140,(anonymous_9)
228
- FN:158,(anonymous_10)
229
- FN:170,(anonymous_11)
230
- FN:191,(anonymous_12)
231
- FN:218,(anonymous_13)
232
- FN:240,(anonymous_14)
233
- FN:265,(anonymous_15)
221
+ FN:54,(anonymous_3)
222
+ FN:67,(anonymous_4)
223
+ FN:73,(anonymous_5)
224
+ FN:85,(anonymous_6)
225
+ FN:116,(anonymous_7)
226
+ FN:136,(anonymous_8)
227
+ FN:143,(anonymous_9)
228
+ FN:161,(anonymous_10)
229
+ FN:173,(anonymous_11)
230
+ FN:194,(anonymous_12)
231
+ FN:221,(anonymous_13)
232
+ FN:243,(anonymous_14)
233
+ FN:268,(anonymous_15)
234
234
  FN:22,googleCallbackUrl
235
235
  FN:26,oidcCallbackUrl
236
236
  FN:30,authInternal
237
- FN:51,(anonymous_20)
238
- FN:54,(anonymous_21)
239
- FN:56,(anonymous_22)
240
- FN:64,(anonymous_23)
241
- FN:70,(anonymous_24)
242
- FN:82,(anonymous_25)
243
- FN:113,(anonymous_26)
244
- FN:133,(anonymous_27)
245
- FN:140,(anonymous_28)
246
- FN:158,(anonymous_29)
247
- FN:170,(anonymous_30)
248
- FN:191,(anonymous_31)
249
- FN:208,(anonymous_32)
250
- FN:210,(anonymous_33)
251
- FN:218,(anonymous_34)
252
- FN:225,(anonymous_35)
253
- FN:240,(anonymous_36)
254
- FN:252,(anonymous_37)
255
- FN:265,(anonymous_38)
256
- FN:272,(anonymous_39)
257
- FN:274,(anonymous_40)
237
+ FN:54,(anonymous_20)
238
+ FN:57,(anonymous_21)
239
+ FN:59,(anonymous_22)
240
+ FN:67,(anonymous_23)
241
+ FN:73,(anonymous_24)
242
+ FN:85,(anonymous_25)
243
+ FN:116,(anonymous_26)
244
+ FN:136,(anonymous_27)
245
+ FN:143,(anonymous_28)
246
+ FN:161,(anonymous_29)
247
+ FN:173,(anonymous_30)
248
+ FN:194,(anonymous_31)
249
+ FN:211,(anonymous_32)
250
+ FN:213,(anonymous_33)
251
+ FN:221,(anonymous_34)
252
+ FN:228,(anonymous_35)
253
+ FN:243,(anonymous_36)
254
+ FN:255,(anonymous_37)
255
+ FN:268,(anonymous_38)
256
+ FN:275,(anonymous_39)
257
+ FN:277,(anonymous_40)
258
258
  FNF:39
259
259
  FNH:24
260
260
  FNDA:0,(anonymous_1)
@@ -313,128 +313,131 @@ DA:27,3
313
313
  DA:31,1
314
314
  DA:32,0
315
315
  DA:33,0
316
- DA:36,1
317
- DA:37,0
318
- DA:41,1
319
- DA:43,1
316
+ DA:34,0
317
+ DA:35,0
318
+ DA:38,1
319
+ DA:39,0
320
+ DA:40,0
321
+ DA:44,1
320
322
  DA:46,1
321
- DA:47,0
322
- DA:51,18
323
- DA:52,0
323
+ DA:49,1
324
+ DA:50,0
325
+ DA:54,18
324
326
  DA:55,0
325
- DA:56,0
326
- DA:57,0
327
+ DA:58,0
327
328
  DA:59,0
328
- DA:64,18
329
- DA:65,0
330
- DA:66,0
331
- DA:67,0
332
- DA:70,18
333
- DA:71,0
334
- DA:72,0
329
+ DA:60,0
330
+ DA:62,0
331
+ DA:67,18
332
+ DA:68,0
333
+ DA:69,0
334
+ DA:70,0
335
+ DA:73,18
335
336
  DA:74,0
336
337
  DA:75,0
337
- DA:82,18
338
- DA:83,2
339
- DA:84,2
340
- DA:85,2
341
- DA:86,0
342
- DA:91,2
343
- DA:92,2
338
+ DA:77,0
339
+ DA:78,0
340
+ DA:85,18
341
+ DA:86,2
342
+ DA:87,2
343
+ DA:88,2
344
+ DA:89,0
344
345
  DA:94,2
345
346
  DA:95,2
346
- DA:99,2
347
- DA:102,0
348
- DA:105,2
349
- DA:113,18
350
- DA:114,1
351
- DA:115,1
352
- DA:116,1
347
+ DA:97,2
348
+ DA:98,2
349
+ DA:102,2
350
+ DA:105,0
351
+ DA:108,2
352
+ DA:116,18
353
353
  DA:117,1
354
354
  DA:118,1
355
355
  DA:119,1
356
356
  DA:120,1
357
357
  DA:121,1
358
- DA:125,1
359
- DA:126,1
360
- DA:128,0
361
- DA:129,0
362
- DA:133,18
363
- DA:134,1
364
- DA:135,1
358
+ DA:122,1
359
+ DA:123,1
360
+ DA:124,1
361
+ DA:128,1
362
+ DA:129,1
363
+ DA:131,0
364
+ DA:132,0
365
+ DA:136,18
365
366
  DA:137,1
366
- DA:140,18
367
- DA:141,0
368
- DA:142,0
369
- DA:143,0
367
+ DA:138,1
368
+ DA:140,1
369
+ DA:143,18
370
+ DA:144,0
370
371
  DA:145,0
371
- DA:155,0
372
- DA:158,36
373
- DA:159,0
374
- DA:160,0
375
- DA:161,0
372
+ DA:146,0
373
+ DA:148,0
374
+ DA:158,0
375
+ DA:161,36
376
376
  DA:162,0
377
377
  DA:163,0
378
- DA:170,18
379
- DA:171,0
380
- DA:173,0
381
- DA:177,0
382
- DA:178,0
383
- DA:184,0
384
- DA:191,54
385
- DA:192,0
386
- DA:194,0
387
- DA:198,0
388
- DA:199,0
389
- DA:205,0
390
- DA:209,0
391
- DA:210,0
392
- DA:211,0
378
+ DA:164,0
379
+ DA:165,0
380
+ DA:166,0
381
+ DA:173,18
382
+ DA:174,0
383
+ DA:176,0
384
+ DA:180,0
385
+ DA:181,0
386
+ DA:187,0
387
+ DA:194,54
388
+ DA:195,0
389
+ DA:197,0
390
+ DA:201,0
391
+ DA:202,0
392
+ DA:208,0
393
+ DA:212,0
393
394
  DA:213,0
394
- DA:218,18
395
- DA:219,3
396
- DA:220,3
397
- DA:225,3
398
- DA:226,3
395
+ DA:214,0
396
+ DA:216,0
397
+ DA:221,18
398
+ DA:222,3
399
+ DA:223,3
400
+ DA:228,3
399
401
  DA:229,3
400
- DA:233,3
401
- DA:240,18
402
- DA:241,2
403
- DA:242,2
402
+ DA:232,3
403
+ DA:236,3
404
+ DA:243,18
404
405
  DA:244,2
405
- DA:246,2
406
+ DA:245,2
406
407
  DA:247,2
407
- DA:252,2
408
+ DA:249,2
409
+ DA:250,2
408
410
  DA:255,2
409
- DA:259,2
410
- DA:265,54
411
- DA:266,1
412
- DA:267,1
411
+ DA:258,2
412
+ DA:262,2
413
+ DA:268,54
413
414
  DA:269,1
414
- DA:273,1
415
- DA:274,1
416
- DA:275,1
415
+ DA:270,1
416
+ DA:272,1
417
+ DA:276,1
417
418
  DA:277,1
418
- LF:119
419
+ DA:278,1
420
+ DA:280,1
421
+ LF:122
419
422
  LH:72
420
423
  BRDA:30,0,0,0
421
424
  BRDA:30,1,0,0
422
425
  BRDA:31,2,0,0
423
- BRDA:33,3,0,0
424
- BRDA:33,3,1,0
425
- BRDA:36,4,0,0
426
- BRDA:37,5,0,0
427
- BRDA:37,5,1,0
428
- BRDA:46,6,0,0
429
- BRDA:72,7,0,0
430
- BRDA:72,7,1,0
431
- BRDA:85,8,0,0
432
- BRDA:94,9,0,2
433
- BRDA:134,10,0,1
434
- BRDA:134,11,0,1
435
- BRDA:134,11,1,1
436
- BRDA:255,12,0,0
437
- BRDA:255,12,1,2
426
+ BRDA:35,3,0,0
427
+ BRDA:35,3,1,0
428
+ BRDA:38,4,0,0
429
+ BRDA:40,5,0,0
430
+ BRDA:40,5,1,0
431
+ BRDA:49,6,0,0
432
+ BRDA:75,7,0,0
433
+ BRDA:75,7,1,0
434
+ BRDA:88,8,0,0
435
+ BRDA:97,9,0,2
436
+ BRDA:137,10,0,1
437
+ BRDA:137,11,0,1
438
+ BRDA:137,11,1,1
439
+ BRDA:258,12,0,0
440
+ BRDA:258,12,1,2
438
441
  BRF:18
439
442
  BRH:5
440
443
  end_of_record
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/worker",
3
3
  "email": "hi@budibase.com",
4
- "version": "2.3.14",
4
+ "version": "2.3.16",
5
5
  "description": "Budibase background service",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -36,10 +36,10 @@
36
36
  "author": "Budibase",
37
37
  "license": "GPL-3.0",
38
38
  "dependencies": {
39
- "@budibase/backend-core": "^2.3.14",
40
- "@budibase/pro": "2.3.13",
41
- "@budibase/string-templates": "^2.3.14",
42
- "@budibase/types": "^2.3.14",
39
+ "@budibase/backend-core": "^2.3.16",
40
+ "@budibase/pro": "2.3.15",
41
+ "@budibase/string-templates": "^2.3.16",
42
+ "@budibase/types": "^2.3.16",
43
43
  "@koa/router": "8.0.8",
44
44
  "@sentry/node": "6.17.7",
45
45
  "@techpass/passport-openidconnect": "0.3.2",
@@ -97,5 +97,5 @@
97
97
  "typescript": "4.7.3",
98
98
  "update-dotenv": "1.1.1"
99
99
  },
100
- "gitHead": "d53d7279251edae4cf76ea34064b9c2648ca347f"
100
+ "gitHead": "0840e8897bc36ba5bc09c9d8d1a73a7de6498305"
101
101
  }
@@ -27,13 +27,16 @@ export async function oidcCallbackUrl(config?: { callbackURL?: string }) {
27
27
  return ssoCallbackUrl(tenancy.getGlobalDB(), config, ConfigType.OIDC)
28
28
  }
29
29
 
30
- async function authInternal(ctx: any, user: any, err = null, info = null) {
30
+ async function authInternal(ctx: any, user: any, err: any = null, info = null) {
31
31
  if (err) {
32
- console.error("Authentication error", err)
32
+ console.error("Authentication error")
33
+ console.error(err)
34
+ console.trace(err)
33
35
  return ctx.throw(403, info ? info : "Unauthorized")
34
36
  }
35
37
 
36
38
  if (!user) {
39
+ console.error("Authentication error - no user provided")
37
40
  return ctx.throw(403, info ? info : "Unauthorized")
38
41
  }
39
42