@try-works/dsh-minimal-router 0.2.0 → 0.2.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/client/index.js +12 -7
- package/package.json +1 -1
package/client/index.js
CHANGED
|
@@ -66482,14 +66482,19 @@ var fetchEvidence = async (tab, options = {}) => {
|
|
|
66482
66482
|
if (typeof request3 !== "function") {
|
|
66483
66483
|
return { ok: false, status: null, message: "No fetch implementation is available.", retryable: false };
|
|
66484
66484
|
}
|
|
66485
|
+
const call = () => request3(evidencePath(tab, options.probe === true), {
|
|
66486
|
+
method: "GET",
|
|
66487
|
+
headers: { accept: "application/json" },
|
|
66488
|
+
credentials: "same-origin",
|
|
66489
|
+
cache: "no-store",
|
|
66490
|
+
...options.signal === void 0 ? {} : { signal: options.signal }
|
|
66491
|
+
});
|
|
66485
66492
|
try {
|
|
66486
|
-
|
|
66487
|
-
|
|
66488
|
-
|
|
66489
|
-
|
|
66490
|
-
|
|
66491
|
-
...options.signal === void 0 ? {} : { signal: options.signal }
|
|
66492
|
-
});
|
|
66493
|
+
let response = await call();
|
|
66494
|
+
if (response.status === 404) {
|
|
66495
|
+
await new Promise((resolve7) => setTimeout(resolve7, 750));
|
|
66496
|
+
if (options.signal?.aborted !== true) response = await call();
|
|
66497
|
+
}
|
|
66493
66498
|
if (!response.ok) {
|
|
66494
66499
|
return { ok: false, status: response.status, message: evidenceStatusMessage(response.status), retryable: true };
|
|
66495
66500
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@try-works/dsh-minimal-router",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "DSH local router plugin: per-session auto-routing between a local engine and remote models, evidence pages, and a plugin-owned engine provider.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|