@hf-chimera/store 0.0.15 → 0.2.0

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 (64) hide show
  1. package/README.md +171 -360
  2. package/dist/defaults-CDnbUToo.cjs +175 -0
  3. package/dist/defaults-CDnbUToo.cjs.map +1 -0
  4. package/dist/defaults-DkrKTPXY.mjs +91 -0
  5. package/dist/defaults-DkrKTPXY.mjs.map +1 -0
  6. package/dist/defaults.cjs +3 -14
  7. package/dist/defaults.d.cts +16 -42
  8. package/dist/defaults.d.cts.map +1 -1
  9. package/dist/defaults.d.mts +33 -0
  10. package/dist/defaults.d.mts.map +1 -0
  11. package/dist/defaults.mjs +3 -0
  12. package/dist/index.cjs +1709 -23
  13. package/dist/index.cjs.map +1 -0
  14. package/dist/index.d.cts +634 -2
  15. package/dist/index.d.cts.map +1 -0
  16. package/dist/index.d.mts +634 -0
  17. package/dist/index.d.mts.map +1 -0
  18. package/dist/{src-C74sq0jQ.js → index.mjs} +252 -246
  19. package/dist/index.mjs.map +1 -0
  20. package/dist/types-CNGIuRUw.d.mts +117 -0
  21. package/dist/types-CNGIuRUw.d.mts.map +1 -0
  22. package/dist/types-CuI5yXiY.d.cts +117 -0
  23. package/dist/types-CuI5yXiY.d.cts.map +1 -0
  24. package/package.json +10 -42
  25. package/.changeset/README.md +0 -8
  26. package/CHANGELOG.md +0 -92
  27. package/dist/adapters/react.cjs +0 -122
  28. package/dist/adapters/react.cjs.map +0 -1
  29. package/dist/adapters/react.d.cts +0 -39
  30. package/dist/adapters/react.d.cts.map +0 -1
  31. package/dist/adapters/react.d.ts +0 -39
  32. package/dist/adapters/react.d.ts.map +0 -1
  33. package/dist/adapters/react.js +0 -92
  34. package/dist/adapters/react.js.map +0 -1
  35. package/dist/defaults-Bg1kIemd.cjs +0 -372
  36. package/dist/defaults-Bg1kIemd.cjs.map +0 -1
  37. package/dist/defaults-CLUQg2zK.js +0 -210
  38. package/dist/defaults-CLUQg2zK.js.map +0 -1
  39. package/dist/defaults.cjs.map +0 -1
  40. package/dist/defaults.d.ts +0 -59
  41. package/dist/defaults.d.ts.map +0 -1
  42. package/dist/defaults.js +0 -13
  43. package/dist/defaults.js.map +0 -1
  44. package/dist/index-B6sY7hiW.d.ts +0 -22
  45. package/dist/index-B6sY7hiW.d.ts.map +0 -1
  46. package/dist/index-CTTQ1Hr3.d.ts +0 -821
  47. package/dist/index-CTTQ1Hr3.d.ts.map +0 -1
  48. package/dist/index-CiER0sxG.d.cts +0 -22
  49. package/dist/index-CiER0sxG.d.cts.map +0 -1
  50. package/dist/index-CkaYmEhA.d.cts +0 -821
  51. package/dist/index-CkaYmEhA.d.cts.map +0 -1
  52. package/dist/index.d.ts +0 -2
  53. package/dist/index.js +0 -4
  54. package/dist/qb-PXzZgo2H.cjs +0 -50
  55. package/dist/qb-PXzZgo2H.cjs.map +0 -1
  56. package/dist/qb-pchs-vdM.js +0 -45
  57. package/dist/qb-pchs-vdM.js.map +0 -1
  58. package/dist/qb.cjs +0 -5
  59. package/dist/qb.d.cts +0 -3
  60. package/dist/qb.d.ts +0 -3
  61. package/dist/qb.js +0 -5
  62. package/dist/src-C74sq0jQ.js.map +0 -1
  63. package/dist/src-TJG6k3Nr.cjs +0 -1771
  64. package/dist/src-TJG6k3Nr.cjs.map +0 -1
@@ -1,372 +0,0 @@
1
-
2
- //#region src/shared/errors.ts
3
- var ChimeraError = class extends Error {};
4
- var ChimeraInternalError = class extends ChimeraError {
5
- constructor(message, options) {
6
- super(`${message}\nIf you have this bug, feel free to create an issue in https://github.com/hf-chimera/store/issues`, options);
7
- }
8
- };
9
-
10
- //#endregion
11
- //#region src/order/errors.ts
12
- var ChimeraOrderError = class extends ChimeraError {};
13
- var ChimeraOrderTypeError = class extends ChimeraOrderError {};
14
- var ChimeraOrderTypeComparisonError = class extends ChimeraOrderTypeError {
15
- constructor(a, b) {
16
- super(`Unsupported comparison "${a}"(${typeof a}[${a != null ? a.constructor.name : a}]) with "${b}"(${typeof b}[${b != null ? b.constructor.name : b}])`);
17
- }
18
- };
19
-
20
- //#endregion
21
- //#region src/query/errors.ts
22
- const formatDeepErrorMessage = (message, cause) => `${message}: ${cause instanceof Error ? `\n ${cause.stack}` : cause}`;
23
- var ChimeraQueryError = class extends ChimeraError {
24
- entityName;
25
- constructor(entityName, message, options) {
26
- super(message, options);
27
- this.entityName = entityName;
28
- }
29
- };
30
- var ChimeraQueryIdMismatchError = class extends ChimeraQueryError {
31
- old;
32
- new;
33
- constructor(entityName, oldId, newId) {
34
- super(entityName, `
35
- Can't update "${entityName}" item if the change updates it's [id] (changed from "${oldId}" to "${newId}").
36
- If such an update should not be an error, update <idGetter> field in "${entityName}" entity config to make Chimera get the [id] value properly.
37
- `.trim());
38
- this.old = oldId;
39
- this.new = newId;
40
- }
41
- };
42
- var ChimeraQueryNotSpecifiedError = class extends ChimeraQueryError {
43
- methodName;
44
- constructor(entityName, methodName) {
45
- super(entityName, `<${methodName}> for entity "${entityName}" was not specified`);
46
- this.methodName = methodName;
47
- }
48
- };
49
- var ChimeraQueryTrustError = class extends ChimeraQueryError {
50
- constructor(entityName, description) {
51
- super(entityName, `
52
- DO NOT IGNORE THIS ERROR OR YOUR PROD MAY BREAK!
53
-
54
- Looks like your "${entityName}" query provider ${description}
55
-
56
- By default Chimera tend to trust external query provider to avoid extra data processing.
57
- If it is not your case, set field "trustQuery" to "false" in config defaults or for specific entity.
58
- This error visible only if "devMode" is "true".
59
- If you'll ignore it, your production may fail, because Chimera won't check the data correctness.
60
- `.trim());
61
- }
62
- };
63
- var ChimeraQueryTrustIdMismatchError = class extends ChimeraQueryTrustError {
64
- old;
65
- new;
66
- constructor(entityName, oldId, newId) {
67
- super(entityName, `
68
- returned an item with [id] that not matches with the [id] of item that was updated (changed from "${oldId}" to "${newId}").
69
- If it is not an error, update <idGetter> field in "${entityName}" entity config to make Chimera get the [id] value properly.
70
- `.trim());
71
- this.old = oldId;
72
- this.new = newId;
73
- }
74
- };
75
- var ChimeraQueryTrustFetchedCollectionError = class extends ChimeraQueryTrustError {
76
- old;
77
- new;
78
- constructor(entityName, input, output) {
79
- super(entityName, "returned not properly sorted or ordered collection.");
80
- this.old = input;
81
- this.new = output;
82
- }
83
- };
84
- var ChimeraQueryFetchingError = class extends ChimeraQueryError {
85
- constructor(entityName, cause) {
86
- super(entityName, formatDeepErrorMessage("Something went wrong", cause), { cause });
87
- }
88
- };
89
- var ChimeraQueryDeletingError = class extends ChimeraQueryError {
90
- constructor(entityName, cause) {
91
- super(entityName, formatDeepErrorMessage("Something went wrong", cause), { cause });
92
- }
93
- };
94
- var ChimeraQueryNotReadyError = class extends ChimeraQueryError {
95
- constructor(entityName) {
96
- super(entityName, "Unable to get unready value.");
97
- }
98
- };
99
- var ChimeraQueryDeletedItemError = class extends ChimeraQueryError {
100
- constructor(entityName, id) {
101
- super(entityName, `Unable to updated deleted item with [id] "${id}."`);
102
- }
103
- };
104
- var ChimeraQueryUnsuccessfulDeletionError = class extends ChimeraQueryError {
105
- constructor(entityName, id) {
106
- super(entityName, `Item with [id] "${id}" was not deleted.`);
107
- }
108
- };
109
- var ChimeraQueryAlreadyRunningError = class extends ChimeraQueryError {
110
- constructor(entityName, status) {
111
- super(entityName, `Unable to operate query. Other process already running ${status}.`);
112
- }
113
- };
114
- var ChimeraQueryNotCreatedError = class extends ChimeraQueryError {
115
- constructor(entityName) {
116
- super(entityName, "Unable to operate not created item.");
117
- }
118
- };
119
-
120
- //#endregion
121
- //#region src/debug/defaults.ts
122
- const chimeraDefaultDebugConfig = {
123
- devMode: false,
124
- logs: "info",
125
- name: "chimera"
126
- };
127
-
128
- //#endregion
129
- //#region src/filter/defaults.ts
130
- const getKeyFromOperation = (operator) => JSON.stringify(operator);
131
- const chimeraDefaultGetKeyFromFilter = (filter) => JSON.stringify(filter);
132
- const chimeraDefaultFilterOperators = {
133
- contains: (a, b) => {
134
- if (typeof a === "string") return a.includes(b);
135
- if (Array.isArray(a)) return Array.isArray(b) ? b.every((v) => a.includes(v)) : a.includes(b);
136
- return false;
137
- },
138
- endsWith: (a, b) => a.endsWith(b),
139
- startsWith: (a, b) => a.startsWith(b),
140
- eq: (a, b) => a === b,
141
- gt: (a, b) => a > b,
142
- gte: (a, b) => a >= b,
143
- in: (a, b) => (Array.isArray(a) ? a : [a]).some((v) => b.includes(v)),
144
- lt: (a, b) => a < b,
145
- lte: (a, b) => a <= b,
146
- neq: (a, b) => a !== b,
147
- notIn: (a, b) => (Array.isArray(a) ? a : [a]).every((v) => !b.includes(v))
148
- };
149
- const chimeraDefaultFilterConfig = {
150
- getFilterKey: chimeraDefaultGetKeyFromFilter,
151
- getOperatorKey: getKeyFromOperation,
152
- operators: chimeraDefaultFilterOperators
153
- };
154
-
155
- //#endregion
156
- //#region src/order/defaults.ts
157
- const chimeraDefaultComparator = (a, b) => {
158
- let result = 0;
159
- if (typeof a === "string" && typeof b === "string") result = a.localeCompare(b);
160
- else if (typeof a === "number" && typeof b === "number" || typeof a === "boolean" && typeof b === "boolean") result = a - b;
161
- else if (a instanceof Date && b instanceof Date) result = a.getTime() - b.getTime();
162
- else if (a == null || b == null) result = a == b ? 0 : a == null ? -1 : 1;
163
- else throw new ChimeraOrderTypeComparisonError(a, b);
164
- return result;
165
- };
166
- const chimeraDefaultKeyFromOrder = (order) => JSON.stringify(order);
167
- const chimeraDefaultOrderConfig = {
168
- getKey: chimeraDefaultKeyFromOrder,
169
- primitiveComparator: chimeraDefaultComparator
170
- };
171
-
172
- //#endregion
173
- //#region src/query/defaults.ts
174
- const chimeraDefaultQueryConfig = {
175
- defaults: {
176
- batchedCreator: (entity) => {
177
- throw new ChimeraQueryNotSpecifiedError(entity, "batchedCreator");
178
- },
179
- batchedDeleter: (entity) => {
180
- throw new ChimeraQueryNotSpecifiedError(entity, "batchedDeleter");
181
- },
182
- batchedUpdater: (entity) => {
183
- throw new ChimeraQueryNotSpecifiedError(entity, "batchedUpdater");
184
- },
185
- collectionFetcher: (entity) => {
186
- throw new ChimeraQueryNotSpecifiedError(entity, "collectionFetcher");
187
- },
188
- idGetter: (entity) => {
189
- throw new ChimeraQueryNotSpecifiedError(entity, "idGetter");
190
- },
191
- itemCreator: (entity) => {
192
- throw new ChimeraQueryNotSpecifiedError(entity, "itemCreator");
193
- },
194
- itemDeleter: (entity) => {
195
- throw new ChimeraQueryNotSpecifiedError(entity, "itemDeleter");
196
- },
197
- itemFetcher: (entity) => {
198
- throw new ChimeraQueryNotSpecifiedError(entity, "itemFetcher");
199
- },
200
- itemUpdater: (entity) => {
201
- throw new ChimeraQueryNotSpecifiedError(entity, "itemUpdater");
202
- },
203
- trustQuery: true,
204
- updateDebounceTimeout: 0
205
- },
206
- entities: {}
207
- };
208
-
209
- //#endregion
210
- Object.defineProperty(exports, 'ChimeraError', {
211
- enumerable: true,
212
- get: function () {
213
- return ChimeraError;
214
- }
215
- });
216
- Object.defineProperty(exports, 'ChimeraInternalError', {
217
- enumerable: true,
218
- get: function () {
219
- return ChimeraInternalError;
220
- }
221
- });
222
- Object.defineProperty(exports, 'ChimeraOrderError', {
223
- enumerable: true,
224
- get: function () {
225
- return ChimeraOrderError;
226
- }
227
- });
228
- Object.defineProperty(exports, 'ChimeraOrderTypeComparisonError', {
229
- enumerable: true,
230
- get: function () {
231
- return ChimeraOrderTypeComparisonError;
232
- }
233
- });
234
- Object.defineProperty(exports, 'ChimeraOrderTypeError', {
235
- enumerable: true,
236
- get: function () {
237
- return ChimeraOrderTypeError;
238
- }
239
- });
240
- Object.defineProperty(exports, 'ChimeraQueryAlreadyRunningError', {
241
- enumerable: true,
242
- get: function () {
243
- return ChimeraQueryAlreadyRunningError;
244
- }
245
- });
246
- Object.defineProperty(exports, 'ChimeraQueryDeletedItemError', {
247
- enumerable: true,
248
- get: function () {
249
- return ChimeraQueryDeletedItemError;
250
- }
251
- });
252
- Object.defineProperty(exports, 'ChimeraQueryDeletingError', {
253
- enumerable: true,
254
- get: function () {
255
- return ChimeraQueryDeletingError;
256
- }
257
- });
258
- Object.defineProperty(exports, 'ChimeraQueryError', {
259
- enumerable: true,
260
- get: function () {
261
- return ChimeraQueryError;
262
- }
263
- });
264
- Object.defineProperty(exports, 'ChimeraQueryFetchingError', {
265
- enumerable: true,
266
- get: function () {
267
- return ChimeraQueryFetchingError;
268
- }
269
- });
270
- Object.defineProperty(exports, 'ChimeraQueryIdMismatchError', {
271
- enumerable: true,
272
- get: function () {
273
- return ChimeraQueryIdMismatchError;
274
- }
275
- });
276
- Object.defineProperty(exports, 'ChimeraQueryNotCreatedError', {
277
- enumerable: true,
278
- get: function () {
279
- return ChimeraQueryNotCreatedError;
280
- }
281
- });
282
- Object.defineProperty(exports, 'ChimeraQueryNotReadyError', {
283
- enumerable: true,
284
- get: function () {
285
- return ChimeraQueryNotReadyError;
286
- }
287
- });
288
- Object.defineProperty(exports, 'ChimeraQueryNotSpecifiedError', {
289
- enumerable: true,
290
- get: function () {
291
- return ChimeraQueryNotSpecifiedError;
292
- }
293
- });
294
- Object.defineProperty(exports, 'ChimeraQueryTrustError', {
295
- enumerable: true,
296
- get: function () {
297
- return ChimeraQueryTrustError;
298
- }
299
- });
300
- Object.defineProperty(exports, 'ChimeraQueryTrustFetchedCollectionError', {
301
- enumerable: true,
302
- get: function () {
303
- return ChimeraQueryTrustFetchedCollectionError;
304
- }
305
- });
306
- Object.defineProperty(exports, 'ChimeraQueryTrustIdMismatchError', {
307
- enumerable: true,
308
- get: function () {
309
- return ChimeraQueryTrustIdMismatchError;
310
- }
311
- });
312
- Object.defineProperty(exports, 'ChimeraQueryUnsuccessfulDeletionError', {
313
- enumerable: true,
314
- get: function () {
315
- return ChimeraQueryUnsuccessfulDeletionError;
316
- }
317
- });
318
- Object.defineProperty(exports, 'chimeraDefaultComparator', {
319
- enumerable: true,
320
- get: function () {
321
- return chimeraDefaultComparator;
322
- }
323
- });
324
- Object.defineProperty(exports, 'chimeraDefaultDebugConfig', {
325
- enumerable: true,
326
- get: function () {
327
- return chimeraDefaultDebugConfig;
328
- }
329
- });
330
- Object.defineProperty(exports, 'chimeraDefaultFilterConfig', {
331
- enumerable: true,
332
- get: function () {
333
- return chimeraDefaultFilterConfig;
334
- }
335
- });
336
- Object.defineProperty(exports, 'chimeraDefaultFilterOperators', {
337
- enumerable: true,
338
- get: function () {
339
- return chimeraDefaultFilterOperators;
340
- }
341
- });
342
- Object.defineProperty(exports, 'chimeraDefaultGetKeyFromFilter', {
343
- enumerable: true,
344
- get: function () {
345
- return chimeraDefaultGetKeyFromFilter;
346
- }
347
- });
348
- Object.defineProperty(exports, 'chimeraDefaultKeyFromOrder', {
349
- enumerable: true,
350
- get: function () {
351
- return chimeraDefaultKeyFromOrder;
352
- }
353
- });
354
- Object.defineProperty(exports, 'chimeraDefaultOrderConfig', {
355
- enumerable: true,
356
- get: function () {
357
- return chimeraDefaultOrderConfig;
358
- }
359
- });
360
- Object.defineProperty(exports, 'chimeraDefaultQueryConfig', {
361
- enumerable: true,
362
- get: function () {
363
- return chimeraDefaultQueryConfig;
364
- }
365
- });
366
- Object.defineProperty(exports, 'getKeyFromOperation', {
367
- enumerable: true,
368
- get: function () {
369
- return getKeyFromOperation;
370
- }
371
- });
372
- //# sourceMappingURL=defaults-Bg1kIemd.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaults-Bg1kIemd.cjs","names":["getKeyFromOperation: ChimeraKeyFromOperatorGetter","chimeraDefaultGetKeyFromFilter: ChimeraKeyFromFilterGetter","chimeraDefaultComparator: ChimeraPrimitiveComparator","chimeraDefaultKeyFromOrder: ChimeraKeyFromOrderGetter"],"sources":["../src/shared/errors.ts","../src/order/errors.ts","../src/query/errors.ts","../src/debug/defaults.ts","../src/filter/defaults.ts","../src/order/defaults.ts","../src/query/defaults.ts"],"sourcesContent":["export class ChimeraError extends Error {}\n\nexport class ChimeraInternalError extends ChimeraError {\n\tconstructor(message: string, options?: ErrorOptions) {\n\t\tsuper(\n\t\t\t`${message}\\nIf you have this bug, feel free to create an issue in https://github.com/hf-chimera/store/issues`,\n\t\t\toptions,\n\t\t);\n\t}\n}\n","import { ChimeraError } from \"../shared/errors.ts\";\n\nexport class ChimeraOrderError extends ChimeraError {}\n\nexport class ChimeraOrderTypeError extends ChimeraOrderError {}\n\nexport class ChimeraOrderTypeComparisonError extends ChimeraOrderTypeError {\n\tconstructor(a: unknown, b: unknown) {\n\t\tsuper(\n\t\t\t`Unsupported comparison \"${a}\"(${typeof a}[${a != null ? a.constructor.name : a}]) with \"${b}\"(${typeof b}[${b != null ? b.constructor.name : b}])`,\n\t\t);\n\t}\n}\n","import { ChimeraError } from \"../shared/errors.ts\";\nimport type { ChimeraEntityId } from \"../shared/types.ts\";\nimport type { ChimeraQueryFetchingState } from \"./types.ts\";\n\nconst formatDeepErrorMessage = (message: string, cause: unknown): string =>\n\t`${message}: ${cause instanceof Error ? `\\n ${cause.stack}` : cause}`;\n\nexport class ChimeraQueryError extends ChimeraError {\n\treadonly entityName: string;\n\n\tconstructor(entityName: string, message: string, options?: ErrorOptions) {\n\t\tsuper(message, options);\n\t\tthis.entityName = entityName;\n\t}\n}\n\nexport class ChimeraQueryIdMismatchError extends ChimeraQueryError {\n\treadonly old: ChimeraEntityId;\n\treadonly new: ChimeraEntityId;\n\n\tconstructor(entityName: string, oldId: ChimeraEntityId, newId: ChimeraEntityId) {\n\t\tsuper(\n\t\t\tentityName,\n\t\t\t`\nCan't update \"${entityName}\" item if the change updates it's [id] (changed from \"${oldId}\" to \"${newId}\").\nIf such an update should not be an error, update <idGetter> field in \"${entityName}\" entity config to make Chimera get the [id] value properly.\n\t\t`.trim(),\n\t\t);\n\t\tthis.old = oldId;\n\t\tthis.new = newId;\n\t}\n}\n\nexport class ChimeraQueryNotSpecifiedError extends ChimeraQueryError {\n\treadonly methodName: string;\n\n\tconstructor(entityName: string, methodName: string) {\n\t\tsuper(entityName, `<${methodName}> for entity \"${entityName}\" was not specified`);\n\t\tthis.methodName = methodName;\n\t}\n}\n\nexport class ChimeraQueryTrustError extends ChimeraQueryError {\n\tconstructor(entityName: string, description: string) {\n\t\tsuper(\n\t\t\tentityName,\n\t\t\t`\nDO NOT IGNORE THIS ERROR OR YOUR PROD MAY BREAK!\n\nLooks like your \"${entityName}\" query provider ${description}\n\nBy default Chimera tend to trust external query provider to avoid extra data processing.\nIf it is not your case, set field \"trustQuery\" to \"false\" in config defaults or for specific entity.\nThis error visible only if \"devMode\" is \"true\".\nIf you'll ignore it, your production may fail, because Chimera won't check the data correctness.\n`.trim(),\n\t\t);\n\t}\n}\n\nexport class ChimeraQueryTrustIdMismatchError extends ChimeraQueryTrustError {\n\treadonly old: ChimeraEntityId;\n\treadonly new: ChimeraEntityId;\n\n\tconstructor(entityName: string, oldId: ChimeraEntityId, newId: ChimeraEntityId) {\n\t\tsuper(\n\t\t\tentityName,\n\t\t\t`\nreturned an item with [id] that not matches with the [id] of item that was updated (changed from \"${oldId}\" to \"${newId}\"). \nIf it is not an error, update <idGetter> field in \"${entityName}\" entity config to make Chimera get the [id] value properly.\n`.trim(),\n\t\t);\n\t\tthis.old = oldId;\n\t\tthis.new = newId;\n\t}\n}\n\nexport class ChimeraQueryTrustFetchedCollectionError extends ChimeraQueryTrustError {\n\treadonly old: unknown[];\n\treadonly new: unknown[];\n\n\tconstructor(entityName: string, input: unknown[], output: unknown[]) {\n\t\tsuper(entityName, \"returned not properly sorted or ordered collection.\");\n\t\tthis.old = input;\n\t\tthis.new = output;\n\t}\n}\n\nexport class ChimeraQueryFetchingError extends ChimeraQueryError {\n\tconstructor(entityName: string, cause: unknown) {\n\t\tsuper(entityName, formatDeepErrorMessage(\"Something went wrong\", cause), { cause });\n\t}\n}\n\nexport class ChimeraQueryDeletingError extends ChimeraQueryError {\n\tconstructor(entityName: string, cause: unknown) {\n\t\tsuper(entityName, formatDeepErrorMessage(\"Something went wrong\", cause), { cause });\n\t}\n}\n\nexport class ChimeraQueryNotReadyError extends ChimeraQueryError {\n\tconstructor(entityName: string) {\n\t\tsuper(entityName, \"Unable to get unready value.\");\n\t}\n}\n\nexport class ChimeraQueryDeletedItemError extends ChimeraQueryError {\n\tconstructor(entityName: string, id: ChimeraEntityId) {\n\t\tsuper(entityName, `Unable to updated deleted item with [id] \"${id}.\"`);\n\t}\n}\n\nexport class ChimeraQueryUnsuccessfulDeletionError extends ChimeraQueryError {\n\tconstructor(entityName: string, id: ChimeraEntityId) {\n\t\tsuper(entityName, `Item with [id] \"${id}\" was not deleted.`);\n\t}\n}\n\nexport class ChimeraQueryAlreadyRunningError extends ChimeraQueryError {\n\tconstructor(entityName: string, status: ChimeraQueryFetchingState) {\n\t\tsuper(entityName, `Unable to operate query. Other process already running ${status}.`);\n\t}\n}\n\nexport class ChimeraQueryNotCreatedError extends ChimeraQueryError {\n\tconstructor(entityName: string) {\n\t\tsuper(entityName, \"Unable to operate not created item.\");\n\t}\n}\n","import type { ChimeraDebugConfig } from \"./types.ts\";\n\nexport const chimeraDefaultDebugConfig = {\n\tdevMode: false,\n\tlogs: \"info\",\n\tname: \"chimera\",\n} satisfies Required<ChimeraDebugConfig>;\n","import type {\n\tChimeraFilterConfig,\n\tChimeraKeyFromFilterGetter,\n\tChimeraKeyFromOperatorGetter,\n\tChimeraOperatorMap,\n} from \"./types.ts\";\n\nexport const getKeyFromOperation: ChimeraKeyFromOperatorGetter = (operator) => JSON.stringify(operator);\nexport const chimeraDefaultGetKeyFromFilter: ChimeraKeyFromFilterGetter = (filter) => JSON.stringify(filter);\n\nexport const chimeraDefaultFilterOperators = {\n\tcontains: <\n\t\tI extends string | unknown[],\n\t\tT extends I extends never[] ? unknown : I extends unknown[] ? I[number] | I : I extends string ? string : never,\n\t>(\n\t\ta: I,\n\t\tb: T,\n\t) => {\n\t\tif (typeof a === \"string\") return a.includes(b as string);\n\t\tif (Array.isArray(a)) return Array.isArray(b) ? b.every((v) => a.includes(v)) : a.includes(b);\n\t\treturn false;\n\t},\n\tendsWith: (a: string, b: string) => a.endsWith(b),\n\tstartsWith: (a: string, b: string) => a.startsWith(b),\n\teq: <T>(a: T, b: T) => a === b,\n\tgt: (a, b) => a > b,\n\tgte: (a, b) => a >= b,\n\tin: <I, T extends I extends never[] ? unknown[] : I extends unknown[] ? I : I[]>(a: I, b: T) =>\n\t\t(Array.isArray(a) ? a : [a]).some((v) => b.includes(v)),\n\tlt: (a, b) => a < b,\n\tlte: (a, b) => a <= b,\n\tneq: <T>(a: T, b: T) => a !== b,\n\tnotIn: (a, b) => (Array.isArray(a) ? a : [a]).every((v) => !b.includes(v)),\n} satisfies ChimeraOperatorMap;\n\nexport const chimeraDefaultFilterConfig = {\n\tgetFilterKey: chimeraDefaultGetKeyFromFilter,\n\tgetOperatorKey: getKeyFromOperation,\n\toperators: chimeraDefaultFilterOperators,\n} satisfies ChimeraFilterConfig<typeof chimeraDefaultFilterOperators>;\n","import { ChimeraOrderTypeComparisonError } from \"./errors.ts\";\nimport type { ChimeraKeyFromOrderGetter, ChimeraOrderConfig, ChimeraPrimitiveComparator } from \"./types.ts\";\n\nexport const chimeraDefaultComparator: ChimeraPrimitiveComparator = (a: unknown, b: unknown): number => {\n\tlet result = 0;\n\n\tif (typeof a === \"string\" && typeof b === \"string\") {\n\t\tresult = a.localeCompare(b);\n\t} else if ((typeof a === \"number\" && typeof b === \"number\") || (typeof a === \"boolean\" && typeof b === \"boolean\")) {\n\t\tresult = (a as number) - (b as number);\n\t} else if (a instanceof Date && b instanceof Date) {\n\t\tresult = a.getTime() - b.getTime();\n\t} else if (a == null || b == null) {\n\t\t// biome-ignore lint/suspicious/noDoubleEquals: At least one of the operands should be null or undefined. If one of them is null and the other is undefined, we should get true.\n\t\tresult = a == b ? 0 : a == null ? -1 : 1;\n\t} else {\n\t\tthrow new ChimeraOrderTypeComparisonError(a, b);\n\t}\n\treturn result;\n};\n\nexport const chimeraDefaultKeyFromOrder: ChimeraKeyFromOrderGetter = (order): string => JSON.stringify(order);\n\nexport const chimeraDefaultOrderConfig = {\n\tgetKey: chimeraDefaultKeyFromOrder,\n\tprimitiveComparator: chimeraDefaultComparator,\n} satisfies Required<ChimeraOrderConfig>;\n","import type { chimeraDefaultFilterOperators } from \"../filter/defaults\";\nimport type { ChimeraEntityMap } from \"../shared/types.ts\";\nimport { ChimeraQueryNotSpecifiedError } from \"./errors.ts\";\nimport type { ChimeraQueryConfig, ChimeraQueryDefaultsConfig } from \"./types.ts\";\n\nexport const chimeraDefaultQueryConfig = {\n\tdefaults: {\n\t\tbatchedCreator: (entity: string) => {\n\t\t\tthrow new ChimeraQueryNotSpecifiedError(entity, \"batchedCreator\");\n\t\t},\n\t\tbatchedDeleter: (entity: string) => {\n\t\t\tthrow new ChimeraQueryNotSpecifiedError(entity, \"batchedDeleter\");\n\t\t},\n\t\tbatchedUpdater: (entity: string) => {\n\t\t\tthrow new ChimeraQueryNotSpecifiedError(entity, \"batchedUpdater\");\n\t\t},\n\n\t\tcollectionFetcher: (entity: string) => {\n\t\t\tthrow new ChimeraQueryNotSpecifiedError(entity, \"collectionFetcher\");\n\t\t},\n\n\t\tidGetter: (entity: string) => {\n\t\t\tthrow new ChimeraQueryNotSpecifiedError(entity, \"idGetter\");\n\t\t},\n\n\t\titemCreator: (entity: string) => {\n\t\t\tthrow new ChimeraQueryNotSpecifiedError(entity, \"itemCreator\");\n\t\t},\n\n\t\titemDeleter: (entity: string) => {\n\t\t\tthrow new ChimeraQueryNotSpecifiedError(entity, \"itemDeleter\");\n\t\t},\n\t\titemFetcher: (entity: string) => {\n\t\t\tthrow new ChimeraQueryNotSpecifiedError(entity, \"itemFetcher\");\n\t\t},\n\n\t\titemUpdater: (entity: string) => {\n\t\t\tthrow new ChimeraQueryNotSpecifiedError(entity, \"itemUpdater\");\n\t\t},\n\t\ttrustQuery: true,\n\t\tupdateDebounceTimeout: 0,\n\t} as Required<ChimeraQueryDefaultsConfig<ChimeraEntityMap, typeof chimeraDefaultFilterOperators>>,\n\tentities: {},\n} satisfies ChimeraQueryConfig<ChimeraEntityMap, typeof chimeraDefaultFilterOperators>;\n"],"mappings":";;AAAA,IAAa,eAAb,cAAkC,MAAM;AA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rB;;;;ACrBD,MAAa,4BAA4B;CACxC,UAAU;EACT,iBAAiB,WAAmB;AACnC,SAAM,IAAI,8BAA8B,QAAQ,iBAAiB;;EAElE,iBAAiB,WAAmB;AACnC,SAAM,IAAI,8BAA8B,QAAQ,iBAAiB;;EAElE,iBAAiB,WAAmB;AACnC,SAAM,IAAI,8BAA8B,QAAQ,iBAAiB;;EAGlE,oBAAoB,WAAmB;AACtC,SAAM,IAAI,8BAA8B,QAAQ,oBAAoB;;EAGrE,WAAW,WAAmB;AAC7B,SAAM,IAAI,8BAA8B,QAAQ,WAAW;;EAG5D,cAAc,WAAmB;AAChC,SAAM,IAAI,8BAA8B,QAAQ,cAAc;;EAG/D,cAAc,WAAmB;AAChC,SAAM,IAAI,8BAA8B,QAAQ,cAAc;;EAE/D,cAAc,WAAmB;AAChC,SAAM,IAAI,8BAA8B,QAAQ,cAAc;;EAG/D,cAAc,WAAmB;AAChC,SAAM,IAAI,8BAA8B,QAAQ,cAAc;;EAE/D,YAAY;EACZ,uBAAuB;EACvB;CACD,UAAU,EAAE;CACZ"}
@@ -1,210 +0,0 @@
1
- //#region src/shared/errors.ts
2
- var ChimeraError = class extends Error {};
3
- var ChimeraInternalError = class extends ChimeraError {
4
- constructor(message, options) {
5
- super(`${message}\nIf you have this bug, feel free to create an issue in https://github.com/hf-chimera/store/issues`, options);
6
- }
7
- };
8
-
9
- //#endregion
10
- //#region src/order/errors.ts
11
- var ChimeraOrderError = class extends ChimeraError {};
12
- var ChimeraOrderTypeError = class extends ChimeraOrderError {};
13
- var ChimeraOrderTypeComparisonError = class extends ChimeraOrderTypeError {
14
- constructor(a, b) {
15
- super(`Unsupported comparison "${a}"(${typeof a}[${a != null ? a.constructor.name : a}]) with "${b}"(${typeof b}[${b != null ? b.constructor.name : b}])`);
16
- }
17
- };
18
-
19
- //#endregion
20
- //#region src/query/errors.ts
21
- const formatDeepErrorMessage = (message, cause) => `${message}: ${cause instanceof Error ? `\n ${cause.stack}` : cause}`;
22
- var ChimeraQueryError = class extends ChimeraError {
23
- entityName;
24
- constructor(entityName, message, options) {
25
- super(message, options);
26
- this.entityName = entityName;
27
- }
28
- };
29
- var ChimeraQueryIdMismatchError = class extends ChimeraQueryError {
30
- old;
31
- new;
32
- constructor(entityName, oldId, newId) {
33
- super(entityName, `
34
- Can't update "${entityName}" item if the change updates it's [id] (changed from "${oldId}" to "${newId}").
35
- If such an update should not be an error, update <idGetter> field in "${entityName}" entity config to make Chimera get the [id] value properly.
36
- `.trim());
37
- this.old = oldId;
38
- this.new = newId;
39
- }
40
- };
41
- var ChimeraQueryNotSpecifiedError = class extends ChimeraQueryError {
42
- methodName;
43
- constructor(entityName, methodName) {
44
- super(entityName, `<${methodName}> for entity "${entityName}" was not specified`);
45
- this.methodName = methodName;
46
- }
47
- };
48
- var ChimeraQueryTrustError = class extends ChimeraQueryError {
49
- constructor(entityName, description) {
50
- super(entityName, `
51
- DO NOT IGNORE THIS ERROR OR YOUR PROD MAY BREAK!
52
-
53
- Looks like your "${entityName}" query provider ${description}
54
-
55
- By default Chimera tend to trust external query provider to avoid extra data processing.
56
- If it is not your case, set field "trustQuery" to "false" in config defaults or for specific entity.
57
- This error visible only if "devMode" is "true".
58
- If you'll ignore it, your production may fail, because Chimera won't check the data correctness.
59
- `.trim());
60
- }
61
- };
62
- var ChimeraQueryTrustIdMismatchError = class extends ChimeraQueryTrustError {
63
- old;
64
- new;
65
- constructor(entityName, oldId, newId) {
66
- super(entityName, `
67
- returned an item with [id] that not matches with the [id] of item that was updated (changed from "${oldId}" to "${newId}").
68
- If it is not an error, update <idGetter> field in "${entityName}" entity config to make Chimera get the [id] value properly.
69
- `.trim());
70
- this.old = oldId;
71
- this.new = newId;
72
- }
73
- };
74
- var ChimeraQueryTrustFetchedCollectionError = class extends ChimeraQueryTrustError {
75
- old;
76
- new;
77
- constructor(entityName, input, output) {
78
- super(entityName, "returned not properly sorted or ordered collection.");
79
- this.old = input;
80
- this.new = output;
81
- }
82
- };
83
- var ChimeraQueryFetchingError = class extends ChimeraQueryError {
84
- constructor(entityName, cause) {
85
- super(entityName, formatDeepErrorMessage("Something went wrong", cause), { cause });
86
- }
87
- };
88
- var ChimeraQueryDeletingError = class extends ChimeraQueryError {
89
- constructor(entityName, cause) {
90
- super(entityName, formatDeepErrorMessage("Something went wrong", cause), { cause });
91
- }
92
- };
93
- var ChimeraQueryNotReadyError = class extends ChimeraQueryError {
94
- constructor(entityName) {
95
- super(entityName, "Unable to get unready value.");
96
- }
97
- };
98
- var ChimeraQueryDeletedItemError = class extends ChimeraQueryError {
99
- constructor(entityName, id) {
100
- super(entityName, `Unable to updated deleted item with [id] "${id}."`);
101
- }
102
- };
103
- var ChimeraQueryUnsuccessfulDeletionError = class extends ChimeraQueryError {
104
- constructor(entityName, id) {
105
- super(entityName, `Item with [id] "${id}" was not deleted.`);
106
- }
107
- };
108
- var ChimeraQueryAlreadyRunningError = class extends ChimeraQueryError {
109
- constructor(entityName, status) {
110
- super(entityName, `Unable to operate query. Other process already running ${status}.`);
111
- }
112
- };
113
- var ChimeraQueryNotCreatedError = class extends ChimeraQueryError {
114
- constructor(entityName) {
115
- super(entityName, "Unable to operate not created item.");
116
- }
117
- };
118
-
119
- //#endregion
120
- //#region src/debug/defaults.ts
121
- const chimeraDefaultDebugConfig = {
122
- devMode: false,
123
- logs: "info",
124
- name: "chimera"
125
- };
126
-
127
- //#endregion
128
- //#region src/filter/defaults.ts
129
- const getKeyFromOperation = (operator) => JSON.stringify(operator);
130
- const chimeraDefaultGetKeyFromFilter = (filter) => JSON.stringify(filter);
131
- const chimeraDefaultFilterOperators = {
132
- contains: (a, b) => {
133
- if (typeof a === "string") return a.includes(b);
134
- if (Array.isArray(a)) return Array.isArray(b) ? b.every((v) => a.includes(v)) : a.includes(b);
135
- return false;
136
- },
137
- endsWith: (a, b) => a.endsWith(b),
138
- startsWith: (a, b) => a.startsWith(b),
139
- eq: (a, b) => a === b,
140
- gt: (a, b) => a > b,
141
- gte: (a, b) => a >= b,
142
- in: (a, b) => (Array.isArray(a) ? a : [a]).some((v) => b.includes(v)),
143
- lt: (a, b) => a < b,
144
- lte: (a, b) => a <= b,
145
- neq: (a, b) => a !== b,
146
- notIn: (a, b) => (Array.isArray(a) ? a : [a]).every((v) => !b.includes(v))
147
- };
148
- const chimeraDefaultFilterConfig = {
149
- getFilterKey: chimeraDefaultGetKeyFromFilter,
150
- getOperatorKey: getKeyFromOperation,
151
- operators: chimeraDefaultFilterOperators
152
- };
153
-
154
- //#endregion
155
- //#region src/order/defaults.ts
156
- const chimeraDefaultComparator = (a, b) => {
157
- let result = 0;
158
- if (typeof a === "string" && typeof b === "string") result = a.localeCompare(b);
159
- else if (typeof a === "number" && typeof b === "number" || typeof a === "boolean" && typeof b === "boolean") result = a - b;
160
- else if (a instanceof Date && b instanceof Date) result = a.getTime() - b.getTime();
161
- else if (a == null || b == null) result = a == b ? 0 : a == null ? -1 : 1;
162
- else throw new ChimeraOrderTypeComparisonError(a, b);
163
- return result;
164
- };
165
- const chimeraDefaultKeyFromOrder = (order) => JSON.stringify(order);
166
- const chimeraDefaultOrderConfig = {
167
- getKey: chimeraDefaultKeyFromOrder,
168
- primitiveComparator: chimeraDefaultComparator
169
- };
170
-
171
- //#endregion
172
- //#region src/query/defaults.ts
173
- const chimeraDefaultQueryConfig = {
174
- defaults: {
175
- batchedCreator: (entity) => {
176
- throw new ChimeraQueryNotSpecifiedError(entity, "batchedCreator");
177
- },
178
- batchedDeleter: (entity) => {
179
- throw new ChimeraQueryNotSpecifiedError(entity, "batchedDeleter");
180
- },
181
- batchedUpdater: (entity) => {
182
- throw new ChimeraQueryNotSpecifiedError(entity, "batchedUpdater");
183
- },
184
- collectionFetcher: (entity) => {
185
- throw new ChimeraQueryNotSpecifiedError(entity, "collectionFetcher");
186
- },
187
- idGetter: (entity) => {
188
- throw new ChimeraQueryNotSpecifiedError(entity, "idGetter");
189
- },
190
- itemCreator: (entity) => {
191
- throw new ChimeraQueryNotSpecifiedError(entity, "itemCreator");
192
- },
193
- itemDeleter: (entity) => {
194
- throw new ChimeraQueryNotSpecifiedError(entity, "itemDeleter");
195
- },
196
- itemFetcher: (entity) => {
197
- throw new ChimeraQueryNotSpecifiedError(entity, "itemFetcher");
198
- },
199
- itemUpdater: (entity) => {
200
- throw new ChimeraQueryNotSpecifiedError(entity, "itemUpdater");
201
- },
202
- trustQuery: true,
203
- updateDebounceTimeout: 0
204
- },
205
- entities: {}
206
- };
207
-
208
- //#endregion
209
- export { ChimeraOrderError as C, ChimeraInternalError as D, ChimeraError as E, ChimeraQueryUnsuccessfulDeletionError as S, ChimeraOrderTypeError as T, ChimeraQueryNotReadyError as _, chimeraDefaultFilterConfig as a, ChimeraQueryTrustFetchedCollectionError as b, getKeyFromOperation as c, ChimeraQueryDeletedItemError as d, ChimeraQueryDeletingError as f, ChimeraQueryNotCreatedError as g, ChimeraQueryIdMismatchError as h, chimeraDefaultOrderConfig as i, chimeraDefaultDebugConfig as l, ChimeraQueryFetchingError as m, chimeraDefaultComparator as n, chimeraDefaultFilterOperators as o, ChimeraQueryError as p, chimeraDefaultKeyFromOrder as r, chimeraDefaultGetKeyFromFilter as s, chimeraDefaultQueryConfig as t, ChimeraQueryAlreadyRunningError as u, ChimeraQueryNotSpecifiedError as v, ChimeraOrderTypeComparisonError as w, ChimeraQueryTrustIdMismatchError as x, ChimeraQueryTrustError as y };
210
- //# sourceMappingURL=defaults-CLUQg2zK.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaults-CLUQg2zK.js","names":["getKeyFromOperation: ChimeraKeyFromOperatorGetter","chimeraDefaultGetKeyFromFilter: ChimeraKeyFromFilterGetter","chimeraDefaultComparator: ChimeraPrimitiveComparator","chimeraDefaultKeyFromOrder: ChimeraKeyFromOrderGetter"],"sources":["../src/shared/errors.ts","../src/order/errors.ts","../src/query/errors.ts","../src/debug/defaults.ts","../src/filter/defaults.ts","../src/order/defaults.ts","../src/query/defaults.ts"],"sourcesContent":["export class ChimeraError extends Error {}\n\nexport class ChimeraInternalError extends ChimeraError {\n\tconstructor(message: string, options?: ErrorOptions) {\n\t\tsuper(\n\t\t\t`${message}\\nIf you have this bug, feel free to create an issue in https://github.com/hf-chimera/store/issues`,\n\t\t\toptions,\n\t\t);\n\t}\n}\n","import { ChimeraError } from \"../shared/errors.ts\";\n\nexport class ChimeraOrderError extends ChimeraError {}\n\nexport class ChimeraOrderTypeError extends ChimeraOrderError {}\n\nexport class ChimeraOrderTypeComparisonError extends ChimeraOrderTypeError {\n\tconstructor(a: unknown, b: unknown) {\n\t\tsuper(\n\t\t\t`Unsupported comparison \"${a}\"(${typeof a}[${a != null ? a.constructor.name : a}]) with \"${b}\"(${typeof b}[${b != null ? b.constructor.name : b}])`,\n\t\t);\n\t}\n}\n","import { ChimeraError } from \"../shared/errors.ts\";\nimport type { ChimeraEntityId } from \"../shared/types.ts\";\nimport type { ChimeraQueryFetchingState } from \"./types.ts\";\n\nconst formatDeepErrorMessage = (message: string, cause: unknown): string =>\n\t`${message}: ${cause instanceof Error ? `\\n ${cause.stack}` : cause}`;\n\nexport class ChimeraQueryError extends ChimeraError {\n\treadonly entityName: string;\n\n\tconstructor(entityName: string, message: string, options?: ErrorOptions) {\n\t\tsuper(message, options);\n\t\tthis.entityName = entityName;\n\t}\n}\n\nexport class ChimeraQueryIdMismatchError extends ChimeraQueryError {\n\treadonly old: ChimeraEntityId;\n\treadonly new: ChimeraEntityId;\n\n\tconstructor(entityName: string, oldId: ChimeraEntityId, newId: ChimeraEntityId) {\n\t\tsuper(\n\t\t\tentityName,\n\t\t\t`\nCan't update \"${entityName}\" item if the change updates it's [id] (changed from \"${oldId}\" to \"${newId}\").\nIf such an update should not be an error, update <idGetter> field in \"${entityName}\" entity config to make Chimera get the [id] value properly.\n\t\t`.trim(),\n\t\t);\n\t\tthis.old = oldId;\n\t\tthis.new = newId;\n\t}\n}\n\nexport class ChimeraQueryNotSpecifiedError extends ChimeraQueryError {\n\treadonly methodName: string;\n\n\tconstructor(entityName: string, methodName: string) {\n\t\tsuper(entityName, `<${methodName}> for entity \"${entityName}\" was not specified`);\n\t\tthis.methodName = methodName;\n\t}\n}\n\nexport class ChimeraQueryTrustError extends ChimeraQueryError {\n\tconstructor(entityName: string, description: string) {\n\t\tsuper(\n\t\t\tentityName,\n\t\t\t`\nDO NOT IGNORE THIS ERROR OR YOUR PROD MAY BREAK!\n\nLooks like your \"${entityName}\" query provider ${description}\n\nBy default Chimera tend to trust external query provider to avoid extra data processing.\nIf it is not your case, set field \"trustQuery\" to \"false\" in config defaults or for specific entity.\nThis error visible only if \"devMode\" is \"true\".\nIf you'll ignore it, your production may fail, because Chimera won't check the data correctness.\n`.trim(),\n\t\t);\n\t}\n}\n\nexport class ChimeraQueryTrustIdMismatchError extends ChimeraQueryTrustError {\n\treadonly old: ChimeraEntityId;\n\treadonly new: ChimeraEntityId;\n\n\tconstructor(entityName: string, oldId: ChimeraEntityId, newId: ChimeraEntityId) {\n\t\tsuper(\n\t\t\tentityName,\n\t\t\t`\nreturned an item with [id] that not matches with the [id] of item that was updated (changed from \"${oldId}\" to \"${newId}\"). \nIf it is not an error, update <idGetter> field in \"${entityName}\" entity config to make Chimera get the [id] value properly.\n`.trim(),\n\t\t);\n\t\tthis.old = oldId;\n\t\tthis.new = newId;\n\t}\n}\n\nexport class ChimeraQueryTrustFetchedCollectionError extends ChimeraQueryTrustError {\n\treadonly old: unknown[];\n\treadonly new: unknown[];\n\n\tconstructor(entityName: string, input: unknown[], output: unknown[]) {\n\t\tsuper(entityName, \"returned not properly sorted or ordered collection.\");\n\t\tthis.old = input;\n\t\tthis.new = output;\n\t}\n}\n\nexport class ChimeraQueryFetchingError extends ChimeraQueryError {\n\tconstructor(entityName: string, cause: unknown) {\n\t\tsuper(entityName, formatDeepErrorMessage(\"Something went wrong\", cause), { cause });\n\t}\n}\n\nexport class ChimeraQueryDeletingError extends ChimeraQueryError {\n\tconstructor(entityName: string, cause: unknown) {\n\t\tsuper(entityName, formatDeepErrorMessage(\"Something went wrong\", cause), { cause });\n\t}\n}\n\nexport class ChimeraQueryNotReadyError extends ChimeraQueryError {\n\tconstructor(entityName: string) {\n\t\tsuper(entityName, \"Unable to get unready value.\");\n\t}\n}\n\nexport class ChimeraQueryDeletedItemError extends ChimeraQueryError {\n\tconstructor(entityName: string, id: ChimeraEntityId) {\n\t\tsuper(entityName, `Unable to updated deleted item with [id] \"${id}.\"`);\n\t}\n}\n\nexport class ChimeraQueryUnsuccessfulDeletionError extends ChimeraQueryError {\n\tconstructor(entityName: string, id: ChimeraEntityId) {\n\t\tsuper(entityName, `Item with [id] \"${id}\" was not deleted.`);\n\t}\n}\n\nexport class ChimeraQueryAlreadyRunningError extends ChimeraQueryError {\n\tconstructor(entityName: string, status: ChimeraQueryFetchingState) {\n\t\tsuper(entityName, `Unable to operate query. Other process already running ${status}.`);\n\t}\n}\n\nexport class ChimeraQueryNotCreatedError extends ChimeraQueryError {\n\tconstructor(entityName: string) {\n\t\tsuper(entityName, \"Unable to operate not created item.\");\n\t}\n}\n","import type { ChimeraDebugConfig } from \"./types.ts\";\n\nexport const chimeraDefaultDebugConfig = {\n\tdevMode: false,\n\tlogs: \"info\",\n\tname: \"chimera\",\n} satisfies Required<ChimeraDebugConfig>;\n","import type {\n\tChimeraFilterConfig,\n\tChimeraKeyFromFilterGetter,\n\tChimeraKeyFromOperatorGetter,\n\tChimeraOperatorMap,\n} from \"./types.ts\";\n\nexport const getKeyFromOperation: ChimeraKeyFromOperatorGetter = (operator) => JSON.stringify(operator);\nexport const chimeraDefaultGetKeyFromFilter: ChimeraKeyFromFilterGetter = (filter) => JSON.stringify(filter);\n\nexport const chimeraDefaultFilterOperators = {\n\tcontains: <\n\t\tI extends string | unknown[],\n\t\tT extends I extends never[] ? unknown : I extends unknown[] ? I[number] | I : I extends string ? string : never,\n\t>(\n\t\ta: I,\n\t\tb: T,\n\t) => {\n\t\tif (typeof a === \"string\") return a.includes(b as string);\n\t\tif (Array.isArray(a)) return Array.isArray(b) ? b.every((v) => a.includes(v)) : a.includes(b);\n\t\treturn false;\n\t},\n\tendsWith: (a: string, b: string) => a.endsWith(b),\n\tstartsWith: (a: string, b: string) => a.startsWith(b),\n\teq: <T>(a: T, b: T) => a === b,\n\tgt: (a, b) => a > b,\n\tgte: (a, b) => a >= b,\n\tin: <I, T extends I extends never[] ? unknown[] : I extends unknown[] ? I : I[]>(a: I, b: T) =>\n\t\t(Array.isArray(a) ? a : [a]).some((v) => b.includes(v)),\n\tlt: (a, b) => a < b,\n\tlte: (a, b) => a <= b,\n\tneq: <T>(a: T, b: T) => a !== b,\n\tnotIn: (a, b) => (Array.isArray(a) ? a : [a]).every((v) => !b.includes(v)),\n} satisfies ChimeraOperatorMap;\n\nexport const chimeraDefaultFilterConfig = {\n\tgetFilterKey: chimeraDefaultGetKeyFromFilter,\n\tgetOperatorKey: getKeyFromOperation,\n\toperators: chimeraDefaultFilterOperators,\n} satisfies ChimeraFilterConfig<typeof chimeraDefaultFilterOperators>;\n","import { ChimeraOrderTypeComparisonError } from \"./errors.ts\";\nimport type { ChimeraKeyFromOrderGetter, ChimeraOrderConfig, ChimeraPrimitiveComparator } from \"./types.ts\";\n\nexport const chimeraDefaultComparator: ChimeraPrimitiveComparator = (a: unknown, b: unknown): number => {\n\tlet result = 0;\n\n\tif (typeof a === \"string\" && typeof b === \"string\") {\n\t\tresult = a.localeCompare(b);\n\t} else if ((typeof a === \"number\" && typeof b === \"number\") || (typeof a === \"boolean\" && typeof b === \"boolean\")) {\n\t\tresult = (a as number) - (b as number);\n\t} else if (a instanceof Date && b instanceof Date) {\n\t\tresult = a.getTime() - b.getTime();\n\t} else if (a == null || b == null) {\n\t\t// biome-ignore lint/suspicious/noDoubleEquals: At least one of the operands should be null or undefined. If one of them is null and the other is undefined, we should get true.\n\t\tresult = a == b ? 0 : a == null ? -1 : 1;\n\t} else {\n\t\tthrow new ChimeraOrderTypeComparisonError(a, b);\n\t}\n\treturn result;\n};\n\nexport const chimeraDefaultKeyFromOrder: ChimeraKeyFromOrderGetter = (order): string => JSON.stringify(order);\n\nexport const chimeraDefaultOrderConfig = {\n\tgetKey: chimeraDefaultKeyFromOrder,\n\tprimitiveComparator: chimeraDefaultComparator,\n} satisfies Required<ChimeraOrderConfig>;\n","import type { chimeraDefaultFilterOperators } from \"../filter/defaults\";\nimport type { ChimeraEntityMap } from \"../shared/types.ts\";\nimport { ChimeraQueryNotSpecifiedError } from \"./errors.ts\";\nimport type { ChimeraQueryConfig, ChimeraQueryDefaultsConfig } from \"./types.ts\";\n\nexport const chimeraDefaultQueryConfig = {\n\tdefaults: {\n\t\tbatchedCreator: (entity: string) => {\n\t\t\tthrow new ChimeraQueryNotSpecifiedError(entity, \"batchedCreator\");\n\t\t},\n\t\tbatchedDeleter: (entity: string) => {\n\t\t\tthrow new ChimeraQueryNotSpecifiedError(entity, \"batchedDeleter\");\n\t\t},\n\t\tbatchedUpdater: (entity: string) => {\n\t\t\tthrow new ChimeraQueryNotSpecifiedError(entity, \"batchedUpdater\");\n\t\t},\n\n\t\tcollectionFetcher: (entity: string) => {\n\t\t\tthrow new ChimeraQueryNotSpecifiedError(entity, \"collectionFetcher\");\n\t\t},\n\n\t\tidGetter: (entity: string) => {\n\t\t\tthrow new ChimeraQueryNotSpecifiedError(entity, \"idGetter\");\n\t\t},\n\n\t\titemCreator: (entity: string) => {\n\t\t\tthrow new ChimeraQueryNotSpecifiedError(entity, \"itemCreator\");\n\t\t},\n\n\t\titemDeleter: (entity: string) => {\n\t\t\tthrow new ChimeraQueryNotSpecifiedError(entity, \"itemDeleter\");\n\t\t},\n\t\titemFetcher: (entity: string) => {\n\t\t\tthrow new ChimeraQueryNotSpecifiedError(entity, \"itemFetcher\");\n\t\t},\n\n\t\titemUpdater: (entity: string) => {\n\t\t\tthrow new ChimeraQueryNotSpecifiedError(entity, \"itemUpdater\");\n\t\t},\n\t\ttrustQuery: true,\n\t\tupdateDebounceTimeout: 0,\n\t} as Required<ChimeraQueryDefaultsConfig<ChimeraEntityMap, typeof chimeraD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AAgC,GAAG,EAAE;AAEhD,QAAO;;AAGR,MAAaC,8BAAyD,UAAkB,KAAK,UAAU,MAAM;AAE7G,MAAa,4BAA4B;CACxC,QAAQ;CACR,qBAAqB;CACrB;;;;ACrBD,MAAa,4BAA4B;CACxC,UAAU;EACT,iBAAiB,WAAmB;AACnC,SAAM,IAAI,8BAA8B,QAAQ,iBAAiB;;EAElE,iBAAiB,WAAmB;AACnC,SAAM,IAAI,8BAA8B,QAAQ,iBAAiB;;EAElE,iBAAiB,WAAmB;AACnC,SAAM,IAAI,8BAA8B,QAAQ,iBAAiB;;EAGlE,oBAAoB,WAAmB;AACtC,SAAM,IAAI,8BAA8B,QAAQ,oBAAoB;;EAGrE,WAAW,WAAmB;AAC7B,SAAM,IAAI,8BAA8B,QAAQ,WAAW;;EAG5D,cAAc,WAAmB;AAChC,SAAM,IAAI,8BAA8B,QAAQ,cAAc;;EAG/D,cAAc,WAAmB;AAChC,SAAM,IAAI,8BAA8B,QAAQ,cAAc;;EAE/D,cAAc,WAAmB;AAChC,SAAM,IAAI,8BAA8B,QAAQ,cAAc;;EAG/D,cAAc,WAAmB;AAChC,SAAM,IAAI,8BAA8B,QAAQ,cAAc;;EAE/D,YAAY;EACZ,uBAAuB;EACvB;CACD,UAAU,EAAE;CACZ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaults.cjs","names":["chimeraDefaultDebugConfig","chimeraDefaultFilterConfig","chimeraDefaultOrderConfig","chimeraDefaultQueryConfig"],"sources":["../src/store/defaults.ts"],"sourcesContent":["import { chimeraDefaultDebugConfig } from \"../debug/defaults.ts\";\nimport { chimeraDefaultFilterConfig, type chimeraDefaultFilterOperators } from \"../filter/defaults.ts\";\nimport { chimeraDefaultOrderConfig } from \"../order/defaults.ts\";\nimport { chimeraDefaultQueryConfig } from \"../query/defaults.ts\";\nimport type { ChimeraEntityMap } from \"../shared/types.ts\";\nimport type { ChimeraStoreConfig } from \"./types.ts\";\n\nexport const chimeraDefaultStoreConfig = {\n\tdebug: chimeraDefaultDebugConfig,\n\tfilter: chimeraDefaultFilterConfig,\n\torder: chimeraDefaultOrderConfig,\n\tquery: chimeraDefaultQueryConfig,\n} satisfies ChimeraStoreConfig<ChimeraEntityMap, typeof chimeraDefaultFilterOperators>;\n"],"mappings":";;;AAOA,MAAa,4BAA4B;CACxC,OAAOA;CACP,QAAQC;CACR,OAAOC;CACP,OAAOC;CACP"}