@naturalcycles/abba 2.7.1 → 2.7.2

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/dist/abba.js CHANGED
@@ -16,11 +16,14 @@ import { canGenerateNewAssignments, generateUserAssignmentData, getUserExclusion
16
16
  const CACHE_TTL = 600_000;
17
17
  export class Abba {
18
18
  cfg;
19
- experimentDao = experimentDao(this.cfg.db);
20
- bucketDao = bucketDao(this.cfg.db);
21
- userAssignmentDao = userAssignmentDao(this.cfg.db);
19
+ experimentDao;
20
+ bucketDao;
21
+ userAssignmentDao;
22
22
  constructor(cfg) {
23
23
  this.cfg = cfg;
24
+ this.experimentDao = experimentDao(cfg.db);
25
+ this.bucketDao = bucketDao(cfg.db);
26
+ this.userAssignmentDao = userAssignmentDao(cfg.db);
24
27
  }
25
28
  /**
26
29
  * Returns all experiments.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/abba",
3
3
  "type": "module",
4
- "version": "2.7.1",
4
+ "version": "2.7.2",
5
5
  "dependencies": {
6
6
  "@naturalcycles/db-lib": "^10",
7
7
  "@naturalcycles/js-lib": "^15",
package/src/abba.ts CHANGED
@@ -37,11 +37,15 @@ import {
37
37
  const CACHE_TTL = 600_000
38
38
 
39
39
  export class Abba {
40
- private experimentDao = experimentDao(this.cfg.db)
41
- private bucketDao = bucketDao(this.cfg.db)
42
- private userAssignmentDao = userAssignmentDao(this.cfg.db)
43
-
44
- constructor(public cfg: AbbaConfig) {}
40
+ private experimentDao
41
+ private bucketDao
42
+ private userAssignmentDao
43
+
44
+ constructor(public cfg: AbbaConfig) {
45
+ this.experimentDao = experimentDao(cfg.db)
46
+ this.bucketDao = bucketDao(cfg.db)
47
+ this.userAssignmentDao = userAssignmentDao(cfg.db)
48
+ }
45
49
 
46
50
  /**
47
51
  * Returns all experiments.