@remit/web-client 0.0.68 → 0.0.70
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remit/web-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.70",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Remit web client, published as composable primitives — the app shell, auth shells, and runtime config. A distributor imports what it composes and bundles it.",
|
|
6
6
|
"exports": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The self-update surface in Settings › Advanced — the only place that talks
|
|
3
|
-
* about updates. Renders nothing when the surface is absent (no manifest URL,
|
|
4
|
-
* not
|
|
3
|
+
* about updates. Renders nothing when the surface is absent (no manifest URL, or
|
|
4
|
+
* not signed in), so there is no entry point at all in that case.
|
|
5
5
|
*/
|
|
6
6
|
import { SelfUpdateConfirmDialog, SelfUpdateSection } from "@remit/ui";
|
|
7
7
|
import { useState } from "react";
|
|
@@ -222,13 +222,13 @@ describe("deriveUpdateSurface — the surface without a run", () => {
|
|
|
222
222
|
);
|
|
223
223
|
});
|
|
224
224
|
|
|
225
|
-
test("a configured surface that has not checked yet is
|
|
225
|
+
test("a configured surface that has not checked yet is never-checked, not a spinner", () => {
|
|
226
226
|
const result = deriveUpdateSurface(
|
|
227
227
|
input({ data: response({ check: { status: "disabled" } }) }),
|
|
228
228
|
);
|
|
229
229
|
assert.equal(
|
|
230
230
|
result.surface.status === "ready" && result.surface.section.status,
|
|
231
|
-
"
|
|
231
|
+
"neverChecked",
|
|
232
232
|
);
|
|
233
233
|
});
|
|
234
234
|
|
|
@@ -112,9 +112,10 @@ export function mapUpdatePhase(phase: RemitImapSystemUpdatePhase): UpdatePhase {
|
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
* The surface has no entry point for this caller: `404` (no manifest URL
|
|
115
|
-
* configured)
|
|
116
|
-
*
|
|
117
|
-
*
|
|
115
|
+
* configured) or `401` (not authenticated). Both render nothing and stop the
|
|
116
|
+
* poll. `403` is treated the same way as defensive cover for any authenticated
|
|
117
|
+
* edge state, though the backend no longer distinguishes callers once the
|
|
118
|
+
* surface is on.
|
|
118
119
|
*/
|
|
119
120
|
export function isSurfaceAbsent(error: unknown): boolean {
|
|
120
121
|
const status = getErrorStatus(error);
|
|
@@ -291,10 +292,12 @@ function checkSection(
|
|
|
291
292
|
};
|
|
292
293
|
}
|
|
293
294
|
|
|
294
|
-
// A configured surface that has not run its first check yet
|
|
295
|
-
// not
|
|
295
|
+
// A configured surface that has not run its first check yet is never-checked,
|
|
296
|
+
// not checking: the updater runs the check on a cadence and has not written a
|
|
297
|
+
// result. A spinner here would run forever, since nothing on this poll is in
|
|
298
|
+
// flight. Only a genuine refetch (handled above) shows the spinner.
|
|
296
299
|
if (check.status === "disabled") {
|
|
297
|
-
return { status: "
|
|
300
|
+
return { status: "neverChecked", version: data.currentVersion };
|
|
298
301
|
}
|
|
299
302
|
|
|
300
303
|
const release = releaseFromCheck(data, now);
|