New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@supabase/realtime-js

Package Overview
Dependencies
Maintainers
5
Versions
124
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@supabase/realtime-js - npm Package Compare versions

Comparing version 1.8.0-next.5 to 1.8.0-next.6

6

dist/main/lib/push.d.ts

@@ -6,3 +6,3 @@ import RealtimeChannel from '../RealtimeChannel';

payload: {
[key: string]: unknown;
[key: string]: any;
};

@@ -31,3 +31,3 @@ timeout: number;

constructor(channel: RealtimeChannel, event: string, payload?: {
[key: string]: unknown;
[key: string]: any;
}, timeout?: number);

@@ -37,3 +37,3 @@ resend(timeout: number): void;

updatePayload(payload: {
[key: string]: unknown;
[key: string]: any;
}): void;

@@ -40,0 +40,0 @@ receive(status: string, callback: Function): this;

@@ -1,2 +0,2 @@

export declare const version = "1.8.0-next.5";
export declare const version = "1.8.0-next.6";
//# sourceMappingURL=version.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = '1.8.0-next.5';
exports.version = '1.8.0-next.6';
//# sourceMappingURL=version.js.map

@@ -1,2 +0,2 @@

import { CHANNEL_EVENTS, CHANNEL_STATES } from './lib/constants';
import { CHANNEL_STATES } from './lib/constants';
import Push from './lib/push';

@@ -9,3 +9,3 @@ import RealtimeClient from './RealtimeClient';

params: {
[key: string]: unknown;
[key: string]: any;
};

@@ -22,3 +22,3 @@ socket: RealtimeClient;

constructor(topic: string, params: {
[key: string]: unknown;
[key: string]: any;
}, socket: RealtimeClient);

@@ -45,5 +45,7 @@ rejoinUntilConnected(): void;

canPush(): boolean;
push(event: CHANNEL_EVENTS, payload: any, timeout?: number): Push;
push(event: string, payload: {
[key: string]: any;
}, timeout?: number): Push;
updateJoinPayload(payload: {
[key: string]: unknown;
[key: string]: any;
}): void;

@@ -71,8 +73,2 @@ /**

trigger(type: string, payload?: any, ref?: string): void;
send(payload: {
type: string;
[key: string]: any;
}, opts?: {
[key: string]: any;
}): Promise<'ok' | 'timeout'>;
replyEventName(ref: string): string;

@@ -79,0 +75,0 @@ isClosed(): boolean;

@@ -222,11 +222,2 @@ "use strict";

}
send(payload, opts = {}) {
var _a;
const push = this.push(payload.type, payload, (_a = opts.timeout) !== null && _a !== void 0 ? _a : this.timeout);
return new Promise((resolve) => {
push
.receive('ok', () => resolve('ok'))
.receive('timeout', () => resolve('timeout'));
});
}
replyEventName(ref) {

@@ -233,0 +224,0 @@ return `chan_reply_${ref}`;

@@ -6,3 +6,3 @@ import RealtimeChannel from '../RealtimeChannel';

payload: {
[key: string]: unknown;
[key: string]: any;
};

@@ -31,3 +31,3 @@ timeout: number;

constructor(channel: RealtimeChannel, event: string, payload?: {
[key: string]: unknown;
[key: string]: any;
}, timeout?: number);

@@ -37,3 +37,3 @@ resend(timeout: number): void;

updatePayload(payload: {
[key: string]: unknown;
[key: string]: any;
}): void;

@@ -40,0 +40,0 @@ receive(status: string, callback: Function): this;

@@ -1,2 +0,2 @@

export declare const version = "1.8.0-next.5";
export declare const version = "1.8.0-next.6";
//# sourceMappingURL=version.d.ts.map

@@ -1,2 +0,2 @@

export const version = '1.8.0-next.5';
export const version = '1.8.0-next.6';
//# sourceMappingURL=version.js.map

@@ -1,2 +0,2 @@

import { CHANNEL_EVENTS, CHANNEL_STATES } from './lib/constants';
import { CHANNEL_STATES } from './lib/constants';
import Push from './lib/push';

@@ -9,3 +9,3 @@ import RealtimeClient from './RealtimeClient';

params: {
[key: string]: unknown;
[key: string]: any;
};

@@ -22,3 +22,3 @@ socket: RealtimeClient;

constructor(topic: string, params: {
[key: string]: unknown;
[key: string]: any;
}, socket: RealtimeClient);

@@ -45,5 +45,7 @@ rejoinUntilConnected(): void;

canPush(): boolean;
push(event: CHANNEL_EVENTS, payload: any, timeout?: number): Push;
push(event: string, payload: {
[key: string]: any;
}, timeout?: number): Push;
updateJoinPayload(payload: {
[key: string]: unknown;
[key: string]: any;
}): void;

@@ -71,8 +73,2 @@ /**

trigger(type: string, payload?: any, ref?: string): void;
send(payload: {
type: string;
[key: string]: any;
}, opts?: {
[key: string]: any;
}): Promise<'ok' | 'timeout'>;
replyEventName(ref: string): string;

@@ -79,0 +75,0 @@ isClosed(): boolean;

@@ -217,11 +217,2 @@ import { CHANNEL_EVENTS, CHANNEL_STATES } from './lib/constants';

}
send(payload, opts = {}) {
var _a;
const push = this.push(payload.type, payload, (_a = opts.timeout) !== null && _a !== void 0 ? _a : this.timeout);
return new Promise((resolve) => {
push
.receive('ok', () => resolve('ok'))
.receive('timeout', () => resolve('timeout'));
});
}
replyEventName(ref) {

@@ -228,0 +219,0 @@ return `chan_reply_${ref}`;

{
"name": "@supabase/realtime-js",
"version": "1.8.0-next.5",
"version": "1.8.0-next.6",
"description": "Listen to realtime updates to your PostgreSQL database",

@@ -5,0 +5,0 @@ "keywords": [

@@ -29,3 +29,3 @@ import { DEFAULT_TIMEOUT } from '../lib/constants'

public event: string,
public payload: { [key: string]: unknown } = {},
public payload: { [key: string]: any } = {},
public timeout: number = DEFAULT_TIMEOUT

@@ -58,3 +58,3 @@ ) {}

updatePayload(payload: { [key: string]: unknown }): void {
updatePayload(payload: { [key: string]: any }): void {
this.payload = { ...this.payload, ...payload }

@@ -61,0 +61,0 @@ }

@@ -34,3 +34,3 @@ // This file draws heavily from https://github.com/phoenixframework/phoenix/commit/cf098e9cf7a44ee6479d31d911a97d3c7430c6fe

event: string
payload: object
payload: { [key: string]: any }
} {

@@ -37,0 +37,0 @@ const topicSize = view.getUint8(1)

@@ -1,1 +0,1 @@

export const version = '1.8.0-next.5'
export const version = '1.8.0-next.6'

@@ -19,3 +19,3 @@ import { CHANNEL_EVENTS, CHANNEL_STATES } from './lib/constants'

public topic: string,
public params: { [key: string]: unknown } = {},
public params: { [key: string]: any } = {},
public socket: RealtimeClient

@@ -167,3 +167,3 @@ ) {

push(event: CHANNEL_EVENTS, payload: any, timeout = this.timeout) {
push(event: string, payload: { [key: string]: any }, timeout = this.timeout) {
if (!this.joinedOnce) {

@@ -183,3 +183,3 @@ throw `tried to push '${event}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`

updateJoinPayload(payload: { [key: string]: unknown }): void {
updateJoinPayload(payload: { [key: string]: any }): void {
this.joinPush.updatePayload(payload)

@@ -265,19 +265,2 @@ }

send(
payload: { type: string; [key: string]: any },
opts: { [key: string]: any } = {}
): Promise<'ok' | 'timeout'> {
const push = this.push(
payload.type as any,
payload,
opts.timeout ?? this.timeout
)
return new Promise((resolve) => {
push
.receive('ok', () => resolve('ok'))
.receive('timeout', () => resolve('timeout'))
})
}
replyEventName(ref: string): string {

@@ -284,0 +267,0 @@ return `chan_reply_${ref}`

@@ -303,3 +303,3 @@ /*

private static cloneDeep(obj: object) {
private static cloneDeep(obj: { [key: string]: any }) {
return JSON.parse(JSON.stringify(obj))

@@ -306,0 +306,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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc