@elysiumjs/mnemosyne 0.1.0 → 0.1.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/bunfig.toml ADDED
@@ -0,0 +1,19 @@
1
+ [test]
2
+ # The root directory of all unit tests
3
+ root = "./tests"
4
+ # A file loaded right before running `bun test`
5
+ preload = ["./tests/setup.ts"]
6
+ # Enable code coverage by default
7
+ coverage = true
8
+ # Requires 90% line coverage, 70% function coverage, and 80% statement coverage
9
+ coverageThreshold = { line = 0.9, function = 0.7, statement = 0.8 }
10
+ # Tests files are included in the coverage statistics
11
+ coverageSkipTestFiles = true
12
+ # Use lcov as the coverage reporter
13
+ coverageReporter = ["lcov", "text"]
14
+ # Path the output coverage results
15
+ coverageDir = "./coverage"
16
+
17
+ [run]
18
+ # Always use bun runtime for every `bun run` commands
19
+ bun = true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elysiumjs/mnemosyne",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Database and caching for Elysium.js applications",
6
6
  "private": false,
@@ -30,16 +30,16 @@
30
30
  "types": "dist/index.d.ts",
31
31
  "sideEffects": false,
32
32
  "peerDependencies": {
33
- "@elysiumjs/core": "^0.7.0"
33
+ "@elysiumjs/core": "workspace:^"
34
34
  },
35
35
  "devDependencies": {
36
- "@elysiumjs/core": "0.7.0"
36
+ "@elysiumjs/core": "workspace:*"
37
37
  },
38
38
  "dependencies": {
39
39
  "cache-manager": "^7.2.3",
40
40
  "cacheable": "^2.0.3",
41
41
  "keyv": "^5.0.0",
42
- "radash": "^12.1.1",
43
- "reflect-metadata": "^0.2.2"
42
+ "radash": "catalog:",
43
+ "reflect-metadata": "catalog:"
44
44
  }
45
45
  }
package/src/index.ts CHANGED
@@ -27,25 +27,15 @@ export type {
27
27
  TenancyStrategy
28
28
  } from './interfaces';
29
29
 
30
- export { AbstractDatabase, createDatabaseCacheStorage } from './database';
31
- export { createSchemaFromModel, AbstractModel } from './model';
32
- export { AbstractRepository } from './repository';
30
+ export * from './database';
31
+ export * from './model';
32
+ export * from './repository';
33
33
 
34
- export {
35
- getConfig as getTenancyConfig,
36
- getCurrentTenant,
37
- withTenant,
38
- registerTenancyStrategy,
39
- getTenancyStrategy,
40
- TenantMiddleware,
41
- SimpleTenantMiddleware,
42
- StrictTenantMiddleware
43
- } from './tenancy';
34
+ export * from './tenancy';
44
35
  export type { TenancyConfig, TenancyMode, ModelTenancyConfig } from './tenancy';
45
36
 
46
- export { Cache } from './cache';
47
- export type { CacheInterface } from './cache';
48
- export { KeyvRedis } from './keyv-redis';
37
+ export * from './cache';
38
+ export * from './keyv-redis';
49
39
 
50
40
  // Configuration types
51
41
  export interface MnemosyneConfig<TConnectionConfig = unknown> {
package/src/tenancy.ts CHANGED
@@ -113,7 +113,7 @@ let _strategy: TenancyStrategy<unknown, unknown> | null = null;
113
113
  * @author Axel Nana <axel.nana@workbud.com>
114
114
  * @returns The current tenancy configuration.
115
115
  */
116
- export const getConfig = (): TenancyConfig => {
116
+ export const getTenancyConfig = (): TenancyConfig => {
117
117
  const app = Application.instance;
118
118
  if (!app) {
119
119
  return { mode: 'schema' };
@@ -1,8 +0,0 @@
1
- $ bun run clean && bun run build:js && bun run build:ts
2
- $ rimraf dist
3
- $ bun build ./src/index.ts --outdir ./dist --target bun --packages external --root ./src --minify
4
- Bundled 7 modules in 23ms
5
-
6
- index.js 7.47 KB (entry point)
7
-
8
- $ tsc
@@ -1 +0,0 @@
1
- $ tsc --noEmit
@@ -1,301 +0,0 @@
1
- TN:
2
- SF:../core/dist/index.js
3
- FNF:226
4
- FNH:34
5
- DA:1,0
6
- DA:2,0
7
- DA:3,0
8
- DA:4,0
9
- DA:5,0
10
- DA:6,0
11
- DA:7,0
12
- DA:8,0
13
- DA:9,0
14
- DA:10,0
15
- DA:11,0
16
- DA:12,0
17
- DA:13,0
18
- DA:14,0
19
- DA:15,0
20
- DA:16,0
21
- DA:17,0
22
- DA:18,0
23
- DA:19,1221
24
- LF:19
25
- LH:1
26
- end_of_record
27
- TN:
28
- SF:src/cache.ts
29
- FNF:8
30
- FNH:7
31
- DA:17,73
32
- DA:18,96
33
- DA:19,56
34
- DA:20,76
35
- DA:22,82
36
- DA:121,79
37
- DA:122,60
38
- DA:123,30
39
- DA:124,36
40
- DA:125,28
41
- DA:126,48
42
- DA:127,12
43
- DA:128,6
44
- DA:129,10
45
- DA:131,56
46
- DA:133,30
47
- DA:134,17
48
- DA:135,38
49
- DA:136,162
50
- DA:137,86
51
- DA:139,41
52
- DA:140,62
53
- DA:141,42
54
- DA:142,48
55
- DA:143,40
56
- DA:144,42
57
- DA:145,24
58
- DA:146,18
59
- DA:147,22
60
- DA:149,76
61
- DA:150,13
62
- DA:152,34
63
- DA:154,8
64
- DA:157,56
65
- DA:158,32
66
- DA:159,34
67
- DA:165,48
68
- DA:170,41
69
- DA:177,29
70
- DA:178,116
71
- DA:179,63
72
- DA:186,29
73
- DA:187,55
74
- DA:189,27
75
- DA:195,21
76
- DA:196,51
77
- DA:197,68
78
- DA:198,46
79
- DA:199,50
80
- DA:200,4
81
- DA:201,12
82
- DA:202,9
83
- DA:204,63
84
- DA:211,22
85
- DA:212,53
86
- DA:213,190
87
- DA:214,9
88
- DA:216,46
89
- DA:218,1
90
- LF:59
91
- LH:59
92
- end_of_record
93
- TN:
94
- SF:src/keyv-redis.ts
95
- FNF:29
96
- FNH:20
97
- DA:34,1
98
- DA:36,27
99
- DA:68,10
100
- DA:69,24
101
- DA:71,95
102
- DA:72,115
103
- DA:73,12
104
- DA:75,80
105
- DA:76,76
106
- DA:77,128
107
- DA:78,112
108
- DA:79,92
109
- DA:80,142
110
- DA:82,69
111
- DA:83,79
112
- DA:84,16
113
- DA:87,22
114
- DA:88,49
115
- DA:94,20
116
- DA:95,28
117
- DA:96,66
118
- DA:97,102
119
- DA:98,86
120
- DA:99,114
121
- DA:100,46
122
- DA:101,50
123
- DA:102,0
124
- DA:103,0
125
- DA:104,0
126
- DA:105,0
127
- DA:106,0
128
- DA:107,0
129
- DA:108,0
130
- DA:109,0
131
- DA:110,33
132
- DA:116,35
133
- DA:117,61
134
- DA:120,25
135
- DA:121,106
136
- DA:122,90
137
- DA:124,93
138
- DA:127,49
139
- DA:128,106
140
- DA:130,31
141
- DA:131,98
142
- DA:132,14
143
- DA:133,53
144
- DA:137,35
145
- DA:139,42
146
- DA:141,97
147
- DA:142,138
148
- DA:143,35
149
- DA:145,130
150
- DA:146,31
151
- DA:148,117
152
- DA:150,9
153
- DA:152,64
154
- DA:155,28
155
- DA:156,106
156
- DA:158,81
157
- DA:159,69
158
- DA:160,31
159
- DA:162,49
160
- DA:165,21
161
- DA:166,22
162
- DA:167,114
163
- DA:168,46
164
- DA:169,13
165
- DA:170,13
166
- DA:172,46
167
- DA:173,90
168
- DA:174,178
169
- DA:175,64
170
- DA:177,24
171
- DA:178,114
172
- DA:179,34
173
- DA:180,36
174
- DA:181,32
175
- DA:182,36
176
- DA:183,62
177
- DA:184,34
178
- DA:185,32
179
- DA:186,22
180
- DA:189,78
181
- DA:190,76
182
- DA:192,56
183
- DA:193,17
184
- DA:194,9
185
- DA:196,33
186
- DA:197,77
187
- DA:198,9
188
- DA:200,67
189
- DA:201,31
190
- DA:203,41
191
- DA:204,42
192
- DA:205,0
193
- DA:206,0
194
- DA:207,0
195
- DA:208,0
196
- DA:209,0
197
- DA:210,0
198
- DA:211,0
199
- DA:212,0
200
- DA:213,0
201
- DA:214,0
202
- DA:215,0
203
- DA:216,0
204
- DA:217,0
205
- DA:218,0
206
- DA:219,0
207
- DA:220,0
208
- DA:221,0
209
- DA:222,37
210
- DA:225,31
211
- DA:226,52
212
- DA:227,14
213
- DA:228,9
214
- DA:230,144
215
- DA:231,102
216
- DA:233,0
217
- DA:234,0
218
- DA:235,0
219
- DA:236,0
220
- DA:237,0
221
- DA:238,0
222
- DA:239,0
223
- DA:240,0
224
- DA:241,0
225
- DA:242,0
226
- DA:243,0
227
- DA:244,0
228
- DA:245,0
229
- DA:246,0
230
- DA:247,0
231
- DA:248,0
232
- DA:249,0
233
- DA:250,0
234
- DA:251,0
235
- DA:252,0
236
- DA:253,0
237
- DA:254,0
238
- DA:255,0
239
- DA:256,0
240
- DA:257,0
241
- DA:258,0
242
- DA:259,0
243
- DA:260,0
244
- DA:261,0
245
- DA:262,0
246
- DA:263,0
247
- DA:264,0
248
- DA:265,0
249
- DA:266,0
250
- DA:267,0
251
- DA:268,0
252
- DA:269,0
253
- DA:270,0
254
- DA:271,0
255
- DA:272,0
256
- DA:273,0
257
- DA:274,0
258
- DA:275,0
259
- DA:276,0
260
- DA:277,0
261
- DA:278,0
262
- DA:279,0
263
- DA:280,0
264
- DA:281,0
265
- DA:282,0
266
- DA:283,0
267
- DA:284,0
268
- DA:285,0
269
- DA:286,0
270
- DA:287,0
271
- DA:288,0
272
- DA:289,0
273
- DA:290,0
274
- DA:291,31
275
- DA:300,59
276
- DA:301,148
277
- DA:310,0
278
- DA:311,91
279
- DA:313,1
280
- LF:183
281
- LH:99
282
- end_of_record
283
- TN:
284
- SF:tests/setup.ts
285
- FNF:3
286
- FNH:1
287
- DA:15,0
288
- DA:16,0
289
- DA:17,0
290
- DA:18,0
291
- DA:19,0
292
- DA:20,0
293
- DA:21,0
294
- DA:22,30
295
- DA:23,47
296
- DA:24,19
297
- DA:25,2
298
- DA:26,2
299
- LF:12
300
- LH:5
301
- end_of_record