@contello/store 1.5.0 → 1.5.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 +2 -2
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -663,7 +663,7 @@ function createCollectionSync(def, client, updates$, resolver) {
|
|
|
663
663
|
const base = createCollection(def, client, updates$, resolver);
|
|
664
664
|
function assertSync(value, method) {
|
|
665
665
|
if (value instanceof Promise) {
|
|
666
|
-
throw new Error(`collection "${
|
|
666
|
+
throw new Error(`collection "${base.name}".${method}() is not initialized yet \u2014 call collection.load() first`);
|
|
667
667
|
}
|
|
668
668
|
return value;
|
|
669
669
|
}
|
|
@@ -1164,7 +1164,7 @@ function createSingletonSync(def, client, updates$, resolver) {
|
|
|
1164
1164
|
get() {
|
|
1165
1165
|
const result = base.get();
|
|
1166
1166
|
if (result instanceof Promise) {
|
|
1167
|
-
throw new Error(`singleton "${
|
|
1167
|
+
throw new Error(`singleton "${base.name}" is not initialized yet \u2014 call singleton.load() first`);
|
|
1168
1168
|
}
|
|
1169
1169
|
return result;
|
|
1170
1170
|
}
|
package/dist/index.js
CHANGED
|
@@ -626,7 +626,7 @@ function createCollectionSync(def, client, updates$, resolver) {
|
|
|
626
626
|
const base = createCollection(def, client, updates$, resolver);
|
|
627
627
|
function assertSync(value, method) {
|
|
628
628
|
if (value instanceof Promise) {
|
|
629
|
-
throw new Error(`collection "${
|
|
629
|
+
throw new Error(`collection "${base.name}".${method}() is not initialized yet \u2014 call collection.load() first`);
|
|
630
630
|
}
|
|
631
631
|
return value;
|
|
632
632
|
}
|
|
@@ -1127,7 +1127,7 @@ function createSingletonSync(def, client, updates$, resolver) {
|
|
|
1127
1127
|
get() {
|
|
1128
1128
|
const result = base.get();
|
|
1129
1129
|
if (result instanceof Promise) {
|
|
1130
|
-
throw new Error(`singleton "${
|
|
1130
|
+
throw new Error(`singleton "${base.name}" is not initialized yet \u2014 call singleton.load() first`);
|
|
1131
1131
|
}
|
|
1132
1132
|
return result;
|
|
1133
1133
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contello/store",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.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",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"peerDependencies": {
|
|
14
14
|
"projected": "^2.0.0",
|
|
15
15
|
"rxjs": "^7.0.0",
|
|
16
|
-
"@contello/client": "^1.1.
|
|
16
|
+
"@contello/client": "^1.1.1",
|
|
17
17
|
"@contello/media": "^1.0.0"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"projected": "^2.2.1",
|
|
25
25
|
"rxjs": "^7.8.2",
|
|
26
|
-
"@contello/client": "^1.1.
|
|
26
|
+
"@contello/client": "^1.1.1",
|
|
27
27
|
"@contello/media": "^1.0.0"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|