synthesisui 0.16.57 → 0.16.58
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/commands/import.js +12 -0
- package/package.json +1 -1
package/dist/commands/import.js
CHANGED
|
@@ -960,6 +960,18 @@ export async function runImport(opts) {
|
|
|
960
960
|
.catch(() => null)
|
|
961
961
|
: null;
|
|
962
962
|
console.log("");
|
|
963
|
+
// A 401 is not a refusal of the census, it is an expired session - and
|
|
964
|
+
// saying "HTTP 401" at the end of a long read leaves the person guessing at
|
|
965
|
+
// which of the two it was (dono, 31/07). A stale token gets past the
|
|
966
|
+
// `readToken` guard above and only fails here.
|
|
967
|
+
if (res?.status === 401) {
|
|
968
|
+
console.log(body("Your session has expired. The census is on disk."));
|
|
969
|
+
console.log("");
|
|
970
|
+
console.log(body(` ${paint.strong("synthesisui login")}`));
|
|
971
|
+
console.log(body(` synthesisui import --census ${relative(root, out)}${chosen ? ` --name "${chosen}"` : ""}`));
|
|
972
|
+
console.log("");
|
|
973
|
+
return;
|
|
974
|
+
}
|
|
963
975
|
console.log(body(res
|
|
964
976
|
? `The registry refused it (HTTP ${res.status})${detail ? `: ${detail}` : "."}`
|
|
965
977
|
: "Could not reach the registry. The census is on disk - try again later."));
|
package/package.json
CHANGED