@naiv/api-agent 0.0.3 → 0.0.4

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.
@@ -2,16 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const child_process_manager_1 = require("./child_process_manager");
4
4
  const journal_log_1 = require("./journal_log");
5
- process.on('SIGINT', () => {
6
- console.log('Received SIGINT signal. Performing graceful shutdown...');
7
- journal_log_1.JournalLog.instance.persistLog();
8
- child_process_manager_1.ChildProcessManager.instance.cleanUpChildProcess();
9
- process.exit(0); // Exit after cleanup
10
- });
11
- process.on('SIGTERM', () => {
5
+ function handleError() {
12
6
  console.log('Received SIGTERM signal. Performing graceful shutdown...');
13
7
  journal_log_1.JournalLog.instance.persistLog();
14
8
  child_process_manager_1.ChildProcessManager.instance.cleanUpChildProcess();
15
9
  process.exit(0);
16
- });
10
+ }
11
+ process.on('SIGINT', handleError);
12
+ process.on('SIGTERM', handleError);
13
+ process.on("unhandledRejection", handleError);
14
+ process.on("uncaughtException", handleError);
17
15
  //# sourceMappingURL=cleanup-safely.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cleanup-safely.js","sourceRoot":"","sources":["../cleanup-safely.ts"],"names":[],"mappings":";;AAAA,mEAA8D;AAC9D,+CAA2C;AAE3C,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;IACxB,OAAO,CAAC,GAAG,CAAC,yDAAyD,CAAC,CAAC;IACvE,wBAAU,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IACjC,2CAAmB,CAAC,QAAQ,CAAC,mBAAmB,EAAE,CAAC;IACnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,qBAAqB;AACxC,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE;IACzB,OAAO,CAAC,GAAG,CAAC,0DAA0D,CAAC,CAAC;IACxE,wBAAU,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IACjC,2CAAmB,CAAC,QAAQ,CAAC,mBAAmB,EAAE,CAAC;IACnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"cleanup-safely.js","sourceRoot":"","sources":["../cleanup-safely.ts"],"names":[],"mappings":";;AAAA,mEAA8D;AAC9D,+CAA2C;AAE3C,SAAS,WAAW;IAClB,OAAO,CAAC,GAAG,CAAC,0DAA0D,CAAC,CAAC;IACxE,wBAAU,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IACjC,2CAAmB,CAAC,QAAQ,CAAC,mBAAmB,EAAE,CAAC;IACnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;AAClC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AACnC,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,WAAW,CAAC,CAAC;AAC9C,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,WAAW,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naiv/api-agent",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "publishConfig": {