@abstractframework/observer 0.1.14 → 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/README.md +23 -8
- package/bin/cli.js +54 -264
- package/bin/server.js +222 -0
- package/dist/assets/index-BYhozpg0.css +1 -0
- package/dist/assets/index-CKmZd-uV.js +150 -0
- package/dist/assets/index-CKmZd-uV.js.map +1 -0
- package/dist/index.html +5 -5
- package/dist/manifest.webmanifest +3 -2
- package/dist/sw.js +9 -4
- package/package.json +2 -2
- package/dist/assets/index-1Y-bFEjo.js +0 -141
- package/dist/assets/index-1Y-bFEjo.js.map +0 -1
- package/dist/assets/index-B2bF2L6k.css +0 -1
package/dist/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
|
|
7
7
|
<!-- PWA Manifest -->
|
|
8
|
-
<link rel="manifest" href="
|
|
8
|
+
<link rel="manifest" href="manifest.webmanifest" />
|
|
9
9
|
|
|
10
10
|
<meta name="theme-color" content="#111827" />
|
|
11
11
|
<meta name="color-scheme" content="dark" />
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
15
15
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
16
16
|
<meta name="apple-mobile-web-app-title" content="AbstractObserver" />
|
|
17
|
-
<link rel="apple-touch-icon" href="
|
|
17
|
+
<link rel="apple-touch-icon" href="icon.svg" />
|
|
18
18
|
|
|
19
19
|
<!-- Favicon -->
|
|
20
|
-
<link rel="icon" type="image/svg+xml" href="
|
|
20
|
+
<link rel="icon" type="image/svg+xml" href="icon.svg" />
|
|
21
21
|
<title>AbstractObserver</title>
|
|
22
|
-
<script type="module" crossorigin src="
|
|
23
|
-
<link rel="stylesheet" crossorigin href="
|
|
22
|
+
<script type="module" crossorigin src="./assets/index-CKmZd-uV.js"></script>
|
|
23
|
+
<link rel="stylesheet" crossorigin href="./assets/index-BYhozpg0.css">
|
|
24
24
|
</head>
|
|
25
25
|
<body>
|
|
26
26
|
<div id="root"></div>
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "AbstractObserver",
|
|
3
3
|
"short_name": "Observer",
|
|
4
|
-
"start_url": "
|
|
4
|
+
"start_url": "./",
|
|
5
|
+
"scope": "./",
|
|
5
6
|
"display": "standalone",
|
|
6
7
|
"background_color": "#111827",
|
|
7
8
|
"theme_color": "#111827",
|
|
8
9
|
"icons": [
|
|
9
10
|
{
|
|
10
|
-
"src": "
|
|
11
|
+
"src": "icon.svg",
|
|
11
12
|
"sizes": "any",
|
|
12
13
|
"type": "image/svg+xml"
|
|
13
14
|
}
|
package/dist/sw.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
// Minimal service worker (PWA shell cache).
|
|
2
2
|
// Note: PWA on iOS requires HTTPS (except localhost) and has platform-specific limitations.
|
|
3
3
|
|
|
4
|
-
const CACHE_NAME = "abstractobserver-pwa-
|
|
4
|
+
const CACHE_NAME = "abstractobserver-pwa-v2";
|
|
5
|
+
// Everything is relative to this worker's scope: "/" standalone, or
|
|
6
|
+
// "/apps/observer/" when the gateway serves the app.
|
|
7
|
+
const SCOPE = self.registration.scope;
|
|
8
|
+
const SHELL = new URL("./", SCOPE).href;
|
|
9
|
+
const API = new URL("api/", SCOPE).href;
|
|
5
10
|
|
|
6
11
|
function isHtmlRequest(req) {
|
|
7
12
|
const accept = req.headers.get("accept") || "";
|
|
@@ -13,7 +18,7 @@ self.addEventListener("install", (event) => {
|
|
|
13
18
|
(async () => {
|
|
14
19
|
const cache = await caches.open(CACHE_NAME);
|
|
15
20
|
// Cache only the root shell for offline fallback. Navigation requests are still network-first.
|
|
16
|
-
await cache.addAll([
|
|
21
|
+
await cache.addAll([SHELL]);
|
|
17
22
|
self.skipWaiting();
|
|
18
23
|
})()
|
|
19
24
|
);
|
|
@@ -34,7 +39,7 @@ self.addEventListener("fetch", (event) => {
|
|
|
34
39
|
const url = new URL(req.url);
|
|
35
40
|
|
|
36
41
|
// Never cache API calls.
|
|
37
|
-
if (url.
|
|
42
|
+
if (url.href.startsWith(API)) {
|
|
38
43
|
return;
|
|
39
44
|
}
|
|
40
45
|
|
|
@@ -55,7 +60,7 @@ self.addEventListener("fetch", (event) => {
|
|
|
55
60
|
if (resp && resp.status === 200) cache.put(req, resp.clone());
|
|
56
61
|
return resp;
|
|
57
62
|
} catch {
|
|
58
|
-
return cached || (await cache.match(
|
|
63
|
+
return cached || (await cache.match(SHELL)) || new Response("Offline", { status: 503 });
|
|
59
64
|
}
|
|
60
65
|
}
|
|
61
66
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abstractframework/observer",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Gateway-only observability UI for AbstractFramework - connect to a Run Gateway, replay/stream the ledger, and submit durable commands",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Laurent-Philippe Albou",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"prepublishOnly": "npm run build"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@abstractframework/app-server": "^0.1.
|
|
46
|
+
"@abstractframework/app-server": "^0.1.11",
|
|
47
47
|
"react": "^18.2.0",
|
|
48
48
|
"react-dom": "^18.2.0",
|
|
49
49
|
"reactflow": "^11.10.4"
|