@furystack/core 12.0.0 → 12.0.1
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/esm/create-physical-store-tests.js +446 -0
- package/esm/create-physical-store-tests.js.map +1 -0
- package/esm/errors/aggregated-error.js +11 -0
- package/esm/errors/aggregated-error.js.map +1 -0
- package/esm/errors/authorization-error.js +3 -0
- package/esm/errors/authorization-error.js.map +1 -0
- package/esm/errors/index.js +3 -0
- package/esm/errors/index.js.map +1 -0
- package/esm/global-disposables.js +26 -0
- package/esm/global-disposables.js.map +1 -0
- package/esm/helpers.js +38 -0
- package/esm/helpers.js.map +1 -0
- package/esm/identity-context.js +23 -0
- package/esm/identity-context.js.map +1 -0
- package/esm/in-memory-store.js +185 -0
- package/esm/in-memory-store.js.map +1 -0
- package/esm/index.js +9 -0
- package/esm/index.js.map +1 -0
- package/esm/models/physical-store.js +30 -0
- package/esm/models/physical-store.js.map +1 -0
- package/esm/models/user.js +6 -0
- package/esm/models/user.js.map +1 -0
- package/esm/store-manager.js +59 -0
- package/esm/store-manager.js.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
import { usingAsync } from '@furystack/utils';
|
|
2
|
+
import { Injector } from '@furystack/inject';
|
|
3
|
+
import { describe, it, expect } from 'vitest';
|
|
4
|
+
export class TestClass {
|
|
5
|
+
}
|
|
6
|
+
let idIndex = 0;
|
|
7
|
+
export const createMockEntity = (part) => ({
|
|
8
|
+
id: idIndex++,
|
|
9
|
+
stringValue1: 'foo',
|
|
10
|
+
stringValue2: 'bar',
|
|
11
|
+
numberValue1: Math.round(Math.random() * 1000),
|
|
12
|
+
numberValue2: Math.round(Math.random() * 10000) / 100,
|
|
13
|
+
booleanValue: true,
|
|
14
|
+
dateValue: new Date(),
|
|
15
|
+
...part,
|
|
16
|
+
});
|
|
17
|
+
export const createStoreTest = (options) => {
|
|
18
|
+
describe(`Standard Physical Store tests for '${options.typeName}'`, () => {
|
|
19
|
+
describe('General CRUD', () => {
|
|
20
|
+
it('Should be created with empty by default', async () => {
|
|
21
|
+
await usingAsync(new Injector(), async (i) => {
|
|
22
|
+
const store = options.createStore(i);
|
|
23
|
+
const count = await store.count();
|
|
24
|
+
expect(count).toBe(0);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
it('Should be able to store an entity', async () => {
|
|
28
|
+
await usingAsync(new Injector(), async (i) => {
|
|
29
|
+
const store = options.createStore(i);
|
|
30
|
+
const entity = createMockEntity();
|
|
31
|
+
await store.add(entity);
|
|
32
|
+
const count = await store.count();
|
|
33
|
+
expect(count).toBe(1);
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
it('Should be able to store an entity without providing an unique Id', async () => {
|
|
37
|
+
await usingAsync(new Injector(), async (i) => {
|
|
38
|
+
const store = options.createStore(i);
|
|
39
|
+
const { id, ...entityWithoutId } = createMockEntity();
|
|
40
|
+
const { created } = await store.add(entityWithoutId);
|
|
41
|
+
expect(created.length).toBe(1);
|
|
42
|
+
const count = await store.count();
|
|
43
|
+
expect(count).toBe(1);
|
|
44
|
+
const retrieved = await store.get(created[0].id);
|
|
45
|
+
expect(retrieved).toEqual(created[0]);
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
it('Should be able to store multiple entities', async () => {
|
|
49
|
+
await usingAsync(new Injector(), async (i) => {
|
|
50
|
+
const store = options.createStore(i);
|
|
51
|
+
const entity1 = createMockEntity();
|
|
52
|
+
const entity2 = createMockEntity();
|
|
53
|
+
await store.add(entity1, entity2);
|
|
54
|
+
const count = await store.count();
|
|
55
|
+
expect(count).toBe(2);
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
it('Add should throw and skip adding on duplicate IDs', async () => {
|
|
59
|
+
await usingAsync(new Injector(), async (i) => {
|
|
60
|
+
const store = options.createStore(i);
|
|
61
|
+
const entity = createMockEntity();
|
|
62
|
+
await store.add(entity);
|
|
63
|
+
await expect(store.add(entity)).rejects.toThrow();
|
|
64
|
+
const count = await store.count();
|
|
65
|
+
expect(count).toBe(1);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
it('Should return undefined if no entry has been found', async () => {
|
|
69
|
+
await usingAsync(new Injector(), async (i) => {
|
|
70
|
+
const store = options.createStore(i);
|
|
71
|
+
const entity = await store.get(1);
|
|
72
|
+
expect(entity).toBeUndefined();
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
it('Should be able to retrieve an added entity', async () => {
|
|
76
|
+
await usingAsync(new Injector(), async (i) => {
|
|
77
|
+
const store = options.createStore(i);
|
|
78
|
+
const entity = createMockEntity();
|
|
79
|
+
await store.add(entity);
|
|
80
|
+
const retrieved = await store.get(entity.id);
|
|
81
|
+
expect(retrieved).toEqual(entity);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
it('Should be able to retrieve an added entity with projection', async () => {
|
|
85
|
+
await usingAsync(new Injector(), async (i) => {
|
|
86
|
+
const store = options.createStore(i);
|
|
87
|
+
const entity = createMockEntity();
|
|
88
|
+
await store.add(entity);
|
|
89
|
+
const retrieved = await store.get(entity.id, ['id', 'stringValue1']);
|
|
90
|
+
expect(retrieved).not.toEqual(entity);
|
|
91
|
+
expect(Object.keys(retrieved)).toEqual(['id', 'stringValue1']);
|
|
92
|
+
expect(retrieved?.id).toBe(entity.id);
|
|
93
|
+
expect(retrieved?.stringValue1).toBe(entity.stringValue1);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
it('Should be able to update an added entity', async () => {
|
|
97
|
+
await usingAsync(new Injector(), async (i) => {
|
|
98
|
+
const store = options.createStore(i);
|
|
99
|
+
const entity = createMockEntity();
|
|
100
|
+
await store.add(entity);
|
|
101
|
+
await store.update(entity.id, { stringValue1: 'modified' });
|
|
102
|
+
const retrieved = await store.get(entity.id);
|
|
103
|
+
expect(retrieved?.stringValue1).toEqual('modified');
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
it('Update should throw an error if the entity does not exists', async () => {
|
|
107
|
+
await usingAsync(new Injector(), async (i) => {
|
|
108
|
+
const store = options.createStore(i);
|
|
109
|
+
const entity = createMockEntity();
|
|
110
|
+
await expect(store.update(entity.id, entity)).rejects.toThrow('Entity not found');
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
it('Should remove an entity', async () => {
|
|
114
|
+
await usingAsync(new Injector(), async (i) => {
|
|
115
|
+
const store = options.createStore(i);
|
|
116
|
+
const entity = createMockEntity();
|
|
117
|
+
await store.add(entity);
|
|
118
|
+
const count = await store.count();
|
|
119
|
+
expect(count).toBe(1);
|
|
120
|
+
await store.remove(entity.id);
|
|
121
|
+
const countAferDelete = await store.count();
|
|
122
|
+
expect(countAferDelete).toBe(0);
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
it('Should remove multiple entities at once', async () => {
|
|
126
|
+
await usingAsync(new Injector(), async (i) => {
|
|
127
|
+
const store = options.createStore(i);
|
|
128
|
+
const entity1 = createMockEntity();
|
|
129
|
+
const entity2 = createMockEntity();
|
|
130
|
+
const entity3 = createMockEntity();
|
|
131
|
+
await store.add(entity1, entity2, entity3);
|
|
132
|
+
const count = await store.count();
|
|
133
|
+
expect(count).toBe(3);
|
|
134
|
+
await store.remove(entity1.id, entity2.id);
|
|
135
|
+
const countAferDelete = await store.count();
|
|
136
|
+
expect(countAferDelete).toBe(1);
|
|
137
|
+
await store.remove(entity3.id);
|
|
138
|
+
const countAferDeleteAll = await store.count();
|
|
139
|
+
expect(countAferDeleteAll).toBe(0);
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
describe('Top, skip', () => {
|
|
144
|
+
it('Should respect top and skip', async () => {
|
|
145
|
+
await usingAsync(new Injector(), async (injector) => {
|
|
146
|
+
const store = options.createStore(injector);
|
|
147
|
+
for (let i = 0; i < 10; i++) {
|
|
148
|
+
await store.add(createMockEntity({ id: i }));
|
|
149
|
+
}
|
|
150
|
+
const zeroToThree = await store.find({ top: 4, select: ['id'] });
|
|
151
|
+
expect(zeroToThree).toEqual([{ id: 0 }, { id: 1 }, { id: 2 }, { id: 3 }]);
|
|
152
|
+
const fiveToEight = await store.find({ skip: 5, top: 4, select: ['id'] });
|
|
153
|
+
expect(fiveToEight).toEqual([{ id: 5 }, { id: 6 }, { id: 7 }, { id: 8 }]);
|
|
154
|
+
const eightNine = await store.find({ skip: 8, select: ['id'] });
|
|
155
|
+
expect(eightNine).toEqual([{ id: 8 }, { id: 9 }]);
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
describe('Ordering', () => {
|
|
160
|
+
it('Should sort by numeric values', async () => {
|
|
161
|
+
await usingAsync(new Injector(), async (injector) => {
|
|
162
|
+
const store = options.createStore(injector);
|
|
163
|
+
for (let i = 0; i < 10; i++) {
|
|
164
|
+
await store.add(createMockEntity({ id: i, numberValue1: Math.random(), numberValue2: Math.random() }));
|
|
165
|
+
}
|
|
166
|
+
// For equality
|
|
167
|
+
await store.add(createMockEntity({ id: 20, numberValue1: 0, numberValue2: 0 }));
|
|
168
|
+
await store.add(createMockEntity({ id: 21, numberValue1: 0, numberValue2: 0 }));
|
|
169
|
+
const orderByValue1Asc = await store.find({ order: { numberValue1: 'ASC' } });
|
|
170
|
+
let min = 0;
|
|
171
|
+
for (const currentValue of orderByValue1Asc) {
|
|
172
|
+
if (min > currentValue.numberValue1) {
|
|
173
|
+
throw Error('Order failed!');
|
|
174
|
+
}
|
|
175
|
+
min = currentValue.numberValue1;
|
|
176
|
+
}
|
|
177
|
+
const orderByValue1Desc = await store.find({ order: { numberValue1: 'DESC' } });
|
|
178
|
+
let max = Number.MAX_SAFE_INTEGER;
|
|
179
|
+
for (const currentValue of orderByValue1Desc) {
|
|
180
|
+
if (max < currentValue.numberValue1) {
|
|
181
|
+
throw Error('Order failed!');
|
|
182
|
+
}
|
|
183
|
+
max = currentValue.numberValue1;
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
describe('Filtering', () => {
|
|
189
|
+
it('should filter strings with $eq', async () => {
|
|
190
|
+
await usingAsync(new Injector(), async (i) => {
|
|
191
|
+
const store = options.createStore(i);
|
|
192
|
+
await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'def' }), createMockEntity({ id: 3, stringValue1: 'def' }));
|
|
193
|
+
const result = await store.find({ filter: { stringValue1: { $eq: 'def' } } });
|
|
194
|
+
expect(result.length).toBe(2);
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
it('should filter numbers with $eq', async () => {
|
|
198
|
+
await usingAsync(new Injector(), async (i) => {
|
|
199
|
+
const store = options.createStore(i);
|
|
200
|
+
await store.add(createMockEntity({ id: 1, numberValue1: 1 }), createMockEntity({ id: 2, numberValue1: 2 }), createMockEntity({ id: 3, numberValue1: 2 }));
|
|
201
|
+
const result = await store.find({ filter: { numberValue1: { $eq: 2 } } });
|
|
202
|
+
expect(result.length).toBe(2);
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
it('filter should return the corresponding entries for multiple props', async () => {
|
|
206
|
+
await usingAsync(new Injector(), async (i) => {
|
|
207
|
+
const store = options.createStore(i);
|
|
208
|
+
await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'def', stringValue2: 'def' }), createMockEntity({ id: 3, stringValue1: 'def' }));
|
|
209
|
+
const result = await store.find({ filter: { stringValue1: { $eq: 'def' }, stringValue2: { $eq: 'def' } } });
|
|
210
|
+
expect(result.length).toBe(1);
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
it('filter should return the corresponding entries with $in statement', async () => {
|
|
214
|
+
await usingAsync(new Injector(), async (i) => {
|
|
215
|
+
const store = options.createStore(i);
|
|
216
|
+
await store.add(createMockEntity({ stringValue1: 'asd' }), createMockEntity({ stringValue1: 'def' }), createMockEntity({ stringValue1: 'sdf' }));
|
|
217
|
+
const result = await store.find({ filter: { stringValue1: { $in: ['asd', 'def'] } } });
|
|
218
|
+
expect(result.length).toBe(2);
|
|
219
|
+
expect(result.map((r) => r.stringValue1)).toEqual(['asd', 'def']);
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
it('filter should return the corresponding entries with $nin statement', async () => {
|
|
223
|
+
await usingAsync(new Injector(), async (i) => {
|
|
224
|
+
const store = options.createStore(i);
|
|
225
|
+
await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'def' }), createMockEntity({ id: 3, stringValue1: 'sdf' }));
|
|
226
|
+
const result = await store.find({ filter: { stringValue1: { $nin: ['asd', 'def'] } } });
|
|
227
|
+
expect(result.length).toBe(1);
|
|
228
|
+
expect(result.map((r) => r.stringValue1)).toEqual(['sdf']);
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
it('filter should return the corresponding entries with $ne statement', async () => {
|
|
232
|
+
await usingAsync(new Injector(), async (i) => {
|
|
233
|
+
const store = options.createStore(i);
|
|
234
|
+
await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'def' }), createMockEntity({ id: 3, stringValue1: 'sdf' }));
|
|
235
|
+
const result = await store.find({ filter: { stringValue1: { $ne: 'asd' } } });
|
|
236
|
+
expect(result.length).toBe(2);
|
|
237
|
+
expect(result.map((r) => r.stringValue1)).toEqual(['def', 'sdf']);
|
|
238
|
+
});
|
|
239
|
+
});
|
|
240
|
+
it('filter should return the corresponding entries with $lt statement', async () => {
|
|
241
|
+
await usingAsync(new Injector(), async (i) => {
|
|
242
|
+
const store = options.createStore(i);
|
|
243
|
+
const { created } = await store.add(createMockEntity({ id: 1, numberValue1: 1 }), createMockEntity({ id: 2, numberValue1: 2 }), createMockEntity({ id: 3, numberValue1: 3 }));
|
|
244
|
+
const result = await store.find({ filter: { numberValue1: { $lt: 2 } } });
|
|
245
|
+
expect(result.length).toBe(1);
|
|
246
|
+
expect(result).toEqual([created[0]]);
|
|
247
|
+
});
|
|
248
|
+
});
|
|
249
|
+
it('filter should return the corresponding entries with $lte statement', async () => {
|
|
250
|
+
await usingAsync(new Injector(), async (i) => {
|
|
251
|
+
const store = options.createStore(i);
|
|
252
|
+
const { created } = await store.add(createMockEntity({ id: 1, numberValue1: 1 }), createMockEntity({ id: 2, numberValue1: 2 }), createMockEntity({ id: 3, numberValue1: 3 }));
|
|
253
|
+
const result = await store.find({ filter: { numberValue1: { $lte: 2 } } });
|
|
254
|
+
expect(result.length).toBe(2);
|
|
255
|
+
expect(result).toEqual([created[0], created[1]]);
|
|
256
|
+
});
|
|
257
|
+
});
|
|
258
|
+
it('filter should return the corresponding entries with $gt statement', async () => {
|
|
259
|
+
await usingAsync(new Injector(), async (i) => {
|
|
260
|
+
const store = options.createStore(i);
|
|
261
|
+
const { created } = await store.add(createMockEntity({ id: 1, numberValue1: 1 }), createMockEntity({ id: 2, numberValue1: 2 }), createMockEntity({ id: 3, numberValue1: 3 }));
|
|
262
|
+
const result = await store.find({ filter: { numberValue1: { $gt: 2 } } });
|
|
263
|
+
expect(result.length).toBe(1);
|
|
264
|
+
expect(result).toEqual([created[2]]);
|
|
265
|
+
});
|
|
266
|
+
});
|
|
267
|
+
it('filter should return the corresponding entries with $gte statement', async () => {
|
|
268
|
+
await usingAsync(new Injector(), async (i) => {
|
|
269
|
+
const store = options.createStore(i);
|
|
270
|
+
const { created } = await store.add(createMockEntity({ id: 1, numberValue1: 1 }), createMockEntity({ id: 2, numberValue1: 2 }), createMockEntity({ id: 3, numberValue1: 3 }));
|
|
271
|
+
const result = await store.find({ filter: { numberValue1: { $gte: 2 } } });
|
|
272
|
+
expect(result.length).toBe(2);
|
|
273
|
+
expect(result).toEqual([created[1], created[2]]);
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
it('filter should return the corresponding entries with $in AND $eq statement', async () => {
|
|
277
|
+
await usingAsync(new Injector(), async (i) => {
|
|
278
|
+
const store = options.createStore(i);
|
|
279
|
+
await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'def' }), createMockEntity({ id: 3, stringValue1: 'sdf' }));
|
|
280
|
+
const result = await store.find({ filter: { stringValue1: { $in: ['asd', 'def'], $eq: 'asd' } } });
|
|
281
|
+
expect(result.length).toBe(1);
|
|
282
|
+
expect(result.map((r) => r.stringValue1)).toEqual(['asd']);
|
|
283
|
+
});
|
|
284
|
+
});
|
|
285
|
+
describe('logical $and statements', () => {
|
|
286
|
+
it('should filter $and logical statements with $eq statements', async () => {
|
|
287
|
+
await usingAsync(new Injector(), async (i) => {
|
|
288
|
+
const store = options.createStore(i);
|
|
289
|
+
const { created } = await store.add(createMockEntity({ id: 1, numberValue1: 1, numberValue2: 1 }), createMockEntity({ id: 2, numberValue1: 2, numberValue2: 1 }), createMockEntity({ id: 3, numberValue1: 3, numberValue2: 1 }));
|
|
290
|
+
const result = await store.find({
|
|
291
|
+
filter: { $and: [{ numberValue1: { $eq: 2 } }, { numberValue2: { $eq: 1 } }] },
|
|
292
|
+
});
|
|
293
|
+
expect(result.length).toBe(1);
|
|
294
|
+
expect(result[0]).toEqual(created[1]);
|
|
295
|
+
});
|
|
296
|
+
});
|
|
297
|
+
it('should filter $and logical statements with $ne statements', async () => {
|
|
298
|
+
await usingAsync(new Injector(), async (i) => {
|
|
299
|
+
const store = options.createStore(i);
|
|
300
|
+
const { created } = await store.add(createMockEntity({ id: 1, numberValue1: 1, numberValue2: 2 }), createMockEntity({ id: 2, numberValue1: 2, numberValue2: 3 }), createMockEntity({ id: 3, numberValue1: 3, numberValue2: 1 }));
|
|
301
|
+
const result = await store.find({
|
|
302
|
+
filter: { $and: [{ numberValue1: { $ne: 2 } }, { numberValue2: { $ne: 1 } }] },
|
|
303
|
+
});
|
|
304
|
+
expect(result.length).toBe(1);
|
|
305
|
+
expect(result[0]).toEqual(created[0]);
|
|
306
|
+
});
|
|
307
|
+
});
|
|
308
|
+
it('should filter $and logical statements with $lt/$gt statements', async () => {
|
|
309
|
+
await usingAsync(new Injector(), async (i) => {
|
|
310
|
+
const store = options.createStore(i);
|
|
311
|
+
const { created } = await store.add(createMockEntity({ id: 1, numberValue1: 1, numberValue2: 2 }), createMockEntity({ id: 2, numberValue1: 2, numberValue2: 3 }), createMockEntity({ id: 3, numberValue1: 3, numberValue2: 1 }));
|
|
312
|
+
const result = await store.find({
|
|
313
|
+
filter: { $and: [{ numberValue1: { $lt: 3 } }, { numberValue2: { $gt: 2 } }] },
|
|
314
|
+
});
|
|
315
|
+
expect(result.length).toBe(1);
|
|
316
|
+
expect(result[0]).toEqual(created[1]);
|
|
317
|
+
});
|
|
318
|
+
});
|
|
319
|
+
it('should filter $and logical statements with $lte/$gte statements', async () => {
|
|
320
|
+
await usingAsync(new Injector(), async (i) => {
|
|
321
|
+
const store = options.createStore(i);
|
|
322
|
+
const { created } = await store.add(createMockEntity({ id: 1, numberValue1: 1, numberValue2: 1 }), createMockEntity({ id: 2, numberValue1: 2, numberValue2: 2 }), createMockEntity({ id: 3, numberValue1: 3, numberValue2: 3 }));
|
|
323
|
+
const result = await store.find({
|
|
324
|
+
filter: { $and: [{ numberValue1: { $lte: 2 } }, { numberValue2: { $gte: 2 } }] },
|
|
325
|
+
});
|
|
326
|
+
expect(result.length).toBe(1);
|
|
327
|
+
expect(result[0]).toEqual(created[1]);
|
|
328
|
+
});
|
|
329
|
+
});
|
|
330
|
+
});
|
|
331
|
+
describe('logical $or statements', () => {
|
|
332
|
+
it('should filter logical $or statements with $eq statements', async () => {
|
|
333
|
+
await usingAsync(new Injector(), async (i) => {
|
|
334
|
+
const store = options.createStore(i);
|
|
335
|
+
const { created } = await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'aaa' }), createMockEntity({ id: 3, stringValue1: 'bbb' }));
|
|
336
|
+
const result = await store.find({
|
|
337
|
+
filter: { $or: [{ stringValue1: { $eq: 'aaa' } }, { stringValue1: { $eq: 'bbb' } }] },
|
|
338
|
+
});
|
|
339
|
+
expect(result.length).toBe(2);
|
|
340
|
+
expect(result).toEqual([created[1], created[2]]);
|
|
341
|
+
});
|
|
342
|
+
});
|
|
343
|
+
it('should filter logical $or statements with $neq statements', async () => {
|
|
344
|
+
await usingAsync(new Injector(), async (i) => {
|
|
345
|
+
const store = options.createStore(i);
|
|
346
|
+
const { created } = await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'aaa' }), createMockEntity({ id: 3, stringValue1: 'bbb' }));
|
|
347
|
+
const result = await store.find({
|
|
348
|
+
filter: { $or: [{ stringValue1: { $ne: 'aaa' } }, { stringValue1: { $ne: 'bbb' } }] },
|
|
349
|
+
});
|
|
350
|
+
expect(result.length).toBe(3);
|
|
351
|
+
expect(result).toEqual(created);
|
|
352
|
+
});
|
|
353
|
+
});
|
|
354
|
+
});
|
|
355
|
+
describe('Nested $or and $and logical operators', () => {
|
|
356
|
+
it('should filter $and operators inside $or-s', async () => {
|
|
357
|
+
await usingAsync(new Injector(), async (i) => {
|
|
358
|
+
const store = options.createStore(i);
|
|
359
|
+
const { created } = await store.add(createMockEntity({ id: 1, numberValue1: 1, numberValue2: 3, booleanValue: true }), createMockEntity({ id: 2, numberValue1: 2, numberValue2: 2, booleanValue: false }), createMockEntity({ id: 3, numberValue1: 3, numberValue2: 1, booleanValue: true }));
|
|
360
|
+
const result = await store.find({
|
|
361
|
+
filter: {
|
|
362
|
+
$or: [
|
|
363
|
+
{
|
|
364
|
+
$and: [{ numberValue1: { $ne: 2 } }, { numberValue2: { $eq: 1 } }],
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
$and: [{ numberValue1: { $ne: 3 } }, { booleanValue: { $ne: true } }],
|
|
368
|
+
},
|
|
369
|
+
],
|
|
370
|
+
},
|
|
371
|
+
});
|
|
372
|
+
expect(result.length).toBe(2);
|
|
373
|
+
expect(result).toEqual([created[1], created[2]]);
|
|
374
|
+
});
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
if (!options.skipRegexTests) {
|
|
378
|
+
it('filter should return the corresponding entries with $regex', async () => {
|
|
379
|
+
await usingAsync(new Injector(), async (i) => {
|
|
380
|
+
const store = options.createStore(i);
|
|
381
|
+
await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'aaa' }), createMockEntity({ id: 3, stringValue1: 'bbb' }));
|
|
382
|
+
const result = await store.find({ filter: { stringValue1: { $regex: '([a])' } } });
|
|
383
|
+
expect(result.length).toBe(2);
|
|
384
|
+
expect(result.map((r) => r.stringValue1)).toEqual(['asd', 'aaa']);
|
|
385
|
+
});
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
if (!options.skipStringTests) {
|
|
389
|
+
it('filter should return the corresponding entries with $startsWith', async () => {
|
|
390
|
+
await usingAsync(new Injector(), async (i) => {
|
|
391
|
+
const store = options.createStore(i);
|
|
392
|
+
await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'aaa' }), createMockEntity({ id: 3, stringValue1: 'bbb' }));
|
|
393
|
+
const result = await store.find({ filter: { stringValue1: { $startsWith: 'aa' } } });
|
|
394
|
+
expect(result.length).toBe(1);
|
|
395
|
+
expect(result.map((r) => r.stringValue1)).toEqual(['aaa']);
|
|
396
|
+
});
|
|
397
|
+
});
|
|
398
|
+
it('filter should return the corresponding entries with $endsWith', async () => {
|
|
399
|
+
await usingAsync(new Injector(), async (i) => {
|
|
400
|
+
const store = options.createStore(i);
|
|
401
|
+
await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'aaa' }), createMockEntity({ id: 3, stringValue1: 'bbb' }));
|
|
402
|
+
const result = await store.find({ filter: { stringValue1: { $endsWith: 'bb' } } });
|
|
403
|
+
expect(result.length).toBe(1);
|
|
404
|
+
expect(result.map((r) => r.stringValue1)).toEqual(['bbb']);
|
|
405
|
+
});
|
|
406
|
+
});
|
|
407
|
+
it('filter should return the corresponding entries with $like', async () => {
|
|
408
|
+
await usingAsync(new Injector(), async (i) => {
|
|
409
|
+
const store = options.createStore(i);
|
|
410
|
+
await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'aaa' }), createMockEntity({ id: 3, stringValue1: 'bbb' }));
|
|
411
|
+
const result = await store.find({ filter: { stringValue1: { $like: '%a%' } } });
|
|
412
|
+
expect(result.length).toBe(2);
|
|
413
|
+
expect(result.map((r) => r.stringValue1)).toEqual(['asd', 'aaa']);
|
|
414
|
+
const endsWithAResult = await store.find({ filter: { stringValue1: { $like: '%a' } } });
|
|
415
|
+
expect(endsWithAResult.length).toBe(1);
|
|
416
|
+
expect(endsWithAResult.map((r) => r.stringValue1)).toEqual(['aaa']);
|
|
417
|
+
const startsWithAResult = await store.find({ filter: { stringValue1: { $like: 'a%' } } });
|
|
418
|
+
expect(startsWithAResult.length).toBe(2);
|
|
419
|
+
expect(startsWithAResult.map((r) => r.stringValue1)).toEqual(['asd', 'aaa']);
|
|
420
|
+
});
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
});
|
|
424
|
+
describe('Count', () => {
|
|
425
|
+
it('Should return the count', async () => {
|
|
426
|
+
await usingAsync(new Injector(), async (i) => {
|
|
427
|
+
const store = options.createStore(i);
|
|
428
|
+
await store.add(createMockEntity(), createMockEntity(), createMockEntity());
|
|
429
|
+
const count = await store.count();
|
|
430
|
+
expect(count).toBe(3);
|
|
431
|
+
});
|
|
432
|
+
});
|
|
433
|
+
it('Should respect filters', async () => {
|
|
434
|
+
await usingAsync(new Injector(), async (i) => {
|
|
435
|
+
const store = options.createStore(i);
|
|
436
|
+
await store.add(createMockEntity({ numberValue1: 1 }), createMockEntity({ numberValue1: 1 }), createMockEntity({ numberValue1: 2 }));
|
|
437
|
+
const count = await store.count({ numberValue1: { $eq: 1 } });
|
|
438
|
+
expect(count).toBe(2);
|
|
439
|
+
const count2 = await store.count({ numberValue1: { $eq: 2 } });
|
|
440
|
+
expect(count2).toBe(1);
|
|
441
|
+
});
|
|
442
|
+
});
|
|
443
|
+
});
|
|
444
|
+
});
|
|
445
|
+
};
|
|
446
|
+
//# sourceMappingURL=create-physical-store-tests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-physical-store-tests.js","sourceRoot":"","sources":["../src/create-physical-store-tests.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE7C,MAAM,OAAO,SAAS;CAQrB;AAED,IAAI,OAAO,GAAG,CAAC,CAAA;AACf,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAAyB,EAAE,EAAE,CAC5D,CAAC;IACC,EAAE,EAAE,OAAO,EAAE;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,EAAE,KAAK;IACnB,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC;IAC9C,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,GAAG,GAAG;IACrD,YAAY,EAAE,IAAI;IAClB,SAAS,EAAE,IAAI,IAAI,EAAE;IACrB,GAAG,IAAI;CACM,CAAA,CAAA;AASjB,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAA0C,EAAE,EAAE;IAC5E,QAAQ,CAAC,sCAAsC,OAAO,CAAC,QAAQ,GAAG,EAAE,GAAG,EAAE;QACvE,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;YAC5B,EAAE,CAAC,yCAAyC,EAAE,KAAK,IAAI,EAAE;gBACvD,MAAM,UAAU,CAAC,IAAI,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC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gB,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC,EACrC,gBAAgB,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC,CACtC,CAAA;oBAED,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,EAAE,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;oBAC7D,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;oBAErB,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC,EAAE,YAAY,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAAA;oBAC9D,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;gBACxB,CAAC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export class AggregatedError extends Error {
|
|
2
|
+
/**
|
|
3
|
+
* @param message The error message
|
|
4
|
+
* @param rejections Collection of the Rejections
|
|
5
|
+
*/
|
|
6
|
+
constructor(message, rejections) {
|
|
7
|
+
super(message);
|
|
8
|
+
this.rejections = rejections;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=aggregated-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aggregated-error.js","sourceRoot":"","sources":["../../src/errors/aggregated-error.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACxC;;;OAGG;IACH,YAAY,OAAe,EAAkB,UAAmC;QAC9E,KAAK,CAAC,OAAO,CAAC,CAAA;QAD6B,eAAU,GAAV,UAAU,CAAyB;IAEhF,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorization-error.js","sourceRoot":"","sources":["../../src/errors/authorization-error.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,kBAAmB,SAAQ,KAAK;CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Readonly set that stores references of the disposables that should be disposed on process exit
|
|
3
|
+
*/
|
|
4
|
+
export const globalDisposables = new Set();
|
|
5
|
+
/**
|
|
6
|
+
* Will be triggered via process event listeners
|
|
7
|
+
*/
|
|
8
|
+
export const exitHandler = (async () => {
|
|
9
|
+
const result = await Promise.allSettled([...globalDisposables].map((d) => d.dispose()));
|
|
10
|
+
const fails = result.filter((r) => r.status === 'rejected');
|
|
11
|
+
if (fails && fails.length) {
|
|
12
|
+
console.warn(`There was an error during disposing '${fails.length}' global disposable objects`, fails);
|
|
13
|
+
}
|
|
14
|
+
}).bind(null);
|
|
15
|
+
// do something when app is closing
|
|
16
|
+
globalThis.process?.on?.('exit', exitHandler);
|
|
17
|
+
// catches ctrl+c event
|
|
18
|
+
globalThis.process?.on?.('SIGINT', exitHandler);
|
|
19
|
+
globalThis.process?.on?.('SIGTERM', () => exitHandler);
|
|
20
|
+
// catches "kill pid" (for example: nodemon restart)
|
|
21
|
+
globalThis.process?.on?.('SIGUSR1', exitHandler);
|
|
22
|
+
globalThis.process?.on?.('SIGUSR2', exitHandler);
|
|
23
|
+
// catches uncaught exceptions
|
|
24
|
+
globalThis.process?.on?.('uncaughtException', exitHandler);
|
|
25
|
+
globalThis.window?.addEventListener('beforeunload', exitHandler);
|
|
26
|
+
//# sourceMappingURL=global-disposables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-disposables.js","sourceRoot":"","sources":["../src/global-disposables.ts"],"names":[],"mappings":"AA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AAC,cAAc,EAAE,WAAW,CAAC,CAAA"}
|
package/esm/helpers.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { globalDisposables } from './global-disposables';
|
|
2
|
+
import { IdentityContext } from './identity-context';
|
|
3
|
+
import { StoreManager } from './store-manager';
|
|
4
|
+
/**
|
|
5
|
+
* The disposable will be disposed on process exit
|
|
6
|
+
* @param disposable The Disposable object to dispose on process exit
|
|
7
|
+
* @returns A set of global disposables
|
|
8
|
+
*/
|
|
9
|
+
export const disposeOnProcessExit = (disposable) => globalDisposables.add(disposable);
|
|
10
|
+
/**
|
|
11
|
+
* @param injector The Injector instance
|
|
12
|
+
* @returns the current authentication status from the identity context
|
|
13
|
+
*/
|
|
14
|
+
export const isAuthenticated = async (injector) => injector.getInstance(IdentityContext).isAuthenticated();
|
|
15
|
+
/**
|
|
16
|
+
* @param injector The Injector instance
|
|
17
|
+
* @param {...any} roles A list of roles
|
|
18
|
+
* @returns if the current authorization status from the identity context
|
|
19
|
+
*/
|
|
20
|
+
export const isAuthorized = async (injector, ...roles) => injector.getInstance(IdentityContext).isAuthorized(...roles);
|
|
21
|
+
/**
|
|
22
|
+
* @param injector The Injector instance
|
|
23
|
+
* @returns The current user from the identity context
|
|
24
|
+
*/
|
|
25
|
+
export const getCurrentUser = async (injector) => injector.getInstance(IdentityContext).getCurrentUser();
|
|
26
|
+
/**
|
|
27
|
+
* @param injector The Injector instance
|
|
28
|
+
* @returns A Store Manager instance to setup stores
|
|
29
|
+
*/
|
|
30
|
+
export const getStoreManager = (injector) => injector.getInstance(StoreManager);
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @param injector The Injector instance
|
|
34
|
+
* @param store The store to add
|
|
35
|
+
* @returns The Store Manager instance for chaining
|
|
36
|
+
*/
|
|
37
|
+
export const addStore = (injector, store) => getStoreManager(injector).addStore(store);
|
|
38
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAG9C;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,UAAsB,EAAE,EAAE,CAAC,iBAAiB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;AAEjG;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAAE,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,eAAe,EAAE,CAAA;AAEpH;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAAE,QAAkB,EAAE,GAAG,KAAe,EAAE,EAAE,CAC3E,QAAQ,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,CAAA;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EAAE,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,cAAc,EAAE,CAAA;AAElH;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,YAAY,CAAC,CAAA;AAEzF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAiC,QAAkB,EAAE,KAAoC,EAAE,EAAE,CACnH,eAAe,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { Injectable } from '@furystack/inject';
|
|
8
|
+
let IdentityContext = class IdentityContext {
|
|
9
|
+
async isAuthenticated() {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
async isAuthorized(..._roles) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
async getCurrentUser() {
|
|
16
|
+
throw Error('No IdentityContext');
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
IdentityContext = __decorate([
|
|
20
|
+
Injectable({ lifetime: 'scoped' })
|
|
21
|
+
], IdentityContext);
|
|
22
|
+
export { IdentityContext };
|
|
23
|
+
//# sourceMappingURL=identity-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity-context.js","sourceRoot":"","sources":["../src/identity-context.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAI9C,IAAa,eAAe,GAA5B,MAAa,eAAe;IACnB,KAAK,CAAC,eAAe;QAC1B,OAAO,KAAK,CAAA;IACd,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,GAAG,MAAgB;QAC3C,OAAO,KAAK,CAAA;IACd,CAAC;IAEM,KAAK,CAAC,cAAc;QACzB,MAAM,KAAK,CAAC,oBAAoB,CAAC,CAAA;IACnC,CAAC;CACF,CAAA;AAZY,eAAe;IAD3B,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;GACtB,eAAe,CAY3B;SAZY,eAAe"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { selectFields, isOperator, isLogicalOperator } from './models/physical-store';
|
|
2
|
+
export class InMemoryStore {
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* @param keys The keys to remove from the store
|
|
6
|
+
*/
|
|
7
|
+
async remove(...keys) {
|
|
8
|
+
keys.map((key) => this.cache.delete(key));
|
|
9
|
+
}
|
|
10
|
+
async add(...entries) {
|
|
11
|
+
const created = entries.map((e) => {
|
|
12
|
+
const entry = { ...e };
|
|
13
|
+
if (this.cache.has(entry[this.primaryKey])) {
|
|
14
|
+
throw new Error('Item with the primary key already exists.');
|
|
15
|
+
}
|
|
16
|
+
this.cache.set(entry[this.primaryKey], entry);
|
|
17
|
+
return entry;
|
|
18
|
+
});
|
|
19
|
+
return { created };
|
|
20
|
+
}
|
|
21
|
+
filterInternal(values, filter) {
|
|
22
|
+
if (!filter) {
|
|
23
|
+
return values;
|
|
24
|
+
}
|
|
25
|
+
return values.filter((item) => {
|
|
26
|
+
for (const key in filter) {
|
|
27
|
+
if (isLogicalOperator(key)) {
|
|
28
|
+
const filterValue = filter[key];
|
|
29
|
+
switch (key) {
|
|
30
|
+
case '$and':
|
|
31
|
+
if (filterValue.some((v) => !this.filterInternal([item], v).length)) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
break;
|
|
35
|
+
case '$or':
|
|
36
|
+
if (filterValue.some((v) => this.filterInternal([item], v).length)) {
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
default:
|
|
41
|
+
throw new Error(`The logical operation '${key}' is not a valid operation`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
else if (typeof filter[key] === 'object') {
|
|
45
|
+
for (const filterKey in filter[key]) {
|
|
46
|
+
if (isOperator(filterKey)) {
|
|
47
|
+
const itemValue = item[key];
|
|
48
|
+
const filterValue = filter[key][filterKey];
|
|
49
|
+
switch (filterKey) {
|
|
50
|
+
case '$eq':
|
|
51
|
+
if (filterValue !== itemValue) {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
break;
|
|
55
|
+
case '$ne':
|
|
56
|
+
if (filterValue === itemValue) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
break;
|
|
60
|
+
case '$in':
|
|
61
|
+
if (!filterValue.includes(itemValue)) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
break;
|
|
65
|
+
case '$nin':
|
|
66
|
+
if (filterValue.includes(itemValue)) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
break;
|
|
70
|
+
case '$lt':
|
|
71
|
+
if (itemValue < filterValue) {
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
return false;
|
|
75
|
+
case '$lte':
|
|
76
|
+
if (itemValue <= filterValue) {
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
return false;
|
|
80
|
+
case '$gt':
|
|
81
|
+
if (itemValue > filterValue) {
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
return false;
|
|
85
|
+
case '$gte':
|
|
86
|
+
if (itemValue >= filterValue) {
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
return false;
|
|
90
|
+
case '$regex':
|
|
91
|
+
if (!new RegExp(filterValue).test(itemValue.toString())) {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
break;
|
|
95
|
+
case '$startsWith':
|
|
96
|
+
if (!itemValue.startsWith(filterValue)) {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
break;
|
|
100
|
+
case '$endsWith':
|
|
101
|
+
if (!itemValue.endsWith(filterValue)) {
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
break;
|
|
105
|
+
case '$like':
|
|
106
|
+
if (!this.evaluateLike(itemValue, filterValue)) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
break;
|
|
110
|
+
default:
|
|
111
|
+
throw new Error(`The expression (${filterKey}) is not supported by '${this.constructor.name}'!`);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
throw new Error(`The filter key '${filterKey}' is not a valid operation`);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
throw new Error(`The filter has to be an object, got ${typeof filter[key]} for field '${key}'`);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return true;
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
async find(searchOptions) {
|
|
127
|
+
let value = this.filterInternal([...this.cache.values()], searchOptions.filter);
|
|
128
|
+
if (searchOptions.order) {
|
|
129
|
+
for (const fieldName of Object.keys(searchOptions.order)) {
|
|
130
|
+
value = value.sort((a, b) => {
|
|
131
|
+
const order = searchOptions.order[fieldName];
|
|
132
|
+
if (a[fieldName] < b[fieldName])
|
|
133
|
+
return order === 'ASC' ? -1 : 1;
|
|
134
|
+
if (a[fieldName] > b[fieldName])
|
|
135
|
+
return order === 'ASC' ? 1 : -1;
|
|
136
|
+
return 0;
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (searchOptions.top || searchOptions.skip) {
|
|
141
|
+
value = value.slice(searchOptions.skip, (searchOptions.skip || 0) + (searchOptions.top || this.cache.size));
|
|
142
|
+
}
|
|
143
|
+
if (searchOptions.select) {
|
|
144
|
+
value = value.map((item) => {
|
|
145
|
+
return selectFields(item, ...searchOptions.select);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
return value;
|
|
149
|
+
}
|
|
150
|
+
async count(filter) {
|
|
151
|
+
return this.filterInternal([...this.cache.values()], filter).length;
|
|
152
|
+
}
|
|
153
|
+
async update(id, data) {
|
|
154
|
+
if (!this.cache.has(id)) {
|
|
155
|
+
throw Error(`Entity not found with id '${id}', cannot update!`);
|
|
156
|
+
}
|
|
157
|
+
this.cache.set(id, {
|
|
158
|
+
...this.cache.get(id),
|
|
159
|
+
...data,
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
dispose() {
|
|
163
|
+
this.cache.clear();
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Creates an InMemoryStore that can be used for testing purposes.
|
|
167
|
+
* @param options Options for the In Memory Store
|
|
168
|
+
* @param options.primaryKey The name of the primary key field
|
|
169
|
+
* @param options.model The Entity Model
|
|
170
|
+
*/
|
|
171
|
+
constructor(options) {
|
|
172
|
+
this.cache = new Map();
|
|
173
|
+
this.get = async (key, select) => {
|
|
174
|
+
const item = this.cache.get(key);
|
|
175
|
+
return item && select ? selectFields(item, ...select) : item;
|
|
176
|
+
};
|
|
177
|
+
this.evaluateLike = (value, likeString) => {
|
|
178
|
+
const likeRegex = `^${likeString.replace(/%/g, '.*')}$`;
|
|
179
|
+
return value.match(new RegExp(likeRegex, 'i'));
|
|
180
|
+
};
|
|
181
|
+
this.primaryKey = options.primaryKey;
|
|
182
|
+
this.model = options.model;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
//# sourceMappingURL=in-memory-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"in-memory-store.js","sourceRoot":"","sources":["../src/in-memory-store.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAErF,MAAM,OAAO,aAAa;IACxB;;;OAGG;IACI,KAAK,CAAC,MAAM,CAAC,GAAG,IAA2B;QAChD,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;IAC3C,CAAC;IAEM,KAAK,CAAC,GAAG,CAAC,GAAG,OAAY;QAC9B,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YAChC,MAAM,KAAK,GAAG,EAAE,GAAG,CAAC,EAAO,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B,MAAM,KAAK,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAA;SAChE;QACD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE;YACjB,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;YACrB,GAAG,IAAI;SACR,CAAC,CAAA;IACJ,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;IACpB,CAAC;IAKD;;;;;OAKG;IACH,YAAY,OASX;QAlLM,UAAK,GAA2B,IAAI,GAAG,EAAE,CAAA;QACzC,QAAG,GAAG,KAAK,EAAE,GAAmB,EAAE,MAAuB,EAAE,EAAE;YAClE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;YAChC,OAAO,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;QAC9D,CAAC,CAAA;QAEO,iBAAY,GAAG,CAAC,KAAa,EAAE,UAAkB,EAAE,EAAE;YAC3D,MAAM,SAAS,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAA;YACvD,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAA;QAChD,CAAC,CAAA;QA0KC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAA;QACpC,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAA;IAC5B,CAAC;CACF"}
|
package/esm/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './errors';
|
|
2
|
+
export * from './models/physical-store';
|
|
3
|
+
export * from './models/user';
|
|
4
|
+
export * from './in-memory-store';
|
|
5
|
+
export * from './store-manager';
|
|
6
|
+
export * from './global-disposables';
|
|
7
|
+
export * from './identity-context';
|
|
8
|
+
export * from './helpers';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,WAAW,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const NumberComparisonOperators = ['$gt', '$gte', '$lt', '$lte'];
|
|
2
|
+
export const StringComparisonOperators = ['$startsWith', '$endsWith', '$like', '$regex'];
|
|
3
|
+
export const SingleComparisonOperators = ['$eq', '$ne'];
|
|
4
|
+
export const ArrayComparisonOperators = ['$in', '$nin'];
|
|
5
|
+
export const LogicalOperators = ['$and', '$not', '$nor', '$or'];
|
|
6
|
+
export const allOperators = [
|
|
7
|
+
...SingleComparisonOperators,
|
|
8
|
+
...NumberComparisonOperators,
|
|
9
|
+
...ArrayComparisonOperators,
|
|
10
|
+
...LogicalOperators,
|
|
11
|
+
...StringComparisonOperators,
|
|
12
|
+
];
|
|
13
|
+
export const isLogicalOperator = (propertyString) => LogicalOperators.includes(propertyString);
|
|
14
|
+
export const isOperator = (propertyString) => allOperators.includes(propertyString);
|
|
15
|
+
export const t = {
|
|
16
|
+
a: { $eq: 3 },
|
|
17
|
+
b: { $in: ['a', 'b', 'c'] },
|
|
18
|
+
$and: [{ a: { $eq: 2 } }],
|
|
19
|
+
};
|
|
20
|
+
export const selectFields = (entry, ...fields) => {
|
|
21
|
+
const returnValue = {};
|
|
22
|
+
Object.keys(entry).map((key) => {
|
|
23
|
+
const field = key;
|
|
24
|
+
if (fields.includes(field)) {
|
|
25
|
+
returnValue[field] = entry[field];
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return returnValue;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=physical-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"physical-store.js","sourceRoot":"","sources":["../../src/models/physical-store.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAU,CAAA;AAEhF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,aAAa,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAA;AACjG,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,KAAK,EAAE,KAAK,CAAU,CAAA;AAEhE,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAAK,EAAE,MAAM,CAAU,CAAA;AAChE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAU,CAAA;AAExE,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,GAAG,yBAAyB;IAC5B,GAAG,yBAAyB;IAC5B,GAAG,wBAAwB;IAC3B,GAAG,gBAAgB;IACnB,GAAG,yBAAyB;CACpB,CAAA;AAUV,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,cAAsB,EAAuD,EAAE,CAC/G,gBAAgB,CAAC,QAAQ,CAAC,cAAmD,CAAC,CAAA;AAEhF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,cAAsB,EAAmD,EAAE,CACpG,YAAY,CAAC,QAAQ,CAAC,cAA+C,CAAC,CAAA;AAExE,MAAM,CAAC,MAAM,CAAC,GAAqD;IACjE,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE;IACb,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE;IAC3B,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;CAC1B,CAAA;AAuCD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAkD,KAAQ,EAAE,GAAG,MAAc,EAAE,EAAE;IAC3G,MAAM,WAAW,GAAG,EAA8B,CAAA;IAClD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;QAC7B,MAAM,KAAK,GAAmB,GAAqB,CAAA;QACnD,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;YAC1B,WAAW,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAA;SAClC;IACH,CAAC,CAAC,CAAA;IACF,OAAO,WAAW,CAAA;AACpB,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/models/user.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,IAAI;CAUhB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { Injectable } from '@furystack/inject';
|
|
8
|
+
import { AggregatedError } from './errors';
|
|
9
|
+
/**
|
|
10
|
+
* Manager class for store instances
|
|
11
|
+
*/
|
|
12
|
+
let StoreManager = class StoreManager {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.stores = new Map();
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Disposes the StoreManager and all store instances
|
|
18
|
+
*/
|
|
19
|
+
async dispose() {
|
|
20
|
+
const result = await Promise.allSettled([...this.stores.entries()].map(async ([_model, store]) => store.dispose()));
|
|
21
|
+
const fails = result.filter((r) => r.status === 'rejected');
|
|
22
|
+
if (fails && fails.length) {
|
|
23
|
+
const error = new AggregatedError(`There was an error during disposing ${fails.length} stores: ${fails.map((f) => f.reason)}`, fails);
|
|
24
|
+
throw error;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Returns a store model for a constructable object.
|
|
29
|
+
* Throws error if no store is registered
|
|
30
|
+
* @param model The Constructable object
|
|
31
|
+
* @param primaryKey The Primary Key field
|
|
32
|
+
* @throws if the Store is not registered
|
|
33
|
+
* @returns a Store object
|
|
34
|
+
*/
|
|
35
|
+
getStoreFor(model, primaryKey) {
|
|
36
|
+
const instance = this.stores.get(model);
|
|
37
|
+
if (!instance) {
|
|
38
|
+
throw Error(`Store not found for '${model.name}'`);
|
|
39
|
+
}
|
|
40
|
+
if (primaryKey !== instance.primaryKey) {
|
|
41
|
+
throw Error('Primary keys not match');
|
|
42
|
+
}
|
|
43
|
+
return instance;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Adds a store instance to the StoreManager class
|
|
47
|
+
* @param store The store to add
|
|
48
|
+
* @returns the StoreManager instance for chaining
|
|
49
|
+
*/
|
|
50
|
+
addStore(store) {
|
|
51
|
+
this.stores.set(store.model, store);
|
|
52
|
+
return this;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
StoreManager = __decorate([
|
|
56
|
+
Injectable({ lifetime: 'singleton' })
|
|
57
|
+
], StoreManager);
|
|
58
|
+
export { StoreManager };
|
|
59
|
+
//# sourceMappingURL=store-manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-manager.js","sourceR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wBAAwB,CAAC,CAAA;SACtC;QACD,OAAO,QAAiB,CAAA;IAC1B,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAiC,KAAoC;QAClF,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,KAAgC,CAAC,CAAA;QAC9D,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAA;AAjDY,YAAY;IADxB,UAAU,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;GACzB,YAAY,CAiDxB;SAjDY,YAAY"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@furystack/core",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.1",
|
|
4
4
|
"description": "Core FuryStack package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
|
-
"
|
|
28
|
+
"esm",
|
|
29
29
|
"types",
|
|
30
30
|
"src"
|
|
31
31
|
],
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"vitest": "^0.30.1"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@furystack/inject": "^8.0.
|
|
56
|
-
"@furystack/utils": "^4.0.
|
|
55
|
+
"@furystack/inject": "^8.0.1",
|
|
56
|
+
"@furystack/utils": "^4.0.1"
|
|
57
57
|
},
|
|
58
58
|
"gitHead": "1045d854bfd8c475b7035471d130d401417a2321"
|
|
59
59
|
}
|