pm2-orbit 1.0.4 → 1.0.6
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/server.js +193 -193
- package/dist-ui/assets/{index-pRE_kpC2.js → index-iyJcRdk9.js} +11 -11
- package/dist-ui/index.html +16 -2
- package/dist-ui/manifest.json +20 -0
- package/dist-ui/sw.js +60 -0
- package/package.json +1 -1
package/dist-ui/index.html
CHANGED
|
@@ -2,8 +2,15 @@
|
|
|
2
2
|
<html lang="en" class="dark">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
|
6
|
+
<meta name="theme-color" content="#14b8a6" />
|
|
7
|
+
<meta name="description" content="High-performance PM2 monitoring dashboard — event-driven, 1000+ processes" />
|
|
8
|
+
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
9
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
|
10
|
+
<meta name="apple-mobile-web-app-title" content="PM2 Orbit" />
|
|
6
11
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
12
|
+
<link rel="apple-touch-icon" href="/favicon.svg" />
|
|
13
|
+
<link rel="manifest" href="/manifest.json" />
|
|
7
14
|
<title>PM2 Orbit</title>
|
|
8
15
|
<style>
|
|
9
16
|
@font-face {
|
|
@@ -49,7 +56,7 @@
|
|
|
49
56
|
} catch (_) {}
|
|
50
57
|
})();
|
|
51
58
|
</script>
|
|
52
|
-
<script type="module" crossorigin src="/assets/index-
|
|
59
|
+
<script type="module" crossorigin src="/assets/index-iyJcRdk9.js"></script>
|
|
53
60
|
<link rel="modulepreload" crossorigin href="/assets/icons-DvbqpVzZ.js">
|
|
54
61
|
<link rel="modulepreload" crossorigin href="/assets/table-virtual-Oq2FLz9e.js">
|
|
55
62
|
<link rel="modulepreload" crossorigin href="/assets/cmdk-D6Y8xHyf.js">
|
|
@@ -58,5 +65,12 @@
|
|
|
58
65
|
</head>
|
|
59
66
|
<body>
|
|
60
67
|
<div id="root"></div>
|
|
68
|
+
<script>
|
|
69
|
+
if ('serviceWorker' in navigator) {
|
|
70
|
+
window.addEventListener('load', () => {
|
|
71
|
+
navigator.serviceWorker.register('/sw.js').catch(() => {});
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
</script>
|
|
61
75
|
</body>
|
|
62
76
|
</html>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "PM2 Orbit",
|
|
3
|
+
"short_name": "PM2 Orbit",
|
|
4
|
+
"description": "High-performance PM2 monitoring dashboard",
|
|
5
|
+
"start_url": "/",
|
|
6
|
+
"display": "standalone",
|
|
7
|
+
"background_color": "#0b0f1a",
|
|
8
|
+
"theme_color": "#14b8a6",
|
|
9
|
+
"orientation": "any",
|
|
10
|
+
"icons": [
|
|
11
|
+
{
|
|
12
|
+
"src": "/favicon.svg",
|
|
13
|
+
"sizes": "any",
|
|
14
|
+
"type": "image/svg+xml",
|
|
15
|
+
"purpose": "any maskable"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"categories": ["developer", "utilities"],
|
|
19
|
+
"lang": "en"
|
|
20
|
+
}
|
package/dist-ui/sw.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const CACHE_NAME = 'pm2-orbit-v1';
|
|
2
|
+
const STATIC_ASSETS = [
|
|
3
|
+
'/',
|
|
4
|
+
'/index.html',
|
|
5
|
+
'/favicon.svg',
|
|
6
|
+
];
|
|
7
|
+
|
|
8
|
+
self.addEventListener('install', (event) => {
|
|
9
|
+
event.waitUntil(
|
|
10
|
+
caches.open(CACHE_NAME).then((cache) => {
|
|
11
|
+
return cache.addAll(STATIC_ASSETS);
|
|
12
|
+
})
|
|
13
|
+
);
|
|
14
|
+
self.skipWaiting();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
self.addEventListener('activate', (event) => {
|
|
18
|
+
event.waitUntil(
|
|
19
|
+
caches.keys().then((keys) => {
|
|
20
|
+
return Promise.all(
|
|
21
|
+
keys.filter((key) => key !== CACHE_NAME).map((key) => caches.delete(key))
|
|
22
|
+
);
|
|
23
|
+
})
|
|
24
|
+
);
|
|
25
|
+
self.clients.claim();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
self.addEventListener('fetch', (event) => {
|
|
29
|
+
const url = new URL(event.request.url);
|
|
30
|
+
|
|
31
|
+
if (url.pathname.startsWith('/api/') || url.pathname === '/ws') {
|
|
32
|
+
event.respondWith(
|
|
33
|
+
fetch(event.request).catch(() => {
|
|
34
|
+
return new Response(JSON.stringify({ error: 'Offline' }), {
|
|
35
|
+
status: 503,
|
|
36
|
+
headers: { 'Content-Type': 'application/json' },
|
|
37
|
+
});
|
|
38
|
+
})
|
|
39
|
+
);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
event.respondWith(
|
|
44
|
+
caches.match(event.request).then((cached) => {
|
|
45
|
+
return cached || fetch(event.request).then((response) => {
|
|
46
|
+
if (response.status === 200) {
|
|
47
|
+
const responseClone = response.clone();
|
|
48
|
+
caches.open(CACHE_NAME).then((cache) => {
|
|
49
|
+
cache.put(event.request, responseClone);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return response;
|
|
53
|
+
});
|
|
54
|
+
}).catch(() => {
|
|
55
|
+
if (event.request.destination === 'document') {
|
|
56
|
+
return caches.match('/');
|
|
57
|
+
}
|
|
58
|
+
})
|
|
59
|
+
);
|
|
60
|
+
});
|