@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 +6 -3
- package/package.json +1 -1
- package/src/abba.ts +9 -5
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
|
|
20
|
-
bucketDao
|
|
21
|
-
userAssignmentDao
|
|
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
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
|
|
41
|
-
private bucketDao
|
|
42
|
-
private userAssignmentDao
|
|
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.
|