@olane/o-core 0.8.1 → 0.8.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graceful-shutdown.d.ts","sourceRoot":"","sources":["../../../src/core/graceful-shutdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,WAAW,eAAe;IAC9B,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,eAAe,EACxB,OAAO,GAAE,uBAA4B,GACpC,IAAI,
|
|
1
|
+
{"version":3,"file":"graceful-shutdown.d.ts","sourceRoot":"","sources":["../../../src/core/graceful-shutdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,WAAW,eAAe;IAC9B,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,eAAe,EACxB,OAAO,GAAE,uBAA4B,GACpC,IAAI,CA2EN;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,KAAK,CAAC;IAAE,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,EACpE,MAAM,GAAE,MAA2C,GAClD,eAAe,CAmBjB"}
|
|
@@ -45,6 +45,12 @@ export function setupGracefulShutdown(cleanup, options = {}) {
|
|
|
45
45
|
process.on('SIGUSR2', () => performCleanup('SIGUSR2'));
|
|
46
46
|
// Handle uncaught exceptions
|
|
47
47
|
process.on('uncaughtException', (error) => {
|
|
48
|
+
// WebSocket transport errors are recoverable - log but don't exit
|
|
49
|
+
if (error?.code === 'WS_ERR_INVALID_CLOSE_CODE' ||
|
|
50
|
+
error?.code === 'WS_ERR_EXPECTED') {
|
|
51
|
+
logger.warn('Recoverable WebSocket error (suppressed):', error.message);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
48
54
|
logger.error('Uncaught Exception:', error);
|
|
49
55
|
performCleanup('uncaughtException');
|
|
50
56
|
});
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export declare enum oErrorCodes {
|
|
2
|
-
UNKNOWN =
|
|
3
|
-
NOT_FOUND =
|
|
4
|
-
NOT_IMPLEMENTED =
|
|
5
|
-
NOT_CONFIGURED =
|
|
6
|
-
NOT_AUTHORIZED =
|
|
7
|
-
MISSING_PARAMETERS =
|
|
8
|
-
INVALID_PARAMETERS =
|
|
9
|
-
INVALID_RESPONSE =
|
|
10
|
-
INVALID_REQUEST =
|
|
11
|
-
INVALID_STATE =
|
|
12
|
-
INVALID_ACTION =
|
|
13
|
-
INVALID_CREDENTIALS =
|
|
14
|
-
TRANSPORT_NOT_SUPPORTED =
|
|
15
|
-
FAILED_TO_DIAL_TARGET =
|
|
16
|
-
INVALID_CAPABILITY =
|
|
17
|
-
CONNECTION_LIMIT_REACHED =
|
|
18
|
-
TIMEOUT =
|
|
19
|
-
INTERNAL_ERROR =
|
|
20
|
-
SEND_FAILED =
|
|
21
|
-
RECEIVE_FAILED =
|
|
2
|
+
UNKNOWN = 4001,
|
|
3
|
+
NOT_FOUND = 4002,
|
|
4
|
+
NOT_IMPLEMENTED = 4003,
|
|
5
|
+
NOT_CONFIGURED = 4004,
|
|
6
|
+
NOT_AUTHORIZED = 4005,
|
|
7
|
+
MISSING_PARAMETERS = 4006,
|
|
8
|
+
INVALID_PARAMETERS = 4007,
|
|
9
|
+
INVALID_RESPONSE = 4008,
|
|
10
|
+
INVALID_REQUEST = 4009,
|
|
11
|
+
INVALID_STATE = 4010,
|
|
12
|
+
INVALID_ACTION = 4011,
|
|
13
|
+
INVALID_CREDENTIALS = 4012,
|
|
14
|
+
TRANSPORT_NOT_SUPPORTED = 4013,
|
|
15
|
+
FAILED_TO_DIAL_TARGET = 4014,
|
|
16
|
+
INVALID_CAPABILITY = 4015,
|
|
17
|
+
CONNECTION_LIMIT_REACHED = 4016,
|
|
18
|
+
TIMEOUT = 4017,
|
|
19
|
+
INTERNAL_ERROR = 4018,
|
|
20
|
+
SEND_FAILED = 4019,
|
|
21
|
+
RECEIVE_FAILED = 4020
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=codes.error.d.ts.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export var oErrorCodes;
|
|
2
2
|
(function (oErrorCodes) {
|
|
3
|
-
oErrorCodes[oErrorCodes["UNKNOWN"] =
|
|
4
|
-
oErrorCodes[oErrorCodes["NOT_FOUND"] =
|
|
5
|
-
oErrorCodes[oErrorCodes["NOT_IMPLEMENTED"] =
|
|
6
|
-
oErrorCodes[oErrorCodes["NOT_CONFIGURED"] =
|
|
7
|
-
oErrorCodes[oErrorCodes["NOT_AUTHORIZED"] =
|
|
8
|
-
oErrorCodes[oErrorCodes["MISSING_PARAMETERS"] =
|
|
9
|
-
oErrorCodes[oErrorCodes["INVALID_PARAMETERS"] =
|
|
10
|
-
oErrorCodes[oErrorCodes["INVALID_RESPONSE"] =
|
|
11
|
-
oErrorCodes[oErrorCodes["INVALID_REQUEST"] =
|
|
12
|
-
oErrorCodes[oErrorCodes["INVALID_STATE"] =
|
|
13
|
-
oErrorCodes[oErrorCodes["INVALID_ACTION"] =
|
|
14
|
-
oErrorCodes[oErrorCodes["INVALID_CREDENTIALS"] =
|
|
15
|
-
oErrorCodes[oErrorCodes["TRANSPORT_NOT_SUPPORTED"] =
|
|
16
|
-
oErrorCodes[oErrorCodes["FAILED_TO_DIAL_TARGET"] =
|
|
17
|
-
oErrorCodes[oErrorCodes["INVALID_CAPABILITY"] =
|
|
18
|
-
oErrorCodes[oErrorCodes["CONNECTION_LIMIT_REACHED"] =
|
|
19
|
-
oErrorCodes[oErrorCodes["TIMEOUT"] =
|
|
20
|
-
oErrorCodes[oErrorCodes["INTERNAL_ERROR"] =
|
|
21
|
-
oErrorCodes[oErrorCodes["SEND_FAILED"] =
|
|
22
|
-
oErrorCodes[oErrorCodes["RECEIVE_FAILED"] =
|
|
3
|
+
oErrorCodes[oErrorCodes["UNKNOWN"] = 4001] = "UNKNOWN";
|
|
4
|
+
oErrorCodes[oErrorCodes["NOT_FOUND"] = 4002] = "NOT_FOUND";
|
|
5
|
+
oErrorCodes[oErrorCodes["NOT_IMPLEMENTED"] = 4003] = "NOT_IMPLEMENTED";
|
|
6
|
+
oErrorCodes[oErrorCodes["NOT_CONFIGURED"] = 4004] = "NOT_CONFIGURED";
|
|
7
|
+
oErrorCodes[oErrorCodes["NOT_AUTHORIZED"] = 4005] = "NOT_AUTHORIZED";
|
|
8
|
+
oErrorCodes[oErrorCodes["MISSING_PARAMETERS"] = 4006] = "MISSING_PARAMETERS";
|
|
9
|
+
oErrorCodes[oErrorCodes["INVALID_PARAMETERS"] = 4007] = "INVALID_PARAMETERS";
|
|
10
|
+
oErrorCodes[oErrorCodes["INVALID_RESPONSE"] = 4008] = "INVALID_RESPONSE";
|
|
11
|
+
oErrorCodes[oErrorCodes["INVALID_REQUEST"] = 4009] = "INVALID_REQUEST";
|
|
12
|
+
oErrorCodes[oErrorCodes["INVALID_STATE"] = 4010] = "INVALID_STATE";
|
|
13
|
+
oErrorCodes[oErrorCodes["INVALID_ACTION"] = 4011] = "INVALID_ACTION";
|
|
14
|
+
oErrorCodes[oErrorCodes["INVALID_CREDENTIALS"] = 4012] = "INVALID_CREDENTIALS";
|
|
15
|
+
oErrorCodes[oErrorCodes["TRANSPORT_NOT_SUPPORTED"] = 4013] = "TRANSPORT_NOT_SUPPORTED";
|
|
16
|
+
oErrorCodes[oErrorCodes["FAILED_TO_DIAL_TARGET"] = 4014] = "FAILED_TO_DIAL_TARGET";
|
|
17
|
+
oErrorCodes[oErrorCodes["INVALID_CAPABILITY"] = 4015] = "INVALID_CAPABILITY";
|
|
18
|
+
oErrorCodes[oErrorCodes["CONNECTION_LIMIT_REACHED"] = 4016] = "CONNECTION_LIMIT_REACHED";
|
|
19
|
+
oErrorCodes[oErrorCodes["TIMEOUT"] = 4017] = "TIMEOUT";
|
|
20
|
+
oErrorCodes[oErrorCodes["INTERNAL_ERROR"] = 4018] = "INTERNAL_ERROR";
|
|
21
|
+
oErrorCodes[oErrorCodes["SEND_FAILED"] = 4019] = "SEND_FAILED";
|
|
22
|
+
oErrorCodes[oErrorCodes["RECEIVE_FAILED"] = 4020] = "RECEIVE_FAILED";
|
|
23
23
|
})(oErrorCodes || (oErrorCodes = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olane/o-core",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -63,12 +63,12 @@
|
|
|
63
63
|
"typescript": "^5.8.3"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@olane/o-protocol": "0.8.
|
|
66
|
+
"@olane/o-protocol": "0.8.3",
|
|
67
67
|
"chalk": "^5.4.1",
|
|
68
68
|
"debug": "^4.4.1",
|
|
69
69
|
"dotenv": "^16.5.0",
|
|
70
70
|
"multiformats": "^13.3.7",
|
|
71
71
|
"stream-json": "^1.9.1"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "189c0cf7b6dd9d5d961f5424af21d37978092d9e"
|
|
74
74
|
}
|