@supabase/realtime-js
Advanced tools
Comparing version 2.11.3 to 2.11.4-next.1
@@ -1,2 +0,2 @@ | ||
export declare const version = "2.11.3"; | ||
export declare const version = "2.11.4-next.1"; | ||
//# sourceMappingURL=version.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = void 0; | ||
exports.version = '2.11.3'; | ||
exports.version = '2.11.4-next.1'; | ||
//# sourceMappingURL=version.js.map |
@@ -1,2 +0,1 @@ | ||
import type { WebSocket as WSWebSocket } from 'ws'; | ||
import { CONNECTION_STATE } from './lib/constants'; | ||
@@ -47,3 +46,4 @@ import Serializer from './lib/serializer'; | ||
} | ||
export declare type WebSocketLike = WebSocket | WSWebSocket | WSWebSocketDummy; | ||
declare const WSWebSocket: any; | ||
export declare type WebSocketLike = WebSocket | typeof WSWebSocket | WSWebSocketDummy; | ||
export interface WebSocketLikeError { | ||
@@ -50,0 +50,0 @@ error: any; |
@@ -36,2 +36,5 @@ "use strict"; | ||
const NATIVE_WEBSOCKET_AVAILABLE = typeof WebSocket !== 'undefined'; | ||
const WSWebSocket = NATIVE_WEBSOCKET_AVAILABLE | ||
? WebSocket | ||
: require('ws').WebSocket; | ||
const WORKER_SCRIPT = ` | ||
@@ -173,13 +176,15 @@ addEventListener("message", (e) => { | ||
} | ||
this.conn = new WSWebSocketDummy(this.endpointURL(), undefined, { | ||
close: () => { | ||
this.conn = null; | ||
}, | ||
}); | ||
Promise.resolve().then(() => __importStar(require('ws'))).then(({ default: WS }) => { | ||
this.conn = new WS(this.endpointURL(), undefined, { | ||
headers: this.headers, | ||
else { | ||
this.conn = new WSWebSocketDummy(this.endpointURL(), undefined, { | ||
close: () => { | ||
this.conn = null; | ||
}, | ||
}); | ||
this.setupConnection(); | ||
}); | ||
Promise.resolve().then(() => __importStar(require('ws'))).then(({ default: WS }) => { | ||
this.conn = new WS(this.endpointURL(), undefined, { | ||
headers: this.headers, | ||
}); | ||
this.setupConnection(); | ||
}); | ||
} | ||
} | ||
@@ -186,0 +191,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
export declare const version = "2.11.3"; | ||
export declare const version = "2.11.4-next.1"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export const version = '2.11.3'; | ||
export const version = '2.11.4-next.1'; | ||
//# sourceMappingURL=version.js.map |
@@ -1,2 +0,1 @@ | ||
import type { WebSocket as WSWebSocket } from 'ws'; | ||
import { CONNECTION_STATE } from './lib/constants'; | ||
@@ -47,3 +46,4 @@ import Serializer from './lib/serializer'; | ||
} | ||
export declare type WebSocketLike = WebSocket | WSWebSocket | WSWebSocketDummy; | ||
declare const WSWebSocket: any; | ||
export declare type WebSocketLike = WebSocket | typeof WSWebSocket | WSWebSocketDummy; | ||
export interface WebSocketLikeError { | ||
@@ -50,0 +50,0 @@ error: any; |
@@ -8,2 +8,5 @@ import { CHANNEL_EVENTS, CONNECTION_STATE, DEFAULT_HEADERS, DEFAULT_TIMEOUT, SOCKET_STATES, TRANSPORTS, VSN, WS_CLOSE_NORMAL, } from './lib/constants'; | ||
const NATIVE_WEBSOCKET_AVAILABLE = typeof WebSocket !== 'undefined'; | ||
const WSWebSocket = NATIVE_WEBSOCKET_AVAILABLE | ||
? WebSocket | ||
: require('ws').WebSocket; | ||
const WORKER_SCRIPT = ` | ||
@@ -145,13 +148,15 @@ addEventListener("message", (e) => { | ||
} | ||
this.conn = new WSWebSocketDummy(this.endpointURL(), undefined, { | ||
close: () => { | ||
this.conn = null; | ||
}, | ||
}); | ||
import('ws').then(({ default: WS }) => { | ||
this.conn = new WS(this.endpointURL(), undefined, { | ||
headers: this.headers, | ||
else { | ||
this.conn = new WSWebSocketDummy(this.endpointURL(), undefined, { | ||
close: () => { | ||
this.conn = null; | ||
}, | ||
}); | ||
this.setupConnection(); | ||
}); | ||
import('ws').then(({ default: WS }) => { | ||
this.conn = new WS(this.endpointURL(), undefined, { | ||
headers: this.headers, | ||
}); | ||
this.setupConnection(); | ||
}); | ||
} | ||
} | ||
@@ -158,0 +163,0 @@ /** |
{ | ||
"name": "@supabase/realtime-js", | ||
"version": "2.11.3", | ||
"version": "2.11.4-next.1", | ||
"description": "Listen to realtime updates to your PostgreSQL database", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -1,1 +0,1 @@ | ||
export const version = '2.11.3' | ||
export const version = '2.11.4-next.1' |
@@ -1,3 +0,1 @@ | ||
import type { WebSocket as WSWebSocket } from 'ws' | ||
import { | ||
@@ -65,5 +63,10 @@ CHANNEL_EVENTS, | ||
} | ||
const NATIVE_WEBSOCKET_AVAILABLE = typeof WebSocket !== 'undefined' | ||
export type WebSocketLike = WebSocket | WSWebSocket | WSWebSocketDummy | ||
const WSWebSocket = NATIVE_WEBSOCKET_AVAILABLE | ||
? WebSocket | ||
: require('ws').WebSocket | ||
export type WebSocketLike = WebSocket | typeof WSWebSocket | WSWebSocketDummy | ||
export interface WebSocketLikeError { | ||
@@ -75,3 +78,2 @@ error: any | ||
const NATIVE_WEBSOCKET_AVAILABLE = typeof WebSocket !== 'undefined' | ||
const WORKER_SCRIPT = ` | ||
@@ -209,16 +211,16 @@ addEventListener("message", (e) => { | ||
return | ||
} | ||
} else { | ||
this.conn = new WSWebSocketDummy(this.endpointURL(), undefined, { | ||
close: () => { | ||
this.conn = null | ||
}, | ||
}) | ||
this.conn = new WSWebSocketDummy(this.endpointURL(), undefined, { | ||
close: () => { | ||
this.conn = null | ||
}, | ||
}) | ||
import('ws').then(({ default: WS }) => { | ||
this.conn = new WS(this.endpointURL(), undefined, { | ||
headers: this.headers, | ||
import('ws').then(({ default: WS }) => { | ||
this.conn = new WS(this.endpointURL(), undefined, { | ||
headers: this.headers, | ||
}) | ||
this.setupConnection() | ||
}) | ||
this.setupConnection() | ||
}) | ||
} | ||
} | ||
@@ -225,0 +227,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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
391014
6961
1