@furystack/core 11.3.1 → 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.
Files changed (82) hide show
  1. package/README.md +1 -1
  2. package/{dist → esm}/create-physical-store-tests.js +85 -90
  3. package/esm/create-physical-store-tests.js.map +1 -0
  4. package/esm/errors/aggregated-error.js +11 -0
  5. package/esm/errors/aggregated-error.js.map +1 -0
  6. package/esm/errors/authorization-error.js +3 -0
  7. package/{dist → esm}/errors/authorization-error.js.map +1 -1
  8. package/esm/errors/index.js +3 -0
  9. package/esm/errors/index.js.map +1 -0
  10. package/esm/global-disposables.js +26 -0
  11. package/esm/global-disposables.js.map +1 -0
  12. package/esm/helpers.js +38 -0
  13. package/esm/helpers.js.map +1 -0
  14. package/{dist → esm}/identity-context.js +3 -6
  15. package/esm/identity-context.js.map +1 -0
  16. package/{dist → esm}/in-memory-store.js +6 -11
  17. package/esm/in-memory-store.js.map +1 -0
  18. package/esm/index.js +9 -0
  19. package/esm/index.js.map +1 -0
  20. package/esm/models/physical-store.js +30 -0
  21. package/esm/models/physical-store.js.map +1 -0
  22. package/esm/models/user.js +6 -0
  23. package/esm/models/user.js.map +1 -0
  24. package/{dist → esm}/store-manager.js +5 -10
  25. package/esm/store-manager.js.map +1 -0
  26. package/package.json +29 -9
  27. package/src/create-physical-store-tests.ts +1 -0
  28. package/src/global-disposable.spec.ts +2 -1
  29. package/src/helpers.ts +1 -2
  30. package/src/identity-context.spec.ts +4 -3
  31. package/src/in-memory-store.spec.ts +1 -0
  32. package/src/in-memory-store.ts +0 -1
  33. package/src/index.ts +0 -1
  34. package/src/models/physical-store.ts +0 -5
  35. package/src/store-manager.spec.ts +1 -0
  36. package/src/store-manager.ts +0 -2
  37. package/types/create-physical-store-tests.d.ts.map +1 -1
  38. package/types/helpers.d.ts +1 -2
  39. package/types/helpers.d.ts.map +1 -1
  40. package/types/in-memory-store.d.ts +0 -1
  41. package/types/in-memory-store.d.ts.map +1 -1
  42. package/types/index.d.ts +0 -1
  43. package/types/index.d.ts.map +1 -1
  44. package/types/models/physical-store.d.ts +0 -5
  45. package/types/models/physical-store.d.ts.map +1 -1
  46. package/types/store-manager.d.ts +0 -2
  47. package/types/store-manager.d.ts.map +1 -1
  48. package/dist/create-physical-store-tests.js.map +0 -1
  49. package/dist/errors/aggregated-error.js +0 -15
  50. package/dist/errors/aggregated-error.js.map +0 -1
  51. package/dist/errors/authorization-error.js +0 -7
  52. package/dist/errors/index.js +0 -19
  53. package/dist/errors/index.js.map +0 -1
  54. package/dist/global-disposable.spec.js +0 -33
  55. package/dist/global-disposable.spec.js.map +0 -1
  56. package/dist/global-disposables.js +0 -29
  57. package/dist/global-disposables.js.map +0 -1
  58. package/dist/helpers.js +0 -48
  59. package/dist/helpers.js.map +0 -1
  60. package/dist/identity-context.js.map +0 -1
  61. package/dist/identity-context.spec.js +0 -41
  62. package/dist/identity-context.spec.js.map +0 -1
  63. package/dist/in-memory-store.js.map +0 -1
  64. package/dist/in-memory-store.spec.js +0 -20
  65. package/dist/in-memory-store.spec.js.map +0 -1
  66. package/dist/index.js +0 -26
  67. package/dist/index.js.map +0 -1
  68. package/dist/models/physical-store.js +0 -36
  69. package/dist/models/physical-store.js.map +0 -1
  70. package/dist/models/user.js +0 -10
  71. package/dist/models/user.js.map +0 -1
  72. package/dist/store-manager.js.map +0 -1
  73. package/dist/store-manager.spec.js +0 -64
  74. package/dist/store-manager.spec.js.map +0 -1
  75. package/types/global-disposable.spec.d.ts +0 -2
  76. package/types/global-disposable.spec.d.ts.map +0 -1
  77. package/types/identity-context.spec.d.ts +0 -2
  78. package/types/identity-context.spec.d.ts.map +0 -1
  79. package/types/in-memory-store.spec.d.ts +0 -2
  80. package/types/in-memory-store.spec.d.ts.map +0 -1
  81. package/types/store-manager.spec.d.ts +0 -2
  82. package/types/store-manager.spec.d.ts.map +0 -1
package/README.md CHANGED
@@ -34,7 +34,7 @@ globalDisposables.add(myRootInjector)
34
34
  There is a set of generic store test that you can use to test your custom store implementation as the following example shows:
35
35
 
36
36
  ```ts
37
- import { TestClass, createStoreTest } from '@furystack/core/dist/create-physical-store-tests'
37
+ import { TestClass, createStoreTest } from '@furystack/core/create-physical-store-tests'
38
38
 
39
39
  describe('myStore', ()=>{
40
40
  createStoreTest({
@@ -1,13 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createStoreTest = exports.createMockEntity = exports.TestClass = void 0;
4
- const utils_1 = require("@furystack/utils");
5
- const inject_1 = require("@furystack/inject");
6
- class TestClass {
1
+ import { usingAsync } from '@furystack/utils';
2
+ import { Injector } from '@furystack/inject';
3
+ import { describe, it, expect } from 'vitest';
4
+ export class TestClass {
7
5
  }
8
- exports.TestClass = TestClass;
9
6
  let idIndex = 0;
10
- const createMockEntity = (part) => ({
7
+ export const createMockEntity = (part) => ({
11
8
  id: idIndex++,
12
9
  stringValue1: 'foo',
13
10
  stringValue2: 'bar',
@@ -17,30 +14,29 @@ const createMockEntity = (part) => ({
17
14
  dateValue: new Date(),
18
15
  ...part,
19
16
  });
20
- exports.createMockEntity = createMockEntity;
21
- const createStoreTest = (options) => {
17
+ export const createStoreTest = (options) => {
22
18
  describe(`Standard Physical Store tests for '${options.typeName}'`, () => {
23
19
  describe('General CRUD', () => {
24
20
  it('Should be created with empty by default', async () => {
25
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
21
+ await usingAsync(new Injector(), async (i) => {
26
22
  const store = options.createStore(i);
27
23
  const count = await store.count();
28
24
  expect(count).toBe(0);
29
25
  });
30
26
  });
31
27
  it('Should be able to store an entity', async () => {
32
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
28
+ await usingAsync(new Injector(), async (i) => {
33
29
  const store = options.createStore(i);
34
- const entity = (0, exports.createMockEntity)();
30
+ const entity = createMockEntity();
35
31
  await store.add(entity);
36
32
  const count = await store.count();
37
33
  expect(count).toBe(1);
38
34
  });
39
35
  });
40
36
  it('Should be able to store an entity without providing an unique Id', async () => {
41
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
37
+ await usingAsync(new Injector(), async (i) => {
42
38
  const store = options.createStore(i);
43
- const { id, ...entityWithoutId } = (0, exports.createMockEntity)();
39
+ const { id, ...entityWithoutId } = createMockEntity();
44
40
  const { created } = await store.add(entityWithoutId);
45
41
  expect(created.length).toBe(1);
46
42
  const count = await store.count();
@@ -50,19 +46,19 @@ const createStoreTest = (options) => {
50
46
  });
51
47
  });
52
48
  it('Should be able to store multiple entities', async () => {
53
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
49
+ await usingAsync(new Injector(), async (i) => {
54
50
  const store = options.createStore(i);
55
- const entity1 = (0, exports.createMockEntity)();
56
- const entity2 = (0, exports.createMockEntity)();
51
+ const entity1 = createMockEntity();
52
+ const entity2 = createMockEntity();
57
53
  await store.add(entity1, entity2);
58
54
  const count = await store.count();
59
55
  expect(count).toBe(2);
60
56
  });
61
57
  });
62
58
  it('Add should throw and skip adding on duplicate IDs', async () => {
63
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
59
+ await usingAsync(new Injector(), async (i) => {
64
60
  const store = options.createStore(i);
65
- const entity = (0, exports.createMockEntity)();
61
+ const entity = createMockEntity();
66
62
  await store.add(entity);
67
63
  await expect(store.add(entity)).rejects.toThrow();
68
64
  const count = await store.count();
@@ -70,25 +66,25 @@ const createStoreTest = (options) => {
70
66
  });
71
67
  });
72
68
  it('Should return undefined if no entry has been found', async () => {
73
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
69
+ await usingAsync(new Injector(), async (i) => {
74
70
  const store = options.createStore(i);
75
71
  const entity = await store.get(1);
76
72
  expect(entity).toBeUndefined();
77
73
  });
78
74
  });
79
75
  it('Should be able to retrieve an added entity', async () => {
80
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
76
+ await usingAsync(new Injector(), async (i) => {
81
77
  const store = options.createStore(i);
82
- const entity = (0, exports.createMockEntity)();
78
+ const entity = createMockEntity();
83
79
  await store.add(entity);
84
80
  const retrieved = await store.get(entity.id);
85
81
  expect(retrieved).toEqual(entity);
86
82
  });
87
83
  });
88
84
  it('Should be able to retrieve an added entity with projection', async () => {
89
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
85
+ await usingAsync(new Injector(), async (i) => {
90
86
  const store = options.createStore(i);
91
- const entity = (0, exports.createMockEntity)();
87
+ const entity = createMockEntity();
92
88
  await store.add(entity);
93
89
  const retrieved = await store.get(entity.id, ['id', 'stringValue1']);
94
90
  expect(retrieved).not.toEqual(entity);
@@ -98,9 +94,9 @@ const createStoreTest = (options) => {
98
94
  });
99
95
  });
100
96
  it('Should be able to update an added entity', async () => {
101
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
97
+ await usingAsync(new Injector(), async (i) => {
102
98
  const store = options.createStore(i);
103
- const entity = (0, exports.createMockEntity)();
99
+ const entity = createMockEntity();
104
100
  await store.add(entity);
105
101
  await store.update(entity.id, { stringValue1: 'modified' });
106
102
  const retrieved = await store.get(entity.id);
@@ -108,16 +104,16 @@ const createStoreTest = (options) => {
108
104
  });
109
105
  });
110
106
  it('Update should throw an error if the entity does not exists', async () => {
111
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
107
+ await usingAsync(new Injector(), async (i) => {
112
108
  const store = options.createStore(i);
113
- const entity = (0, exports.createMockEntity)();
109
+ const entity = createMockEntity();
114
110
  await expect(store.update(entity.id, entity)).rejects.toThrow('Entity not found');
115
111
  });
116
112
  });
117
113
  it('Should remove an entity', async () => {
118
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
114
+ await usingAsync(new Injector(), async (i) => {
119
115
  const store = options.createStore(i);
120
- const entity = (0, exports.createMockEntity)();
116
+ const entity = createMockEntity();
121
117
  await store.add(entity);
122
118
  const count = await store.count();
123
119
  expect(count).toBe(1);
@@ -127,11 +123,11 @@ const createStoreTest = (options) => {
127
123
  });
128
124
  });
129
125
  it('Should remove multiple entities at once', async () => {
130
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
126
+ await usingAsync(new Injector(), async (i) => {
131
127
  const store = options.createStore(i);
132
- const entity1 = (0, exports.createMockEntity)();
133
- const entity2 = (0, exports.createMockEntity)();
134
- const entity3 = (0, exports.createMockEntity)();
128
+ const entity1 = createMockEntity();
129
+ const entity2 = createMockEntity();
130
+ const entity3 = createMockEntity();
135
131
  await store.add(entity1, entity2, entity3);
136
132
  const count = await store.count();
137
133
  expect(count).toBe(3);
@@ -146,10 +142,10 @@ const createStoreTest = (options) => {
146
142
  });
147
143
  describe('Top, skip', () => {
148
144
  it('Should respect top and skip', async () => {
149
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (injector) => {
145
+ await usingAsync(new Injector(), async (injector) => {
150
146
  const store = options.createStore(injector);
151
147
  for (let i = 0; i < 10; i++) {
152
- await store.add((0, exports.createMockEntity)({ id: i }));
148
+ await store.add(createMockEntity({ id: i }));
153
149
  }
154
150
  const zeroToThree = await store.find({ top: 4, select: ['id'] });
155
151
  expect(zeroToThree).toEqual([{ id: 0 }, { id: 1 }, { id: 2 }, { id: 3 }]);
@@ -162,14 +158,14 @@ const createStoreTest = (options) => {
162
158
  });
163
159
  describe('Ordering', () => {
164
160
  it('Should sort by numeric values', async () => {
165
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (injector) => {
161
+ await usingAsync(new Injector(), async (injector) => {
166
162
  const store = options.createStore(injector);
167
163
  for (let i = 0; i < 10; i++) {
168
- await store.add((0, exports.createMockEntity)({ id: i, numberValue1: Math.random(), numberValue2: Math.random() }));
164
+ await store.add(createMockEntity({ id: i, numberValue1: Math.random(), numberValue2: Math.random() }));
169
165
  }
170
166
  // For equality
171
- await store.add((0, exports.createMockEntity)({ id: 20, numberValue1: 0, numberValue2: 0 }));
172
- await store.add((0, exports.createMockEntity)({ id: 21, numberValue1: 0, numberValue2: 0 }));
167
+ await store.add(createMockEntity({ id: 20, numberValue1: 0, numberValue2: 0 }));
168
+ await store.add(createMockEntity({ id: 21, numberValue1: 0, numberValue2: 0 }));
173
169
  const orderByValue1Asc = await store.find({ order: { numberValue1: 'ASC' } });
174
170
  let min = 0;
175
171
  for (const currentValue of orderByValue1Asc) {
@@ -191,96 +187,96 @@ const createStoreTest = (options) => {
191
187
  });
192
188
  describe('Filtering', () => {
193
189
  it('should filter strings with $eq', async () => {
194
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
190
+ await usingAsync(new Injector(), async (i) => {
195
191
  const store = options.createStore(i);
196
- await store.add((0, exports.createMockEntity)({ id: 1, stringValue1: 'asd' }), (0, exports.createMockEntity)({ id: 2, stringValue1: 'def' }), (0, exports.createMockEntity)({ id: 3, stringValue1: 'def' }));
192
+ await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'def' }), createMockEntity({ id: 3, stringValue1: 'def' }));
197
193
  const result = await store.find({ filter: { stringValue1: { $eq: 'def' } } });
198
194
  expect(result.length).toBe(2);
199
195
  });
200
196
  });
201
197
  it('should filter numbers with $eq', async () => {
202
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
198
+ await usingAsync(new Injector(), async (i) => {
203
199
  const store = options.createStore(i);
204
- await store.add((0, exports.createMockEntity)({ id: 1, numberValue1: 1 }), (0, exports.createMockEntity)({ id: 2, numberValue1: 2 }), (0, exports.createMockEntity)({ id: 3, numberValue1: 2 }));
200
+ await store.add(createMockEntity({ id: 1, numberValue1: 1 }), createMockEntity({ id: 2, numberValue1: 2 }), createMockEntity({ id: 3, numberValue1: 2 }));
205
201
  const result = await store.find({ filter: { numberValue1: { $eq: 2 } } });
206
202
  expect(result.length).toBe(2);
207
203
  });
208
204
  });
209
205
  it('filter should return the corresponding entries for multiple props', async () => {
210
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
206
+ await usingAsync(new Injector(), async (i) => {
211
207
  const store = options.createStore(i);
212
- await store.add((0, exports.createMockEntity)({ id: 1, stringValue1: 'asd' }), (0, exports.createMockEntity)({ id: 2, stringValue1: 'def', stringValue2: 'def' }), (0, exports.createMockEntity)({ id: 3, stringValue1: 'def' }));
208
+ await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'def', stringValue2: 'def' }), createMockEntity({ id: 3, stringValue1: 'def' }));
213
209
  const result = await store.find({ filter: { stringValue1: { $eq: 'def' }, stringValue2: { $eq: 'def' } } });
214
210
  expect(result.length).toBe(1);
215
211
  });
216
212
  });
217
213
  it('filter should return the corresponding entries with $in statement', async () => {
218
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
214
+ await usingAsync(new Injector(), async (i) => {
219
215
  const store = options.createStore(i);
220
- await store.add((0, exports.createMockEntity)({ stringValue1: 'asd' }), (0, exports.createMockEntity)({ stringValue1: 'def' }), (0, exports.createMockEntity)({ stringValue1: 'sdf' }));
216
+ await store.add(createMockEntity({ stringValue1: 'asd' }), createMockEntity({ stringValue1: 'def' }), createMockEntity({ stringValue1: 'sdf' }));
221
217
  const result = await store.find({ filter: { stringValue1: { $in: ['asd', 'def'] } } });
222
218
  expect(result.length).toBe(2);
223
219
  expect(result.map((r) => r.stringValue1)).toEqual(['asd', 'def']);
224
220
  });
225
221
  });
226
222
  it('filter should return the corresponding entries with $nin statement', async () => {
227
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
223
+ await usingAsync(new Injector(), async (i) => {
228
224
  const store = options.createStore(i);
229
- await store.add((0, exports.createMockEntity)({ id: 1, stringValue1: 'asd' }), (0, exports.createMockEntity)({ id: 2, stringValue1: 'def' }), (0, exports.createMockEntity)({ id: 3, stringValue1: 'sdf' }));
225
+ await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'def' }), createMockEntity({ id: 3, stringValue1: 'sdf' }));
230
226
  const result = await store.find({ filter: { stringValue1: { $nin: ['asd', 'def'] } } });
231
227
  expect(result.length).toBe(1);
232
228
  expect(result.map((r) => r.stringValue1)).toEqual(['sdf']);
233
229
  });
234
230
  });
235
231
  it('filter should return the corresponding entries with $ne statement', async () => {
236
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
232
+ await usingAsync(new Injector(), async (i) => {
237
233
  const store = options.createStore(i);
238
- await store.add((0, exports.createMockEntity)({ id: 1, stringValue1: 'asd' }), (0, exports.createMockEntity)({ id: 2, stringValue1: 'def' }), (0, exports.createMockEntity)({ id: 3, stringValue1: 'sdf' }));
234
+ await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'def' }), createMockEntity({ id: 3, stringValue1: 'sdf' }));
239
235
  const result = await store.find({ filter: { stringValue1: { $ne: 'asd' } } });
240
236
  expect(result.length).toBe(2);
241
237
  expect(result.map((r) => r.stringValue1)).toEqual(['def', 'sdf']);
242
238
  });
243
239
  });
244
240
  it('filter should return the corresponding entries with $lt statement', async () => {
245
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
241
+ await usingAsync(new Injector(), async (i) => {
246
242
  const store = options.createStore(i);
247
- const { created } = await store.add((0, exports.createMockEntity)({ id: 1, numberValue1: 1 }), (0, exports.createMockEntity)({ id: 2, numberValue1: 2 }), (0, exports.createMockEntity)({ id: 3, numberValue1: 3 }));
243
+ const { created } = await store.add(createMockEntity({ id: 1, numberValue1: 1 }), createMockEntity({ id: 2, numberValue1: 2 }), createMockEntity({ id: 3, numberValue1: 3 }));
248
244
  const result = await store.find({ filter: { numberValue1: { $lt: 2 } } });
249
245
  expect(result.length).toBe(1);
250
246
  expect(result).toEqual([created[0]]);
251
247
  });
252
248
  });
253
249
  it('filter should return the corresponding entries with $lte statement', async () => {
254
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
250
+ await usingAsync(new Injector(), async (i) => {
255
251
  const store = options.createStore(i);
256
- const { created } = await store.add((0, exports.createMockEntity)({ id: 1, numberValue1: 1 }), (0, exports.createMockEntity)({ id: 2, numberValue1: 2 }), (0, exports.createMockEntity)({ id: 3, numberValue1: 3 }));
252
+ const { created } = await store.add(createMockEntity({ id: 1, numberValue1: 1 }), createMockEntity({ id: 2, numberValue1: 2 }), createMockEntity({ id: 3, numberValue1: 3 }));
257
253
  const result = await store.find({ filter: { numberValue1: { $lte: 2 } } });
258
254
  expect(result.length).toBe(2);
259
255
  expect(result).toEqual([created[0], created[1]]);
260
256
  });
261
257
  });
262
258
  it('filter should return the corresponding entries with $gt statement', async () => {
263
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
259
+ await usingAsync(new Injector(), async (i) => {
264
260
  const store = options.createStore(i);
265
- const { created } = await store.add((0, exports.createMockEntity)({ id: 1, numberValue1: 1 }), (0, exports.createMockEntity)({ id: 2, numberValue1: 2 }), (0, exports.createMockEntity)({ id: 3, numberValue1: 3 }));
261
+ const { created } = await store.add(createMockEntity({ id: 1, numberValue1: 1 }), createMockEntity({ id: 2, numberValue1: 2 }), createMockEntity({ id: 3, numberValue1: 3 }));
266
262
  const result = await store.find({ filter: { numberValue1: { $gt: 2 } } });
267
263
  expect(result.length).toBe(1);
268
264
  expect(result).toEqual([created[2]]);
269
265
  });
270
266
  });
271
267
  it('filter should return the corresponding entries with $gte statement', async () => {
272
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
268
+ await usingAsync(new Injector(), async (i) => {
273
269
  const store = options.createStore(i);
274
- const { created } = await store.add((0, exports.createMockEntity)({ id: 1, numberValue1: 1 }), (0, exports.createMockEntity)({ id: 2, numberValue1: 2 }), (0, exports.createMockEntity)({ id: 3, numberValue1: 3 }));
270
+ const { created } = await store.add(createMockEntity({ id: 1, numberValue1: 1 }), createMockEntity({ id: 2, numberValue1: 2 }), createMockEntity({ id: 3, numberValue1: 3 }));
275
271
  const result = await store.find({ filter: { numberValue1: { $gte: 2 } } });
276
272
  expect(result.length).toBe(2);
277
273
  expect(result).toEqual([created[1], created[2]]);
278
274
  });
279
275
  });
280
276
  it('filter should return the corresponding entries with $in AND $eq statement', async () => {
281
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
277
+ await usingAsync(new Injector(), async (i) => {
282
278
  const store = options.createStore(i);
283
- await store.add((0, exports.createMockEntity)({ id: 1, stringValue1: 'asd' }), (0, exports.createMockEntity)({ id: 2, stringValue1: 'def' }), (0, exports.createMockEntity)({ id: 3, stringValue1: 'sdf' }));
279
+ await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'def' }), createMockEntity({ id: 3, stringValue1: 'sdf' }));
284
280
  const result = await store.find({ filter: { stringValue1: { $in: ['asd', 'def'], $eq: 'asd' } } });
285
281
  expect(result.length).toBe(1);
286
282
  expect(result.map((r) => r.stringValue1)).toEqual(['asd']);
@@ -288,9 +284,9 @@ const createStoreTest = (options) => {
288
284
  });
289
285
  describe('logical $and statements', () => {
290
286
  it('should filter $and logical statements with $eq statements', async () => {
291
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
287
+ await usingAsync(new Injector(), async (i) => {
292
288
  const store = options.createStore(i);
293
- const { created } = await store.add((0, exports.createMockEntity)({ id: 1, numberValue1: 1, numberValue2: 1 }), (0, exports.createMockEntity)({ id: 2, numberValue1: 2, numberValue2: 1 }), (0, exports.createMockEntity)({ id: 3, numberValue1: 3, numberValue2: 1 }));
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 }));
294
290
  const result = await store.find({
295
291
  filter: { $and: [{ numberValue1: { $eq: 2 } }, { numberValue2: { $eq: 1 } }] },
296
292
  });
@@ -299,9 +295,9 @@ const createStoreTest = (options) => {
299
295
  });
300
296
  });
301
297
  it('should filter $and logical statements with $ne statements', async () => {
302
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
298
+ await usingAsync(new Injector(), async (i) => {
303
299
  const store = options.createStore(i);
304
- const { created } = await store.add((0, exports.createMockEntity)({ id: 1, numberValue1: 1, numberValue2: 2 }), (0, exports.createMockEntity)({ id: 2, numberValue1: 2, numberValue2: 3 }), (0, exports.createMockEntity)({ id: 3, numberValue1: 3, numberValue2: 1 }));
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 }));
305
301
  const result = await store.find({
306
302
  filter: { $and: [{ numberValue1: { $ne: 2 } }, { numberValue2: { $ne: 1 } }] },
307
303
  });
@@ -310,9 +306,9 @@ const createStoreTest = (options) => {
310
306
  });
311
307
  });
312
308
  it('should filter $and logical statements with $lt/$gt statements', async () => {
313
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
309
+ await usingAsync(new Injector(), async (i) => {
314
310
  const store = options.createStore(i);
315
- const { created } = await store.add((0, exports.createMockEntity)({ id: 1, numberValue1: 1, numberValue2: 2 }), (0, exports.createMockEntity)({ id: 2, numberValue1: 2, numberValue2: 3 }), (0, exports.createMockEntity)({ id: 3, numberValue1: 3, numberValue2: 1 }));
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 }));
316
312
  const result = await store.find({
317
313
  filter: { $and: [{ numberValue1: { $lt: 3 } }, { numberValue2: { $gt: 2 } }] },
318
314
  });
@@ -321,9 +317,9 @@ const createStoreTest = (options) => {
321
317
  });
322
318
  });
323
319
  it('should filter $and logical statements with $lte/$gte statements', async () => {
324
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
320
+ await usingAsync(new Injector(), async (i) => {
325
321
  const store = options.createStore(i);
326
- const { created } = await store.add((0, exports.createMockEntity)({ id: 1, numberValue1: 1, numberValue2: 1 }), (0, exports.createMockEntity)({ id: 2, numberValue1: 2, numberValue2: 2 }), (0, exports.createMockEntity)({ id: 3, numberValue1: 3, numberValue2: 3 }));
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 }));
327
323
  const result = await store.find({
328
324
  filter: { $and: [{ numberValue1: { $lte: 2 } }, { numberValue2: { $gte: 2 } }] },
329
325
  });
@@ -334,9 +330,9 @@ const createStoreTest = (options) => {
334
330
  });
335
331
  describe('logical $or statements', () => {
336
332
  it('should filter logical $or statements with $eq statements', async () => {
337
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
333
+ await usingAsync(new Injector(), async (i) => {
338
334
  const store = options.createStore(i);
339
- const { created } = await store.add((0, exports.createMockEntity)({ id: 1, stringValue1: 'asd' }), (0, exports.createMockEntity)({ id: 2, stringValue1: 'aaa' }), (0, exports.createMockEntity)({ id: 3, stringValue1: 'bbb' }));
335
+ const { created } = await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'aaa' }), createMockEntity({ id: 3, stringValue1: 'bbb' }));
340
336
  const result = await store.find({
341
337
  filter: { $or: [{ stringValue1: { $eq: 'aaa' } }, { stringValue1: { $eq: 'bbb' } }] },
342
338
  });
@@ -345,9 +341,9 @@ const createStoreTest = (options) => {
345
341
  });
346
342
  });
347
343
  it('should filter logical $or statements with $neq statements', async () => {
348
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
344
+ await usingAsync(new Injector(), async (i) => {
349
345
  const store = options.createStore(i);
350
- const { created } = await store.add((0, exports.createMockEntity)({ id: 1, stringValue1: 'asd' }), (0, exports.createMockEntity)({ id: 2, stringValue1: 'aaa' }), (0, exports.createMockEntity)({ id: 3, stringValue1: 'bbb' }));
346
+ const { created } = await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'aaa' }), createMockEntity({ id: 3, stringValue1: 'bbb' }));
351
347
  const result = await store.find({
352
348
  filter: { $or: [{ stringValue1: { $ne: 'aaa' } }, { stringValue1: { $ne: 'bbb' } }] },
353
349
  });
@@ -358,9 +354,9 @@ const createStoreTest = (options) => {
358
354
  });
359
355
  describe('Nested $or and $and logical operators', () => {
360
356
  it('should filter $and operators inside $or-s', async () => {
361
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
357
+ await usingAsync(new Injector(), async (i) => {
362
358
  const store = options.createStore(i);
363
- const { created } = await store.add((0, exports.createMockEntity)({ id: 1, numberValue1: 1, numberValue2: 3, booleanValue: true }), (0, exports.createMockEntity)({ id: 2, numberValue1: 2, numberValue2: 2, booleanValue: false }), (0, exports.createMockEntity)({ id: 3, numberValue1: 3, numberValue2: 1, booleanValue: true }));
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 }));
364
360
  const result = await store.find({
365
361
  filter: {
366
362
  $or: [
@@ -380,9 +376,9 @@ const createStoreTest = (options) => {
380
376
  });
381
377
  if (!options.skipRegexTests) {
382
378
  it('filter should return the corresponding entries with $regex', async () => {
383
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
379
+ await usingAsync(new Injector(), async (i) => {
384
380
  const store = options.createStore(i);
385
- await store.add((0, exports.createMockEntity)({ id: 1, stringValue1: 'asd' }), (0, exports.createMockEntity)({ id: 2, stringValue1: 'aaa' }), (0, exports.createMockEntity)({ id: 3, stringValue1: 'bbb' }));
381
+ await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'aaa' }), createMockEntity({ id: 3, stringValue1: 'bbb' }));
386
382
  const result = await store.find({ filter: { stringValue1: { $regex: '([a])' } } });
387
383
  expect(result.length).toBe(2);
388
384
  expect(result.map((r) => r.stringValue1)).toEqual(['asd', 'aaa']);
@@ -391,27 +387,27 @@ const createStoreTest = (options) => {
391
387
  }
392
388
  if (!options.skipStringTests) {
393
389
  it('filter should return the corresponding entries with $startsWith', async () => {
394
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
390
+ await usingAsync(new Injector(), async (i) => {
395
391
  const store = options.createStore(i);
396
- await store.add((0, exports.createMockEntity)({ id: 1, stringValue1: 'asd' }), (0, exports.createMockEntity)({ id: 2, stringValue1: 'aaa' }), (0, exports.createMockEntity)({ id: 3, stringValue1: 'bbb' }));
392
+ await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'aaa' }), createMockEntity({ id: 3, stringValue1: 'bbb' }));
397
393
  const result = await store.find({ filter: { stringValue1: { $startsWith: 'aa' } } });
398
394
  expect(result.length).toBe(1);
399
395
  expect(result.map((r) => r.stringValue1)).toEqual(['aaa']);
400
396
  });
401
397
  });
402
398
  it('filter should return the corresponding entries with $endsWith', async () => {
403
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
399
+ await usingAsync(new Injector(), async (i) => {
404
400
  const store = options.createStore(i);
405
- await store.add((0, exports.createMockEntity)({ id: 1, stringValue1: 'asd' }), (0, exports.createMockEntity)({ id: 2, stringValue1: 'aaa' }), (0, exports.createMockEntity)({ id: 3, stringValue1: 'bbb' }));
401
+ await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'aaa' }), createMockEntity({ id: 3, stringValue1: 'bbb' }));
406
402
  const result = await store.find({ filter: { stringValue1: { $endsWith: 'bb' } } });
407
403
  expect(result.length).toBe(1);
408
404
  expect(result.map((r) => r.stringValue1)).toEqual(['bbb']);
409
405
  });
410
406
  });
411
407
  it('filter should return the corresponding entries with $like', async () => {
412
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
408
+ await usingAsync(new Injector(), async (i) => {
413
409
  const store = options.createStore(i);
414
- await store.add((0, exports.createMockEntity)({ id: 1, stringValue1: 'asd' }), (0, exports.createMockEntity)({ id: 2, stringValue1: 'aaa' }), (0, exports.createMockEntity)({ id: 3, stringValue1: 'bbb' }));
410
+ await store.add(createMockEntity({ id: 1, stringValue1: 'asd' }), createMockEntity({ id: 2, stringValue1: 'aaa' }), createMockEntity({ id: 3, stringValue1: 'bbb' }));
415
411
  const result = await store.find({ filter: { stringValue1: { $like: '%a%' } } });
416
412
  expect(result.length).toBe(2);
417
413
  expect(result.map((r) => r.stringValue1)).toEqual(['asd', 'aaa']);
@@ -427,17 +423,17 @@ const createStoreTest = (options) => {
427
423
  });
428
424
  describe('Count', () => {
429
425
  it('Should return the count', async () => {
430
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
426
+ await usingAsync(new Injector(), async (i) => {
431
427
  const store = options.createStore(i);
432
- await store.add((0, exports.createMockEntity)(), (0, exports.createMockEntity)(), (0, exports.createMockEntity)());
428
+ await store.add(createMockEntity(), createMockEntity(), createMockEntity());
433
429
  const count = await store.count();
434
430
  expect(count).toBe(3);
435
431
  });
436
432
  });
437
433
  it('Should respect filters', async () => {
438
- await (0, utils_1.usingAsync)(new inject_1.Injector(), async (i) => {
434
+ await usingAsync(new Injector(), async (i) => {
439
435
  const store = options.createStore(i);
440
- await store.add((0, exports.createMockEntity)({ numberValue1: 1 }), (0, exports.createMockEntity)({ numberValue1: 1 }), (0, exports.createMockEntity)({ numberValue1: 2 }));
436
+ await store.add(createMockEntity({ numberValue1: 1 }), createMockEntity({ numberValue1: 1 }), createMockEntity({ numberValue1: 2 }));
441
437
  const count = await store.count({ numberValue1: { $eq: 1 } });
442
438
  expect(count).toBe(2);
443
439
  const count2 = await store.count({ numberValue1: { $eq: 2 } });
@@ -447,5 +443,4 @@ const createStoreTest = (options) => {
447
443
  });
448
444
  });
449
445
  };
450
- exports.createStoreTest = createStoreTest;
451
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,EAAE,EAAE;oBAC3C,MAAM,KAAK,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;oBACpC,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,KAAK,EAAE,C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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,3 @@
1
+ export class AuthorizationError extends Error {
2
+ }
3
+ //# sourceMappingURL=authorization-error.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"authorization-error.js","sourceRoot":"","sources":["../../src/errors/authorization-error.ts"],"names":[],"mappings":";;;AAAA,MAAa,kBAAmB,SAAQ,KAAK;CAAG;AAAhD,gDAAgD"}
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,3 @@
1
+ export * from './authorization-error';
2
+ export * from './aggregated-error';
3
+ //# sourceMappingURL=index.js.map
@@ -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