@solana/rpc-subscriptions-transport-websocket
Advanced tools
Comparing version 2.0.0-experimental.d06660c to 2.0.0-experimental.d8524d8
@@ -0,1 +1,3 @@ | ||
import { SolanaError, SOLANA_ERROR__RPC_SUBSCRIPTIONS_TRANSPORT_FAILED_TO_CONNECT, SOLANA_ERROR__RPC_SUBSCRIPTIONS_TRANSPORT_CONNECTION_CLOSED, SOLANA_ERROR__RPC_SUBSCRIPTIONS_TRANSPORT_CLOSED_BEFORE_MESSAGE_BUFFERED } from '@solana/errors'; | ||
// ../build-scripts/env-shim.ts | ||
@@ -47,4 +49,5 @@ var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")(); | ||
reject( | ||
// TODO: Coded error | ||
new Error("WebSocket failed to connect", { cause: ev }) | ||
new SolanaError(SOLANA_ERROR__RPC_SUBSCRIPTIONS_TRANSPORT_FAILED_TO_CONNECT, { | ||
errorEvent: ev | ||
}) | ||
); | ||
@@ -74,4 +77,5 @@ } | ||
reject2( | ||
// TODO: Coded error | ||
new Error("WebSocket was closed before payload could be sent") | ||
new SolanaError( | ||
SOLANA_ERROR__RPC_SUBSCRIPTIONS_TRANSPORT_CLOSED_BEFORE_MESSAGE_BUFFERED | ||
) | ||
); | ||
@@ -123,3 +127,8 @@ }; | ||
} else { | ||
throw new Error("WebSocket connection closed", { cause: e2 }); | ||
throw new SolanaError( | ||
SOLANA_ERROR__RPC_SUBSCRIPTIONS_TRANSPORT_CONNECTION_CLOSED, | ||
{ | ||
cause: e2 | ||
} | ||
); | ||
} | ||
@@ -126,0 +135,0 @@ } |
@@ -0,1 +1,3 @@ | ||
import { SolanaError, SOLANA_ERROR__RPC_SUBSCRIPTIONS_TRANSPORT_FAILED_TO_CONNECT, SOLANA_ERROR__RPC_SUBSCRIPTIONS_TRANSPORT_CONNECTION_CLOSED, SOLANA_ERROR__RPC_SUBSCRIPTIONS_TRANSPORT_CLOSED_BEFORE_MESSAGE_BUFFERED } from '@solana/errors'; | ||
// ../build-scripts/env-shim.ts | ||
@@ -47,4 +49,5 @@ var __DEV__ = /* @__PURE__ */ (() => process["env"].NODE_ENV === "development")(); | ||
reject( | ||
// TODO: Coded error | ||
new Error("WebSocket failed to connect", { cause: ev }) | ||
new SolanaError(SOLANA_ERROR__RPC_SUBSCRIPTIONS_TRANSPORT_FAILED_TO_CONNECT, { | ||
errorEvent: ev | ||
}) | ||
); | ||
@@ -74,4 +77,5 @@ } | ||
reject2( | ||
// TODO: Coded error | ||
new Error("WebSocket was closed before payload could be sent") | ||
new SolanaError( | ||
SOLANA_ERROR__RPC_SUBSCRIPTIONS_TRANSPORT_CLOSED_BEFORE_MESSAGE_BUFFERED | ||
) | ||
); | ||
@@ -123,3 +127,8 @@ }; | ||
} else { | ||
throw new Error("WebSocket connection closed", { cause: e2 }); | ||
throw new SolanaError( | ||
SOLANA_ERROR__RPC_SUBSCRIPTIONS_TRANSPORT_CONNECTION_CLOSED, | ||
{ | ||
cause: e2 | ||
} | ||
); | ||
} | ||
@@ -126,0 +135,0 @@ } |
@@ -0,1 +1,2 @@ | ||
import { SolanaError, SOLANA_ERROR__RPC_SUBSCRIPTIONS_TRANSPORT_FAILED_TO_CONNECT, SOLANA_ERROR__RPC_SUBSCRIPTIONS_TRANSPORT_CONNECTION_CLOSED, SOLANA_ERROR__RPC_SUBSCRIPTIONS_TRANSPORT_CLOSED_BEFORE_MESSAGE_BUFFERED } from '@solana/errors'; | ||
import e from 'ws'; | ||
@@ -47,4 +48,5 @@ | ||
reject( | ||
// TODO: Coded error | ||
new Error("WebSocket failed to connect", { cause: ev }) | ||
new SolanaError(SOLANA_ERROR__RPC_SUBSCRIPTIONS_TRANSPORT_FAILED_TO_CONNECT, { | ||
errorEvent: ev | ||
}) | ||
); | ||
@@ -74,4 +76,5 @@ } | ||
reject2( | ||
// TODO: Coded error | ||
new Error("WebSocket was closed before payload could be sent") | ||
new SolanaError( | ||
SOLANA_ERROR__RPC_SUBSCRIPTIONS_TRANSPORT_CLOSED_BEFORE_MESSAGE_BUFFERED | ||
) | ||
); | ||
@@ -123,3 +126,8 @@ }; | ||
} else { | ||
throw new Error("WebSocket connection closed", { cause: e2 }); | ||
throw new SolanaError( | ||
SOLANA_ERROR__RPC_SUBSCRIPTIONS_TRANSPORT_CONNECTION_CLOSED, | ||
{ | ||
cause: e2 | ||
} | ||
); | ||
} | ||
@@ -126,0 +134,0 @@ } |
{ | ||
"name": "@solana/rpc-subscriptions-transport-websocket", | ||
"version": "2.0.0-experimental.d06660c", | ||
"version": "2.0.0-experimental.d8524d8", | ||
"description": "An RPC Subscriptions transport that uses WebSockets", | ||
@@ -49,3 +49,4 @@ "exports": { | ||
"dependencies": { | ||
"@solana/rpc-subscriptions-spec": "2.0.0-experimental.d06660c" | ||
"@solana/rpc-subscriptions-spec": "2.0.0-experimental.d8524d8", | ||
"@solana/errors": "2.0.0-experimental.d8524d8" | ||
}, | ||
@@ -52,0 +53,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
119781
1112
3
+ Added@solana/errors@2.0.0-experimental.d8524d8(transitive)
+ Added@solana/rpc-spec-types@2.0.0-experimental.d8524d8(transitive)
+ Added@solana/rpc-subscriptions-spec@2.0.0-experimental.d8524d8(transitive)
+ Addedchalk@5.4.1(transitive)
+ Addedcommander@12.1.0(transitive)
- Removed@solana/rpc-spec-types@2.0.0-experimental.d06660c(transitive)
- Removed@solana/rpc-subscriptions-spec@2.0.0-experimental.d06660c(transitive)
Updated@solana/rpc-subscriptions-spec@2.0.0-experimental.d8524d8