regionclaw 0.0.19 → 0.0.21
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/apps/ui/src/components/regionclaw-update-banner.tsx +38 -10
- package/bin/regionclaw.js +3 -1
- package/dist/ui/BUILD_ID +1 -1
- package/dist/ui/build-manifest.json +3 -3
- package/dist/ui/server/app/(app)/dashboard/page.js +2 -2
- package/dist/ui/server/app/(app)/dashboard/page.js.nft.json +1 -1
- package/dist/ui/server/app/(app)/dashboard/page_client-reference-manifest.js +1 -1
- package/dist/ui/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dist/ui/server/app/_global-error.html +1 -1
- package/dist/ui/server/app/_global-error.rsc +1 -1
- package/dist/ui/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/ui/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/ui/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/ui/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/ui/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/ui/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/ui/server/app/_not-found/page.js +2 -2
- package/dist/ui/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/ui/server/app/_not-found.html +1 -1
- package/dist/ui/server/app/_not-found.rsc +5 -5
- package/dist/ui/server/app/_not-found.segments/_full.segment.rsc +5 -5
- package/dist/ui/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/ui/server/app/_not-found.segments/_index.segment.rsc +5 -5
- package/dist/ui/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/ui/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/ui/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/dist/ui/server/app/login/page.js +1 -1
- package/dist/ui/server/app/login/page.js.nft.json +1 -1
- package/dist/ui/server/app/login/page_client-reference-manifest.js +1 -1
- package/dist/ui/server/app/page.js +1 -1
- package/dist/ui/server/app/page_client-reference-manifest.js +1 -1
- package/dist/ui/server/app/setup/page.js +1 -1
- package/dist/ui/server/app/setup/page.js.nft.json +1 -1
- package/dist/ui/server/app/setup/page_client-reference-manifest.js +1 -1
- package/dist/ui/server/chunks/{353.js → 313.js} +1 -1
- package/dist/ui/server/middleware-build-manifest.js +1 -1
- package/dist/ui/server/pages/404.html +1 -1
- package/dist/ui/server/pages/500.html +1 -1
- package/dist/ui/static/chunks/app/(app)/{layout-82cf93d9a66acd5d.js → layout-97b7aad9af7774cd.js} +1 -1
- package/dist/ui/static/chunks/app/{layout-812a5dd3c2548265.js → layout-3d1ba533ac2879b9.js} +1 -1
- package/dist/ui/static/chunks/{webpack-95e4dbce7bf11a3e.js → webpack-aeb6fe2403cfa38a.js} +1 -1
- package/package.json +1 -1
- /package/dist/ui/static/{8XzvPZcI7BAp44cFrlmSD → K80LYO_dQPGtPZuV6HX5L}/_buildManifest.js +0 -0
- /package/dist/ui/static/{8XzvPZcI7BAp44cFrlmSD → K80LYO_dQPGtPZuV6HX5L}/_ssgManifest.js +0 -0
|
@@ -50,10 +50,13 @@ export function RegionClawUpdateBanner() {
|
|
|
50
50
|
|
|
51
51
|
async function loadStatus() {
|
|
52
52
|
try {
|
|
53
|
-
const response = await
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
const response = await fetchWithTimeout("/api/update/status", {
|
|
54
|
+
timeoutMs: 3_000,
|
|
55
|
+
init: {
|
|
56
|
+
method: "GET",
|
|
57
|
+
credentials: "same-origin",
|
|
58
|
+
cache: "no-store",
|
|
59
|
+
},
|
|
57
60
|
});
|
|
58
61
|
const payload = (await response.json()) as UpdateStatus;
|
|
59
62
|
if (!cancelled) {
|
|
@@ -85,10 +88,13 @@ export function RegionClawUpdateBanner() {
|
|
|
85
88
|
|
|
86
89
|
while (Date.now() - startedAt < 120_000) {
|
|
87
90
|
try {
|
|
88
|
-
const response = await
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
const response = await fetchWithTimeout("/api/update/status", {
|
|
92
|
+
timeoutMs: 1_200,
|
|
93
|
+
init: {
|
|
94
|
+
method: "GET",
|
|
95
|
+
credentials: "same-origin",
|
|
96
|
+
cache: "no-store",
|
|
97
|
+
},
|
|
92
98
|
});
|
|
93
99
|
|
|
94
100
|
if (response.ok) {
|
|
@@ -97,7 +103,7 @@ export function RegionClawUpdateBanner() {
|
|
|
97
103
|
const nextUrl = new URL(window.location.href);
|
|
98
104
|
nextUrl.searchParams.set("regionclawUpdated", targetVersion);
|
|
99
105
|
nextUrl.searchParams.set("regionclawReloadedAt", String(Date.now()));
|
|
100
|
-
window.location.
|
|
106
|
+
window.location.replace(nextUrl.toString());
|
|
101
107
|
return;
|
|
102
108
|
}
|
|
103
109
|
}
|
|
@@ -105,7 +111,7 @@ export function RegionClawUpdateBanner() {
|
|
|
105
111
|
// RegionClaw is probably restarting; keep polling.
|
|
106
112
|
}
|
|
107
113
|
|
|
108
|
-
await new Promise((resolve) => setTimeout(resolve,
|
|
114
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
109
115
|
}
|
|
110
116
|
|
|
111
117
|
toast.error("RegionClaw restarted too slowly. Refresh the page manually.");
|
|
@@ -231,3 +237,25 @@ export function RegionClawUpdateBanner() {
|
|
|
231
237
|
</div>
|
|
232
238
|
);
|
|
233
239
|
}
|
|
240
|
+
|
|
241
|
+
async function fetchWithTimeout(
|
|
242
|
+
input: RequestInfo | URL,
|
|
243
|
+
options: {
|
|
244
|
+
timeoutMs: number;
|
|
245
|
+
init?: RequestInit;
|
|
246
|
+
},
|
|
247
|
+
) {
|
|
248
|
+
const controller = new AbortController();
|
|
249
|
+
const timeoutId = setTimeout(() => {
|
|
250
|
+
controller.abort();
|
|
251
|
+
}, options.timeoutMs);
|
|
252
|
+
|
|
253
|
+
try {
|
|
254
|
+
return await fetch(input, {
|
|
255
|
+
...options.init,
|
|
256
|
+
signal: controller.signal,
|
|
257
|
+
});
|
|
258
|
+
} finally {
|
|
259
|
+
clearTimeout(timeoutId);
|
|
260
|
+
}
|
|
261
|
+
}
|
package/bin/regionclaw.js
CHANGED
|
@@ -287,7 +287,9 @@ async function stopRunningProcess(payload) {
|
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
-
|
|
290
|
+
const gracefulAttempts = isPortListening(payload.host, payload.port) ? 40 : 8;
|
|
291
|
+
|
|
292
|
+
for (let attempt = 0; attempt < gracefulAttempts; attempt += 1) {
|
|
291
293
|
if (!isPidRunning(payload.pid)) {
|
|
292
294
|
clearRuntimeState(payload.pid);
|
|
293
295
|
return {
|
package/dist/ui/BUILD_ID
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
K80LYO_dQPGtPZuV6HX5L
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
],
|
|
5
5
|
"devFiles": [],
|
|
6
6
|
"lowPriorityFiles": [
|
|
7
|
-
"static/
|
|
8
|
-
"static/
|
|
7
|
+
"static/K80LYO_dQPGtPZuV6HX5L/_buildManifest.js",
|
|
8
|
+
"static/K80LYO_dQPGtPZuV6HX5L/_ssgManifest.js"
|
|
9
9
|
],
|
|
10
10
|
"rootMainFiles": [
|
|
11
|
-
"static/chunks/webpack-
|
|
11
|
+
"static/chunks/webpack-aeb6fe2403cfa38a.js",
|
|
12
12
|
"static/chunks/628c8b96-cdfc45e32fce7014.js",
|
|
13
13
|
"static/chunks/16-7d9bc77e936a4cb6.js",
|
|
14
14
|
"static/chunks/main-app-e0f42b94daafe3ad.js"
|