@contello/store 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.js +8 -8
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -557,7 +557,7 @@ var DependencyCollector = class {
|
|
|
557
557
|
|
|
558
558
|
// src/collection.ts
|
|
559
559
|
function fetchCollection(source, client, ids) {
|
|
560
|
-
return (0, import_client3.
|
|
560
|
+
return (0, import_client3.collectAsync)(
|
|
561
561
|
(0, import_client3.mapAsync)(
|
|
562
562
|
client.subscribe((0, import_client3.createSourceSubscription)(source), { ids }),
|
|
563
563
|
(r) => r.source
|
|
@@ -840,7 +840,7 @@ function createLazyCollection(source, options, client, updates$, resolver) {
|
|
|
840
840
|
values: (keys) => wrap(
|
|
841
841
|
`lazy-collection:${_def.name}`,
|
|
842
842
|
() => (0, import_projected4.maybeThen)(
|
|
843
|
-
(0, import_client5.
|
|
843
|
+
(0, import_client5.collectAsync)(
|
|
844
844
|
(0, import_client5.mapAsync)(
|
|
845
845
|
client.subscribe((0, import_client5.createSourceSubscription)(source), {
|
|
846
846
|
ids: keys
|
package/dist/index.js
CHANGED
|
@@ -364,9 +364,9 @@ function createAssetsCollection(def, client, updates$) {
|
|
|
364
364
|
|
|
365
365
|
// src/collection.ts
|
|
366
366
|
import {
|
|
367
|
+
collectAsync,
|
|
367
368
|
createAsyncIterableSubject as createAsyncIterableSubject2,
|
|
368
369
|
createSourceSubscription,
|
|
369
|
-
firstAsync,
|
|
370
370
|
mapAsync,
|
|
371
371
|
runWithBackoff as runWithBackoff2
|
|
372
372
|
} from "@contello/client";
|
|
@@ -526,7 +526,7 @@ var DependencyCollector = class {
|
|
|
526
526
|
|
|
527
527
|
// src/collection.ts
|
|
528
528
|
function fetchCollection(source, client, ids) {
|
|
529
|
-
return
|
|
529
|
+
return collectAsync(
|
|
530
530
|
mapAsync(
|
|
531
531
|
client.subscribe(createSourceSubscription(source), { ids }),
|
|
532
532
|
(r) => r.source
|
|
@@ -711,7 +711,7 @@ function createCollectionSync(source, options, client, updates$, resolver) {
|
|
|
711
711
|
|
|
712
712
|
// src/i18n.ts
|
|
713
713
|
import {
|
|
714
|
-
collectAsync,
|
|
714
|
+
collectAsync as collectAsync2,
|
|
715
715
|
createAsyncIterableSubject as createAsyncIterableSubject3,
|
|
716
716
|
mapAsync as mapAsync2
|
|
717
717
|
} from "@contello/client";
|
|
@@ -731,7 +731,7 @@ function createI18nMessagesCollection(def, client, updates$) {
|
|
|
731
731
|
key: (msg) => msg.id,
|
|
732
732
|
values: () => wrap(
|
|
733
733
|
`i18n:${def.collection}`,
|
|
734
|
-
() =>
|
|
734
|
+
() => collectAsync2(
|
|
735
735
|
mapAsync2(
|
|
736
736
|
client.subscribe(storeGetI18nMessagesDocument, {
|
|
737
737
|
collection: def.collection
|
|
@@ -790,9 +790,9 @@ function createI18nMessagesCollection(def, client, updates$) {
|
|
|
790
790
|
|
|
791
791
|
// src/lazy-collection.ts
|
|
792
792
|
import {
|
|
793
|
+
collectAsync as collectAsync3,
|
|
793
794
|
createAsyncIterableSubject as createAsyncIterableSubject4,
|
|
794
795
|
createSourceSubscription as createSourceSubscription2,
|
|
795
|
-
firstAsync as firstAsync2,
|
|
796
796
|
mapAsync as mapAsync3
|
|
797
797
|
} from "@contello/client";
|
|
798
798
|
import { ProjectedLazyMap as ProjectedLazyMap2, maybeThen as maybeThen3 } from "projected";
|
|
@@ -818,7 +818,7 @@ function createLazyCollection(source, options, client, updates$, resolver) {
|
|
|
818
818
|
values: (keys) => wrap(
|
|
819
819
|
`lazy-collection:${_def.name}`,
|
|
820
820
|
() => maybeThen3(
|
|
821
|
-
|
|
821
|
+
collectAsync3(
|
|
822
822
|
mapAsync3(
|
|
823
823
|
client.subscribe(createSourceSubscription2(source), {
|
|
824
824
|
ids: keys
|
|
@@ -1151,7 +1151,7 @@ function createRoutesCollection(def, client, updates$, resolver) {
|
|
|
1151
1151
|
import {
|
|
1152
1152
|
createAsyncIterableSubject as createAsyncIterableSubject6,
|
|
1153
1153
|
createSourceSubscription as createSourceSubscription3,
|
|
1154
|
-
firstAsync
|
|
1154
|
+
firstAsync,
|
|
1155
1155
|
mapAsync as mapAsync4
|
|
1156
1156
|
} from "@contello/client";
|
|
1157
1157
|
import { ProjectedValue, maybeThen as maybeThen4 } from "projected";
|
|
@@ -1173,7 +1173,7 @@ function createSingleton(source, options, client, updates$, resolver) {
|
|
|
1173
1173
|
value: () => wrap(
|
|
1174
1174
|
`singleton:${_def.name}`,
|
|
1175
1175
|
() => maybeThen4(
|
|
1176
|
-
|
|
1176
|
+
firstAsync(
|
|
1177
1177
|
mapAsync4(
|
|
1178
1178
|
client.subscribe(createSourceSubscription3(source)),
|
|
1179
1179
|
(r) => r.source
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contello/store",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Framework-agnostic store for Contello CMS with reactive collections and automatic dependency tracking",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"directory": "packages/store"
|
|
12
12
|
},
|
|
13
13
|
"peerDependencies": {
|
|
14
|
-
"@contello/client": "^2.
|
|
14
|
+
"@contello/client": "^2.1.1",
|
|
15
15
|
"@contello/media": "^1.0.1"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"projected": "^3.0.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@contello/
|
|
23
|
-
"@contello/
|
|
22
|
+
"@contello/media": "^1.0.1",
|
|
23
|
+
"@contello/client": "^2.1.1"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
"dist",
|