@platformatic/watt-admin 0.6.0-alpha.5 → 0.6.0-alpha.7

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/lib/start.js CHANGED
@@ -58,17 +58,22 @@ export async function start (client, selectedRuntime) {
58
58
  entrypointUrl = await server.start()
59
59
 
60
60
  if (record) {
61
- closeWithGrace({ delay: msOneMinute }, async ({ signal }) => {
62
- if (signal === 'SIGINT') {
63
- clearTimeout(recordTimeout)
64
- await recordMetrics(entrypointUrl)
65
- }
66
-
61
+ async function shutdown () {
67
62
  // Always clean up the client
68
63
  await client.close()
69
64
 
70
65
  // Then stop the server
71
66
  await server.close()
67
+ }
68
+
69
+ process.once('SIGINT', async () => {
70
+ process.on('SIGINT', () => {
71
+ // we ignore future signals to avoid double shutdown
72
+ })
73
+ clearTimeout(recordTimeout)
74
+ await recordMetrics(entrypointUrl)
75
+ await shutdown()
76
+ process.removeAllListeners('SIGINT')
72
77
  })
73
78
 
74
79
  const { statusCode, body } = await requestRecord('start')
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@platformatic/watt-admin",
4
- "version": "0.6.0-alpha.5",
4
+ "version": "0.6.0-alpha.7",
5
5
  "scripts": {
6
6
  "prepublishOnly": "npm run clean && npm run build",
7
7
  "dev": "wattpm dev",
@@ -32,7 +32,7 @@
32
32
  "@platformatic/ui-components": "^0.19.1",
33
33
  "@platformatic/vite": "^3.11.0",
34
34
  "@platformatic/wattpm-pprof-capture": "^3.15.0",
35
- "@scalar/api-reference-react": "^0.7.55",
35
+ "@scalar/api-reference-react": "^0.8.0",
36
36
  "@vitejs/plugin-react": "^5.0.4",
37
37
  "amaro": "^1.1.4",
38
38
  "autoprefixer": "^10.4.21",