@supabase/realtime-js
Advanced tools
Comparing version 2.10.0-next.2 to 2.10.0-next.3
@@ -1,2 +0,2 @@ | ||
export declare const version = "2.10.0-next.2"; | ||
export declare const version = "2.10.0-next.3"; | ||
//# sourceMappingURL=version.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = void 0; | ||
exports.version = '2.10.0-next.2'; | ||
exports.version = '2.10.0-next.3'; | ||
//# sourceMappingURL=version.js.map |
@@ -221,3 +221,3 @@ "use strict"; | ||
async send(args, opts = {}) { | ||
var _a, _b; | ||
var _a; | ||
if (!this._canPush() && args.type === 'broadcast') { | ||
@@ -228,3 +228,6 @@ const { event, payload: endpoint_payload } = args; | ||
headers: { | ||
apikey: (_a = this.socket.apiKey) !== null && _a !== void 0 ? _a : '', | ||
Authorization: this.socket.accessToken | ||
? `Bearer ${this.socket.accessToken}` | ||
: '', | ||
apikey: this.socket.apiKey ? this.socket.apiKey : '', | ||
'Content-Type': 'application/json', | ||
@@ -239,3 +242,3 @@ }, | ||
try { | ||
const response = await this._fetchWithTimeout(this.broadcastEndpointURL, options, (_b = opts.timeout) !== null && _b !== void 0 ? _b : this.timeout); | ||
const response = await this._fetchWithTimeout(this.broadcastEndpointURL, options, (_a = opts.timeout) !== null && _a !== void 0 ? _a : this.timeout); | ||
if (response.ok) { | ||
@@ -242,0 +245,0 @@ return 'ok'; |
@@ -292,3 +292,4 @@ "use strict"; | ||
'Content-Type': 'application/json', | ||
Authorization: `Bearer ${this.accessToken}`, | ||
Authorization: this.accessToken ? `Bearer ${this.accessToken}` : '', | ||
apikey: this.apiKey ? this.apiKey : '', | ||
}, | ||
@@ -314,3 +315,4 @@ body: JSON.stringify({ name }), | ||
'Content-Type': 'application/json', | ||
Authorization: `Bearer ${this.accessToken}`, | ||
Authorization: this.accessToken ? `Bearer ${this.accessToken}` : '', | ||
apikey: this.apiKey ? this.apiKey : '', | ||
}, | ||
@@ -337,3 +339,4 @@ body: JSON.stringify({ name }), | ||
'Content-Type': 'application/json', | ||
Authorization: `Bearer ${this.accessToken}`, | ||
Authorization: this.accessToken ? `Bearer ${this.accessToken}` : '', | ||
apikey: this.apiKey ? this.apiKey : '', | ||
}, | ||
@@ -356,3 +359,4 @@ body: JSON.stringify({ name: new_name }), | ||
headers: { | ||
Authorization: `Bearer ${this.accessToken}`, | ||
Authorization: this.accessToken ? `Bearer ${this.accessToken}` : '', | ||
apikey: this.apiKey ? this.apiKey : '', | ||
}, | ||
@@ -359,0 +363,0 @@ }).then((response) => { |
@@ -1,2 +0,2 @@ | ||
export declare const version = "2.10.0-next.2"; | ||
export declare const version = "2.10.0-next.3"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -1,2 +0,2 @@ | ||
export const version = '2.10.0-next.2'; | ||
export const version = '2.10.0-next.3'; | ||
//# sourceMappingURL=version.js.map |
@@ -192,3 +192,3 @@ import { CHANNEL_EVENTS, CHANNEL_STATES } from './lib/constants'; | ||
async send(args, opts = {}) { | ||
var _a, _b; | ||
var _a; | ||
if (!this._canPush() && args.type === 'broadcast') { | ||
@@ -199,3 +199,6 @@ const { event, payload: endpoint_payload } = args; | ||
headers: { | ||
apikey: (_a = this.socket.apiKey) !== null && _a !== void 0 ? _a : '', | ||
Authorization: this.socket.accessToken | ||
? `Bearer ${this.socket.accessToken}` | ||
: '', | ||
apikey: this.socket.apiKey ? this.socket.apiKey : '', | ||
'Content-Type': 'application/json', | ||
@@ -210,3 +213,3 @@ }, | ||
try { | ||
const response = await this._fetchWithTimeout(this.broadcastEndpointURL, options, (_b = opts.timeout) !== null && _b !== void 0 ? _b : this.timeout); | ||
const response = await this._fetchWithTimeout(this.broadcastEndpointURL, options, (_a = opts.timeout) !== null && _a !== void 0 ? _a : this.timeout); | ||
if (response.ok) { | ||
@@ -213,0 +216,0 @@ return 'ok'; |
@@ -264,3 +264,4 @@ import { CHANNEL_EVENTS, CONNECTION_STATE, DEFAULT_HEADERS, DEFAULT_TIMEOUT, SOCKET_STATES, TRANSPORTS, VSN, WS_CLOSE_NORMAL, } from './lib/constants'; | ||
'Content-Type': 'application/json', | ||
Authorization: `Bearer ${this.accessToken}`, | ||
Authorization: this.accessToken ? `Bearer ${this.accessToken}` : '', | ||
apikey: this.apiKey ? this.apiKey : '', | ||
}, | ||
@@ -286,3 +287,4 @@ body: JSON.stringify({ name }), | ||
'Content-Type': 'application/json', | ||
Authorization: `Bearer ${this.accessToken}`, | ||
Authorization: this.accessToken ? `Bearer ${this.accessToken}` : '', | ||
apikey: this.apiKey ? this.apiKey : '', | ||
}, | ||
@@ -309,3 +311,4 @@ body: JSON.stringify({ name }), | ||
'Content-Type': 'application/json', | ||
Authorization: `Bearer ${this.accessToken}`, | ||
Authorization: this.accessToken ? `Bearer ${this.accessToken}` : '', | ||
apikey: this.apiKey ? this.apiKey : '', | ||
}, | ||
@@ -328,3 +331,4 @@ body: JSON.stringify({ name: new_name }), | ||
headers: { | ||
Authorization: `Bearer ${this.accessToken}`, | ||
Authorization: this.accessToken ? `Bearer ${this.accessToken}` : '', | ||
apikey: this.apiKey ? this.apiKey : '', | ||
}, | ||
@@ -331,0 +335,0 @@ }).then((response) => { |
{ | ||
"name": "@supabase/realtime-js", | ||
"version": "2.10.0-next.2", | ||
"version": "2.10.0-next.3", | ||
"description": "Listen to realtime updates to your PostgreSQL database", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -1,1 +0,1 @@ | ||
export const version = '2.10.0-next.2' | ||
export const version = '2.10.0-next.3' |
@@ -440,3 +440,6 @@ import { CHANNEL_EVENTS, CHANNEL_STATES } from './lib/constants' | ||
headers: { | ||
apikey: this.socket.apiKey ?? '', | ||
Authorization: this.socket.accessToken | ||
? `Bearer ${this.socket.accessToken}` | ||
: '', | ||
apikey: this.socket.apiKey ? this.socket.apiKey : '', | ||
'Content-Type': 'application/json', | ||
@@ -443,0 +446,0 @@ }, |
@@ -335,3 +335,4 @@ import type { WebSocket as WSWebSocket } from 'ws' | ||
'Content-Type': 'application/json', | ||
Authorization: `Bearer ${this.accessToken}`, | ||
Authorization: this.accessToken ? `Bearer ${this.accessToken}` : '', | ||
apikey: this.apiKey ? this.apiKey : '', | ||
}, | ||
@@ -358,3 +359,4 @@ body: JSON.stringify({ name }), | ||
'Content-Type': 'application/json', | ||
Authorization: `Bearer ${this.accessToken}`, | ||
Authorization: this.accessToken ? `Bearer ${this.accessToken}` : '', | ||
apikey: this.apiKey ? this.apiKey : '', | ||
}, | ||
@@ -382,3 +384,4 @@ body: JSON.stringify({ name }), | ||
'Content-Type': 'application/json', | ||
Authorization: `Bearer ${this.accessToken}`, | ||
Authorization: this.accessToken ? `Bearer ${this.accessToken}` : '', | ||
apikey: this.apiKey ? this.apiKey : '', | ||
}, | ||
@@ -402,3 +405,4 @@ body: JSON.stringify({ name: new_name }), | ||
headers: { | ||
Authorization: `Bearer ${this.accessToken}`, | ||
Authorization: this.accessToken ? `Bearer ${this.accessToken}` : '', | ||
apikey: this.apiKey ? this.apiKey : '', | ||
}, | ||
@@ -405,0 +409,0 @@ }).then((response) => { |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
382862
6897