@particle-academy/fancy-connector-core 0.2.0 → 0.3.1
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/CHANGELOG.md +63 -0
- package/dist/index.cjs +19 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -814,7 +814,7 @@ type CallOptions = {
|
|
|
814
814
|
*/
|
|
815
815
|
credentials?: ConnectionCredentials;
|
|
816
816
|
/** Which estate to use. Resolved from the connection host when omitted. */
|
|
817
|
-
mode?:
|
|
817
|
+
mode?: RequestedMode;
|
|
818
818
|
/** Connection id, for the registered-host path. */
|
|
819
819
|
connectionId?: string | null;
|
|
820
820
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -814,7 +814,7 @@ type CallOptions = {
|
|
|
814
814
|
*/
|
|
815
815
|
credentials?: ConnectionCredentials;
|
|
816
816
|
/** Which estate to use. Resolved from the connection host when omitted. */
|
|
817
|
-
mode?:
|
|
817
|
+
mode?: RequestedMode;
|
|
818
818
|
/** Connection id, for the registered-host path. */
|
|
819
819
|
connectionId?: string | null;
|
|
820
820
|
/**
|
package/dist/index.js
CHANGED
|
@@ -50,16 +50,33 @@ function satisfiesMinimum(coreVersion, minimum) {
|
|
|
50
50
|
|
|
51
51
|
// src/delivery.ts
|
|
52
52
|
var UNREACHABLE_CODES = /* @__PURE__ */ new Set([
|
|
53
|
+
// Every code here must PROVE the request never reached an application:
|
|
54
|
+
// nothing listening, no route, or a name that never resolved. If a code can
|
|
55
|
+
// also occur after the peer received and acted on the request, it belongs in
|
|
56
|
+
// AMBIGUOUS_CODES -- `shouldRetry` retries `unreachable` without consulting
|
|
57
|
+
// `idempotent`, so a wrong entry here is a duplicate send, not a slow one.
|
|
53
58
|
"ECONNREFUSED",
|
|
54
59
|
"ENOTFOUND",
|
|
55
60
|
"EAI_AGAIN",
|
|
56
61
|
"EHOSTUNREACH",
|
|
57
62
|
"ENETUNREACH",
|
|
58
|
-
"ECONNRESET",
|
|
59
|
-
"EPIPE",
|
|
60
63
|
"ERR_SOCKET_CONNECTION_TIMEOUT"
|
|
61
64
|
]);
|
|
62
65
|
var AMBIGUOUS_CODES = /* @__PURE__ */ new Set([
|
|
66
|
+
// A peer sends RST whenever it tears the connection down -- INCLUDING after
|
|
67
|
+
// it has received and acted on the request but before the response comes
|
|
68
|
+
// back. EPIPE is the same story from our side: we wrote to a socket the peer
|
|
69
|
+
// had already closed, and whether an earlier complete request was processed
|
|
70
|
+
// first is not knowable from here. Node surfaces the safe case and the unsafe
|
|
71
|
+
// case as the same code, so the code cannot carry the claim.
|
|
72
|
+
//
|
|
73
|
+
// These two sat in UNREACHABLE_CODES until 0.3.0, which made them
|
|
74
|
+
// unconditionally retryable and produced three sends of connectors that had
|
|
75
|
+
// declared `idempotent: false`. Same defect as the 5xx / thrown-transport
|
|
76
|
+
// split this module already fixed once, and a stated exception to a rule that
|
|
77
|
+
// should have covered them.
|
|
78
|
+
"ECONNRESET",
|
|
79
|
+
"EPIPE",
|
|
63
80
|
"ETIMEDOUT",
|
|
64
81
|
"UND_ERR_HEADERS_TIMEOUT",
|
|
65
82
|
"UND_ERR_BODY_TIMEOUT",
|