@fjell/cache 4.6.14 → 4.6.16

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 (90) hide show
  1. package/dist/Aggregator.d.ts +3 -3
  2. package/dist/Cache.d.ts +5 -5
  3. package/dist/CacheMap.d.ts +1 -1
  4. package/dist/Instance.d.ts +4 -4
  5. package/dist/InstanceFactory.d.ts +3 -3
  6. package/dist/Operations.d.ts +4 -4
  7. package/dist/index.js +715 -0
  8. package/dist/index.js.map +7 -0
  9. package/dist/logger.d.ts +1 -1
  10. package/dist/ops/action.d.ts +3 -3
  11. package/dist/ops/all.d.ts +3 -3
  12. package/dist/ops/allAction.d.ts +3 -3
  13. package/dist/ops/allFacet.d.ts +3 -3
  14. package/dist/ops/create.d.ts +3 -3
  15. package/dist/ops/facet.d.ts +3 -3
  16. package/dist/ops/find.d.ts +3 -3
  17. package/dist/ops/findOne.d.ts +3 -3
  18. package/dist/ops/get.d.ts +3 -3
  19. package/dist/ops/one.d.ts +3 -3
  20. package/dist/ops/remove.d.ts +3 -3
  21. package/dist/ops/reset.d.ts +3 -3
  22. package/dist/ops/retrieve.d.ts +3 -3
  23. package/dist/ops/set.d.ts +2 -2
  24. package/dist/ops/update.d.ts +3 -3
  25. package/package.json +14 -18
  26. package/dist/Aggregator.cjs.js +0 -322
  27. package/dist/Aggregator.es.js +0 -317
  28. package/dist/Cache.cjs.js +0 -35
  29. package/dist/Cache.es.js +0 -30
  30. package/dist/CacheMap.cjs.js +0 -170
  31. package/dist/CacheMap.es.js +0 -166
  32. package/dist/Instance.cjs.js +0 -23
  33. package/dist/Instance.es.js +0 -18
  34. package/dist/InstanceFactory.cjs.js +0 -35
  35. package/dist/InstanceFactory.es.js +0 -31
  36. package/dist/Operations.cjs.js +0 -43
  37. package/dist/Operations.es.js +0 -39
  38. package/dist/Registry.cjs.js +0 -36
  39. package/dist/Registry.es.js +0 -31
  40. package/dist/index.cjs +0 -940
  41. package/dist/index.cjs.js +0 -26
  42. package/dist/index.cjs.map +0 -1
  43. package/dist/index.es.js +0 -8
  44. package/dist/logger.cjs.js +0 -10
  45. package/dist/logger.es.js +0 -6
  46. package/dist/ops/action.cjs.js +0 -28
  47. package/dist/ops/action.es.js +0 -24
  48. package/dist/ops/all.cjs.js +0 -33
  49. package/dist/ops/all.es.js +0 -29
  50. package/dist/ops/allAction.cjs.js +0 -35
  51. package/dist/ops/allAction.es.js +0 -31
  52. package/dist/ops/allFacet.cjs.js +0 -22
  53. package/dist/ops/allFacet.es.js +0 -18
  54. package/dist/ops/create.cjs.js +0 -23
  55. package/dist/ops/create.es.js +0 -19
  56. package/dist/ops/facet.cjs.js +0 -21
  57. package/dist/ops/facet.es.js +0 -17
  58. package/dist/ops/find.cjs.js +0 -26
  59. package/dist/ops/find.es.js +0 -22
  60. package/dist/ops/findOne.cjs.js +0 -24
  61. package/dist/ops/findOne.es.js +0 -20
  62. package/dist/ops/get.cjs.js +0 -38
  63. package/dist/ops/get.es.js +0 -34
  64. package/dist/ops/one.cjs.js +0 -33
  65. package/dist/ops/one.es.js +0 -29
  66. package/dist/ops/remove.cjs.js +0 -30
  67. package/dist/ops/remove.es.js +0 -26
  68. package/dist/ops/reset.cjs.js +0 -15
  69. package/dist/ops/reset.es.js +0 -11
  70. package/dist/ops/retrieve.cjs.js +0 -37
  71. package/dist/ops/retrieve.es.js +0 -33
  72. package/dist/ops/set.cjs.js +0 -71
  73. package/dist/ops/set.es.js +0 -67
  74. package/dist/ops/update.cjs.js +0 -34
  75. package/dist/ops/update.es.js +0 -30
  76. package/docs/docs.config.ts +0 -75
  77. package/docs/index.html +0 -18
  78. package/docs/package.json +0 -34
  79. package/docs/public/README.md +0 -96
  80. package/docs/public/examples-README.md +0 -302
  81. package/docs/public/test.txt +0 -0
  82. package/docs/src/index.css +0 -3
  83. package/docs/src/main.tsx +0 -12
  84. package/docs/src/test/setup.ts +0 -1
  85. package/docs/tsconfig.node.json +0 -15
  86. package/examples/README.md +0 -302
  87. package/examples/aggregator-example.ts +0 -329
  88. package/examples/basic-cache-example.ts +0 -270
  89. package/examples/cache-map-example.ts +0 -265
  90. package/vitest.config.ts +0 -44
@@ -1,6 +1,6 @@
1
- import { ComKey, Item, ItemQuery, LocKeyArray, PriKey } from '@fjell/core';
2
- import { Cache } from './Cache';
3
- import { CacheMap } from './CacheMap';
1
+ import { ComKey, Item, ItemQuery, LocKeyArray, PriKey } from "@fjell/core";
2
+ import { Cache } from "./Cache";
3
+ import { CacheMap } from "./CacheMap";
4
4
  export interface Aggregator<V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never> extends Cache<V, S, L1, L2, L3, L4, L5> {
5
5
  all: (query?: ItemQuery, locations?: LocKeyArray<L1, L2, L3, L4, L5> | []) => Promise<[CacheMap<V, S, L1, L2, L3, L4, L5>, V[]]>;
6
6
  one: (query?: ItemQuery, locations?: LocKeyArray<L1, L2, L3, L4, L5> | []) => Promise<[CacheMap<V, S, L1, L2, L3, L4, L5>, V | null]>;
package/dist/Cache.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { Item } from '@fjell/core';
2
- import { Instance as BaseInstance, Coordinate, Registry } from '@fjell/registry';
3
- import { ClientApi } from '@fjell/client-api';
4
- import { CacheMap } from './CacheMap';
5
- import { Operations } from './Operations';
1
+ import { Item } from "@fjell/core";
2
+ import { Instance as BaseInstance, Coordinate, Registry } from "@fjell/registry";
3
+ import { ClientApi } from "@fjell/client-api";
4
+ import { CacheMap } from "@/CacheMap";
5
+ import { Operations } from "@/Operations";
6
6
  /**
7
7
  * The Cache interface extends the base Instance from @fjell/registry and adds cache operations
8
8
  * for interacting with cached data.
@@ -1,4 +1,4 @@
1
- import { AllItemTypeArrays, ComKey, Dictionary, Item, ItemQuery, LocKeyArray, PriKey } from '@fjell/core';
1
+ import { AllItemTypeArrays, ComKey, Dictionary, Item, ItemQuery, LocKeyArray, PriKey } from "@fjell/core";
2
2
  export declare class CacheMap<V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never> extends Dictionary<ComKey<S, L1, L2, L3, L4, L5> | PriKey<S>, V> {
3
3
  private types;
4
4
  constructor(types: AllItemTypeArrays<S, L1, L2, L3, L4, L5>, map?: {
@@ -1,7 +1,7 @@
1
- import { Item } from '@fjell/core';
2
- import { Coordinate, Registry } from '@fjell/registry';
3
- import { ClientApi } from '@fjell/client-api';
4
- import { Cache } from './Cache';
1
+ import { Item } from "@fjell/core";
2
+ import { Coordinate, Registry } from "@fjell/registry";
3
+ import { ClientApi } from "@fjell/client-api";
4
+ import { Cache } from "./Cache";
5
5
  /**
6
6
  * The Cache Instance interface represents a cache model instance that extends the base Instance
7
7
  * from @fjell/registry and adds cache operations for interacting with cached data.
@@ -1,6 +1,6 @@
1
- import { Item } from '@fjell/core';
2
- import { ClientApi } from '@fjell/client-api';
3
- import { InstanceFactory as BaseInstanceFactory } from '@fjell/registry';
1
+ import { Item } from "@fjell/core";
2
+ import { ClientApi } from "@fjell/client-api";
3
+ import { InstanceFactory as BaseInstanceFactory } from "@fjell/registry";
4
4
  export type InstanceFactory<V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never> = (api: ClientApi<V, S, L1, L2, L3, L4, L5>) => BaseInstanceFactory<S, L1, L2, L3, L4, L5>;
5
5
  /**
6
6
  * Factory function for creating cache instances
@@ -1,7 +1,7 @@
1
- import { ComKey, Item, ItemQuery, LocKeyArray, PriKey } from '@fjell/core';
2
- import { ClientApi } from '@fjell/client-api';
3
- import { Coordinate } from '@fjell/registry';
4
- import { CacheMap } from './CacheMap';
1
+ import { ComKey, Item, ItemQuery, LocKeyArray, PriKey } from "@fjell/core";
2
+ import { ClientApi } from "@fjell/client-api";
3
+ import { Coordinate } from "@fjell/registry";
4
+ import { CacheMap } from "@/CacheMap";
5
5
  export interface Operations<V extends Item<S, L1, L2, L3, L4, L5>, S extends string, L1 extends string = never, L2 extends string = never, L3 extends string = never, L4 extends string = never, L5 extends string = never> {
6
6
  /**
7
7
  * Retrieves all the items that match the query from cache or API.