@contello/store 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -149,7 +149,7 @@ type SingletonSyncDef<TOps extends OperationMap | undefined, TModel extends stri
149
149
  name?: string | undefined;
150
150
  model: TModel;
151
151
  fetch: (client: ContelloClient<TOps>) => MaybePromise<TRaw>;
152
- map: (item: TRaw, ref: MapperContext<TModels>) => TMapped;
152
+ map: (item: TRaw, ref: MapperContext<TModels>) => MaybePromise<TMapped>;
153
153
  cache?: SyncCacheOptions | undefined;
154
154
  onLoad?: (() => void) | undefined;
155
155
  onRefresh?: (() => void) | undefined;
@@ -188,7 +188,7 @@ type CollectionSyncDef<TOps extends OperationMap | undefined, TModel extends str
188
188
  name?: string | undefined;
189
189
  model: TModel;
190
190
  fetch: (client: ContelloClient<TOps>) => Fetchable<TRaw[]>;
191
- map: (item: TRaw, ref: MapperContext<TModels>) => TMapped;
191
+ map: (item: TRaw, ref: MapperContext<TModels>) => MaybePromise<TMapped>;
192
192
  cache?: SyncCacheOptions | undefined;
193
193
  onLoad?: ((ids: string[]) => void) | undefined;
194
194
  onRefresh?: ((ids: string[]) => void) | undefined;
package/dist/index.d.ts CHANGED
@@ -149,7 +149,7 @@ type SingletonSyncDef<TOps extends OperationMap | undefined, TModel extends stri
149
149
  name?: string | undefined;
150
150
  model: TModel;
151
151
  fetch: (client: ContelloClient<TOps>) => MaybePromise<TRaw>;
152
- map: (item: TRaw, ref: MapperContext<TModels>) => TMapped;
152
+ map: (item: TRaw, ref: MapperContext<TModels>) => MaybePromise<TMapped>;
153
153
  cache?: SyncCacheOptions | undefined;
154
154
  onLoad?: (() => void) | undefined;
155
155
  onRefresh?: (() => void) | undefined;
@@ -188,7 +188,7 @@ type CollectionSyncDef<TOps extends OperationMap | undefined, TModel extends str
188
188
  name?: string | undefined;
189
189
  model: TModel;
190
190
  fetch: (client: ContelloClient<TOps>) => Fetchable<TRaw[]>;
191
- map: (item: TRaw, ref: MapperContext<TModels>) => TMapped;
191
+ map: (item: TRaw, ref: MapperContext<TModels>) => MaybePromise<TMapped>;
192
192
  cache?: SyncCacheOptions | undefined;
193
193
  onLoad?: ((ids: string[]) => void) | undefined;
194
194
  onRefresh?: ((ids: string[]) => void) | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contello/store",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Framework-agnostic store for Contello CMS with reactive collections and automatic dependency tracking",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -16,11 +16,11 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "backoff-rxjs": "^7.0.0",
19
- "lru-cache": "^11.2.7",
20
- "@contello/client": "^1.0.2"
19
+ "lru-cache": "^11.3.5",
20
+ "@contello/client": "^1.0.3"
21
21
  },
22
22
  "devDependencies": {
23
- "projected": "^2.2.0",
23
+ "projected": "^2.2.1",
24
24
  "rxjs": "^7.8.2"
25
25
  },
26
26
  "files": [