graphql-ws
Advanced tools
Comparing version 6.0.0-alpha-eba47dc795c23daf04f97505477a610b51500db3 to 6.0.0-alpha-fc2b732baaf8b5a731a9c77ab927b2bc30c759cb
@@ -1,3 +0,3 @@ | ||
import { G as GRAPHQL_TRANSPORT_WS_PROTOCOL, s as stringifyMessage, M as MessageType, C as CloseCode, l as limitCloseReason, p as parseMessage, a as isObject } from './common-C3FuvWlV.js'; | ||
export { D as DEPRECATED_GRAPHQL_WS_PROTOCOL, i as isMessage, v as validateMessage } from './common-C3FuvWlV.js'; | ||
import { G as GRAPHQL_TRANSPORT_WS_PROTOCOL, s as stringifyMessage, M as MessageType, C as CloseCode, l as limitCloseReason, p as parseMessage, i as isObject } from './common-BZ6jfDSg.js'; | ||
export { D as DEPRECATED_GRAPHQL_WS_PROTOCOL, v as validateMessage } from './common-BZ6jfDSg.js'; | ||
@@ -29,3 +29,2 @@ function createClient(options) { | ||
shouldRetry = isLikeCloseEvent, | ||
isFatalConnectionProblem, | ||
on, | ||
@@ -304,3 +303,2 @@ webSocketImpl, | ||
if (!shouldRetry(errOrCloseEvent)) throw errOrCloseEvent; | ||
if (isFatalConnectionProblem?.(errOrCloseEvent)) throw errOrCloseEvent; | ||
return retrying = true; | ||
@@ -307,0 +305,0 @@ } |
import { ExecutionResult } from 'graphql'; | ||
import { C as ConnectionAckMessage, P as PingMessage, a as PongMessage, M as Message, b as ConnectionInitMessage, S as SubscribePayload, I as ID, J as JSONMessageReviver, c as JSONMessageReplacer, D as Disposable, d as Sink } from './server-CgaLfd0V.js'; | ||
export { f as CloseCode, k as CompleteMessage, q as Context, e as DEPRECATED_GRAPHQL_WS_PROTOCOL, j as ErrorMessage, i as ExecutionPatchResult, E as ExecutionResult, G as GRAPHQL_TRANSPORT_WS_PROTOCOL, m as GraphQLExecutionContextValue, g as MessageType, N as NextMessage, O as OperationResult, o as Server, n as ServerOptions, h as SubscribeMessage, W as WebSocket, t as handleProtocols, l as isMessage, r as makeServer, p as parseMessage, s as stringifyMessage, v as validateMessage } from './server-CgaLfd0V.js'; | ||
import { C as ConnectionAckMessage, P as PingMessage, a as PongMessage, M as Message, b as ConnectionInitMessage, S as SubscribePayload, I as ID, J as JSONMessageReviver, c as JSONMessageReplacer, D as Disposable, d as Sink } from './server-BdSfAnnR.js'; | ||
export { f as CloseCode, k as CompleteMessage, o as Context, e as DEPRECATED_GRAPHQL_WS_PROTOCOL, j as ErrorMessage, i as ExecutionPatchResult, E as ExecutionResult, G as GRAPHQL_TRANSPORT_WS_PROTOCOL, l as GraphQLExecutionContextValue, g as MessageType, N as NextMessage, O as OperationResult, n as Server, m as ServerOptions, h as SubscribeMessage, W as WebSocket, r as handleProtocols, q as makeServer, p as parseMessage, s as stringifyMessage, v as validateMessage } from './server-BdSfAnnR.js'; | ||
@@ -300,20 +300,2 @@ /** | ||
/** | ||
* @deprecated Use `shouldRetry` instead. | ||
* | ||
* Check if the close event or connection error is fatal. If you return `true`, | ||
* the client will fail immediately without additional retries; however, if you | ||
* return `false`, the client will keep retrying until the `retryAttempts` have | ||
* been exceeded. | ||
* | ||
* The argument is either a WebSocket `CloseEvent` or an error thrown during | ||
* the connection phase. | ||
* | ||
* Beware, the library classifies a few close events as fatal regardless of | ||
* what is returned. They are listed in the documentation of the `retryAttempts` | ||
* option. | ||
* | ||
* @default 'Any non-`CloseEvent`' | ||
*/ | ||
isFatalConnectionProblem?: (errOrCloseEvent: unknown) => boolean; | ||
/** | ||
* Register listeners before initialising the client. This way | ||
@@ -320,0 +302,0 @@ * you can ensure to catch all client relevant emitted events. |
export { TerminatedCloseEvent, createClient } from './client.js'; | ||
export { h as handleProtocols, m as makeServer } from './server-C2VkalQ-.js'; | ||
export { C as CloseCode, D as DEPRECATED_GRAPHQL_WS_PROTOCOL, G as GRAPHQL_TRANSPORT_WS_PROTOCOL, M as MessageType, i as isMessage, p as parseMessage, s as stringifyMessage, v as validateMessage } from './common-C3FuvWlV.js'; | ||
export { h as handleProtocols, m as makeServer } from './server-Do6Hkqsr.js'; | ||
export { C as CloseCode, D as DEPRECATED_GRAPHQL_WS_PROTOCOL, G as GRAPHQL_TRANSPORT_WS_PROTOCOL, M as MessageType, p as parseMessage, s as stringifyMessage, v as validateMessage } from './common-BZ6jfDSg.js'; | ||
import 'graphql'; |
import { WebSocket, WebsocketHandler } from '@fastify/websocket'; | ||
import { FastifyRequest } from 'fastify'; | ||
import { b as ConnectionInitMessage, n as ServerOptions } from '../../server-CgaLfd0V.js'; | ||
import { b as ConnectionInitMessage, m as ServerOptions } from '../../server-BdSfAnnR.js'; | ||
import 'graphql'; | ||
@@ -5,0 +5,0 @@ |
@@ -1,3 +0,3 @@ | ||
import { C as CloseCode, l as limitCloseReason, D as DEPRECATED_GRAPHQL_WS_PROTOCOL } from '../../common-C3FuvWlV.js'; | ||
import { h as handleProtocols, m as makeServer } from '../../server-C2VkalQ-.js'; | ||
import { C as CloseCode, l as limitCloseReason, D as DEPRECATED_GRAPHQL_WS_PROTOCOL } from '../../common-BZ6jfDSg.js'; | ||
import { h as handleProtocols, m as makeServer } from '../../server-Do6Hkqsr.js'; | ||
import 'graphql'; | ||
@@ -4,0 +4,0 @@ |
import { ServerWebSocket, WebSocketHandler } from 'bun'; | ||
import { b as ConnectionInitMessage, n as ServerOptions } from '../server-CgaLfd0V.js'; | ||
export { t as handleProtocols } from '../server-CgaLfd0V.js'; | ||
import { b as ConnectionInitMessage, m as ServerOptions } from '../server-BdSfAnnR.js'; | ||
export { r as handleProtocols } from '../server-BdSfAnnR.js'; | ||
import 'graphql'; | ||
@@ -5,0 +5,0 @@ |
@@ -1,4 +0,4 @@ | ||
import { G as GRAPHQL_TRANSPORT_WS_PROTOCOL } from '../common-C3FuvWlV.js'; | ||
import { m as makeServer } from '../server-C2VkalQ-.js'; | ||
export { h as handleProtocols } from '../server-C2VkalQ-.js'; | ||
import { G as GRAPHQL_TRANSPORT_WS_PROTOCOL } from '../common-BZ6jfDSg.js'; | ||
import { m as makeServer } from '../server-Do6Hkqsr.js'; | ||
export { h as handleProtocols } from '../server-Do6Hkqsr.js'; | ||
import 'graphql'; | ||
@@ -5,0 +5,0 @@ |
@@ -1,3 +0,3 @@ | ||
import { b as ConnectionInitMessage, n as ServerOptions } from '../server-CgaLfd0V.js'; | ||
export { G as GRAPHQL_TRANSPORT_WS_PROTOCOL } from '../server-CgaLfd0V.js'; | ||
import { b as ConnectionInitMessage, m as ServerOptions } from '../server-BdSfAnnR.js'; | ||
export { G as GRAPHQL_TRANSPORT_WS_PROTOCOL } from '../server-BdSfAnnR.js'; | ||
import 'graphql'; | ||
@@ -4,0 +4,0 @@ |
@@ -1,4 +0,4 @@ | ||
import { C as CloseCode, D as DEPRECATED_GRAPHQL_WS_PROTOCOL } from '../common-C3FuvWlV.js'; | ||
export { G as GRAPHQL_TRANSPORT_WS_PROTOCOL } from '../common-C3FuvWlV.js'; | ||
import { m as makeServer } from '../server-C2VkalQ-.js'; | ||
import { C as CloseCode, D as DEPRECATED_GRAPHQL_WS_PROTOCOL } from '../common-BZ6jfDSg.js'; | ||
export { G as GRAPHQL_TRANSPORT_WS_PROTOCOL } from '../common-BZ6jfDSg.js'; | ||
import { m as makeServer } from '../server-Do6Hkqsr.js'; | ||
import 'graphql'; | ||
@@ -5,0 +5,0 @@ |
import http__default from 'http'; | ||
import * as uWS from 'uWebSockets.js'; | ||
import { b as ConnectionInitMessage, n as ServerOptions } from '../server-CgaLfd0V.js'; | ||
import { b as ConnectionInitMessage, m as ServerOptions } from '../server-BdSfAnnR.js'; | ||
import 'graphql'; | ||
@@ -5,0 +5,0 @@ |
@@ -1,3 +0,3 @@ | ||
import { C as CloseCode, l as limitCloseReason } from '../common-C3FuvWlV.js'; | ||
import { h as handleProtocols, m as makeServer } from '../server-C2VkalQ-.js'; | ||
import { C as CloseCode, l as limitCloseReason } from '../common-BZ6jfDSg.js'; | ||
import { h as handleProtocols, m as makeServer } from '../server-Do6Hkqsr.js'; | ||
import 'graphql'; | ||
@@ -4,0 +4,0 @@ |
import * as http from 'http'; | ||
import WebSocket from 'ws'; | ||
export { default as WebSocket } from 'ws'; | ||
import { b as ConnectionInitMessage, n as ServerOptions, D as Disposable } from '../server-CgaLfd0V.js'; | ||
import { b as ConnectionInitMessage, m as ServerOptions, D as Disposable } from '../server-BdSfAnnR.js'; | ||
import 'graphql'; | ||
@@ -6,0 +6,0 @@ |
@@ -1,3 +0,3 @@ | ||
import { C as CloseCode, l as limitCloseReason, D as DEPRECATED_GRAPHQL_WS_PROTOCOL } from '../common-C3FuvWlV.js'; | ||
import { h as handleProtocols, m as makeServer } from '../server-C2VkalQ-.js'; | ||
import { C as CloseCode, l as limitCloseReason, D as DEPRECATED_GRAPHQL_WS_PROTOCOL } from '../common-BZ6jfDSg.js'; | ||
import { h as handleProtocols, m as makeServer } from '../server-Do6Hkqsr.js'; | ||
import 'graphql'; | ||
@@ -4,0 +4,0 @@ |
{ | ||
"name": "graphql-ws", | ||
"version": "6.0.0-alpha-eba47dc795c23daf04f97505477a610b51500db3", | ||
"version": "6.0.0-alpha-fc2b732baaf8b5a731a9c77ab927b2bc30c759cb", | ||
"description": "Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant server and client", | ||
@@ -80,16 +80,13 @@ "type": "module", | ||
"scripts": { | ||
"build": "pkgroll --clean-dist", | ||
"build:umd": "rollup --bundleConfigAsCjs --config rollup.config.ts --configPlugin typescript && gzip umd/graphql-ws.min.js -c > umd/graphql-ws.min.js.gz", | ||
"prepack": "yarn build", | ||
"changeset": "changeset", | ||
"check:format": "prettier --check .", | ||
"check:lint": "eslint 'src'", | ||
"check:type": "tsc --noEmit", | ||
"format": "yarn check:format --write", | ||
"gendocs": "typedoc --options typedoc.js src/ && node scripts/post-gendocs.js", | ||
"postbuild": "node scripts/fix-declaration-directives.js", | ||
"test": "vitest" | ||
"check:types": "tsc --noEmit", | ||
"test": "vitest", | ||
"build": "pkgroll --clean-dist && rollup -c rollup.config.js && gzip umd/graphql-ws.min.js -c > umd/graphql-ws.min.js.gz", | ||
"prepack": "yarn build", | ||
"gendocs": "typedoc --options typedoc.js src/ && node scripts/post-gendocs.js" | ||
}, | ||
"peerDependencies": { | ||
"graphql": "^15.9.0 || ^16.9.0" | ||
"graphql": "^15.10.1 || ^16.10.0" | ||
}, | ||
@@ -102,15 +99,9 @@ "devDependencies": { | ||
"@rollup/plugin-terser": "^0.4.4", | ||
"@rollup/plugin-typescript": "^11.1.6", | ||
"@tsconfig/node20": "^20.1.4", | ||
"@tsconfig/strictest": "^2.0.5", | ||
"@types/eslint": "^8.56.10", | ||
"@types/glob": "^8.1.0", | ||
"@types/ws": "^8.5.10", | ||
"@typescript-eslint/eslint-plugin": "^7.7.0", | ||
"@typescript-eslint/parser": "^7.7.0", | ||
"@types/ws": "^8.5.13", | ||
"bun-types": "^1.1.4", | ||
"eslint": "^8.57.0", | ||
"fastify": "^4.26.2", | ||
"fastify": "^5.2.1", | ||
"glob": "^10.3.12", | ||
"graphql": "^16.9.0", | ||
"graphql": "^16.10.0", | ||
"jsdom": "^25.0.1", | ||
@@ -120,14 +111,10 @@ "pkgroll": "patch:pkgroll@npm%3A2.6.1#~/.yarn/patches/pkgroll-npm-2.6.1-193e78e84e.patch", | ||
"prettier-plugin-sh": "^0.14.0", | ||
"replacestream": "^4.0.3", | ||
"rollup": "^4.14.3", | ||
"subscriptions-transport-ws": "^0.11.0", | ||
"tslib": "^2.6.2", | ||
"typedoc": "^0.25.13", | ||
"typedoc-plugin-markdown": "^3.17.1", | ||
"typescript": "^5.4.5", | ||
"uWebSockets.js": "uNetworking/uWebSockets.js#v20.43.0", | ||
"rollup": "^4.30.1", | ||
"typedoc": "^0.27.6", | ||
"typedoc-plugin-markdown": "^4.4.1", | ||
"typescript": "^5.7.3", | ||
"uWebSockets.js": "uNetworking/uWebSockets.js#v20.51.0", | ||
"vitest": "^2.1.8", | ||
"ws": "8.12.0", | ||
"ws7": "npm:ws@^7.5.9" | ||
"ws": "^8.18.0" | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
208373
23
32
4868
0