com.jimuwd.xian.registry-proxy 1.0.126 → 1.0.127

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.
@@ -20,15 +20,15 @@ async function doCleanup() {
20
20
  await deletePortFile();
21
21
  }
22
22
  // 捕获信号或异常
23
- process.on('SIGINT', () => {
23
+ process.on('SIGINT', async () => {
24
24
  logger.info('收到 SIGINT(Ctrl+C)');
25
- process.exit(0); // 触发 exit 事件
25
+ await gracefulShutdown();
26
26
  });
27
- process.on('SIGTERM', () => {
27
+ process.on('SIGTERM', async () => {
28
28
  logger.info('收到 SIGTERM');
29
- process.exit(0); // 触发 exit 事件
29
+ await gracefulShutdown();
30
30
  });
31
- process.on('uncaughtException', (err) => {
31
+ process.on('uncaughtException', async (err) => {
32
32
  logger.info('uncaughtException:', err);
33
- process.exit(1); // 触发 exit 事件
33
+ await gracefulShutdown();
34
34
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "com.jimuwd.xian.registry-proxy",
3
- "version": "1.0.126",
3
+ "version": "1.0.127",
4
4
  "description": "A lightweight npm registry proxy with fallback support",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",