@jsenv/navi 0.30.22 → 0.30.24
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/dev/jsenv_navi.js +18 -10
- package/dist/dev/jsenv_navi.js.map +3 -3
- package/dist/jsenv_navi.js +18 -10
- package/dist/jsenv_navi.js.map +3 -3
- package/docs/actions.md +2 -2
- package/docs/list_refresh.md +8 -0
- package/docs/resource.md +4 -3
- package/package.json +1 -1
package/docs/actions.md
CHANGED
|
@@ -554,8 +554,8 @@ const SUMMARY = createAction(fetchSummary, {
|
|
|
554
554
|
});
|
|
555
555
|
```
|
|
556
556
|
|
|
557
|
-
After a listed write, its instances that answered,
|
|
558
|
-
again; `on` is read as a resource's is
|
|
557
|
+
After a listed write, its instances that answered, are still asking, or failed
|
|
558
|
+
ask again; `on` is read as a resource's is
|
|
559
559
|
([resource.md](./resource.md#dependencies-rerun-after-another-resource-writes)).
|
|
560
560
|
|
|
561
561
|
What the server moves on its own — an email that may bounce, an account being
|
package/docs/list_refresh.md
CHANGED
|
@@ -236,6 +236,14 @@ changes what re-reads the slices and nothing else — `GET_MANY` still reruns af
|
|
|
236
236
|
`POST`. `false` turns a key off. A `withParams()` scope or a relation reads its
|
|
237
237
|
own `rerunOn` the same way, against the resource it is declared on.
|
|
238
238
|
|
|
239
|
+
A write asks again every read that answered, is still out, or failed. A failed
|
|
240
|
+
read has nothing else to bring it back: left out, one bad answer during a deploy
|
|
241
|
+
would keep a count on its old value until the page reloads. The status does not
|
|
242
|
+
matter, since a write can change what a `403` or a `404` answers, so a read that
|
|
243
|
+
keeps failing costs one request and one error per write, and never a retry loop.
|
|
244
|
+
Two reads stay out: an aborted or never-run one, which nobody is waiting for,
|
|
245
|
+
and a head start that failed, which the screen arriving asks for itself.
|
|
246
|
+
|
|
239
247
|
Adding `PUT`/`PATCH` to `GET_MANY` is the usual over-correction: it costs a
|
|
240
248
|
request and a `loading` pass to obtain something the response already contained.
|
|
241
249
|
When a `PATCH` "doesn't show", the fix is almost always server-side — return the
|
package/docs/resource.md
CHANGED
|
@@ -708,7 +708,7 @@ another collection, drawn from its first item
|
|
|
708
708
|
|
|
709
709
|
A resource reruns its own reads after its own writes (`rerunOn`, see
|
|
710
710
|
[list_refresh.md](./list_refresh.md#rerunon-verb-by-verb)), and it does so for
|
|
711
|
-
every read of the resource: a `POST` reruns every `GET_MANY`
|
|
711
|
+
every read of the resource: a `POST` reruns every `GET_MANY` already asked,
|
|
712
712
|
whatever params each one was bound to. Right for one collection, wrong for a
|
|
713
713
|
resource read under several fixed questions at once — the admins and the guests
|
|
714
714
|
of one `USER`, each list on its own screen. A guest created should not send the
|
|
@@ -767,8 +767,9 @@ const ROLE_WITH_OWNERS = ROLE.withParams(
|
|
|
767
767
|
```
|
|
768
768
|
|
|
769
769
|
Any write on a listed resource (`POST`, `PUT`, `PATCH`, `DELETE`) reruns the
|
|
770
|
-
|
|
771
|
-
|
|
770
|
+
`GET` and `GET_MANY` of the resource that declared it, those that failed included
|
|
771
|
+
([which ones](./list_refresh.md#rerunon-verb-by-verb)), and invalidates its
|
|
772
|
+
`GET_RANGE` readers: its own `rerunOn` is about its own writes. A
|
|
772
773
|
dependency is a facade: `DATABASE` and `DATABASE.withParams(…)` are two of them,
|
|
773
774
|
and only writes on the one listed count. Nothing goes the other way, and nothing
|
|
774
775
|
is inferred — a relation that really is a sub-route of the parent is modelled
|