Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@based/client

Package Overview
Dependencies
Maintainers
7
Versions
139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@based/client - npm Package Compare versions

Comparing version 6.3.0 to 6.3.1

14

dist/src/index_original.d.ts

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

import { BasedOpts, AuthState, FunctionResponseListeners, Settings, FunctionQueue, ObserveState, ObserveQueue, Cache, GetObserveQueue, GetState, ChannelQueue, ChannelPublishQueue, ChannelState, CallOptions, QueryOptions } from "./types/index.js";
import { Connection } from "./websocket/types.js";
import Emitter from "./Emitter.js";
import { BasedQuery } from "./query/index.js";
import { StreamFunctionOpts, StreamQueue, StreamFunctionResponseListeners } from "./stream/types.js";
import { BasedChannel } from "./channel/index.js";
export * from "./authState/parseAuthState.js";
import { BasedOpts, AuthState, FunctionResponseListeners, Settings, FunctionQueue, ObserveState, ObserveQueue, Cache, GetObserveQueue, GetState, ChannelQueue, ChannelPublishQueue, ChannelState, CallOptions, QueryOptions } from './types/index.js';
import { Connection } from './websocket/types.js';
import Emitter from './Emitter.js';
import { BasedQuery } from './query/index.js';
import { StreamFunctionOpts, StreamQueue, StreamFunctionResponseListeners } from './stream/types.js';
import { BasedChannel } from './channel/index.js';
export * from './authState/parseAuthState.js';
export { AuthState, BasedQuery };

@@ -9,0 +9,0 @@ export declare class BasedClient extends Emitter {

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

import { BasedOpts, AuthState, FunctionResponseListeners, Settings, FunctionQueue, ObserveState, ObserveQueue, Cache, GetObserveQueue, GetState, ChannelQueue, ChannelPublishQueue, ChannelState, CallOptions, QueryOptions } from "./types/index.js";
import { Connection } from "./websocket/types.js";
import Emitter from "./Emitter.js";
import { BasedQuery } from "./query/index.js";
import { StreamFunctionOpts, StreamQueue, StreamFunctionResponseListeners } from "./stream/types.js";
import { BasedChannel } from "./channel/index.js";
export * from "./authState/parseAuthState.js";
import { BasedOpts, AuthState, FunctionResponseListeners, Settings, FunctionQueue, ObserveState, ObserveQueue, Cache, GetObserveQueue, GetState, ChannelQueue, ChannelPublishQueue, ChannelState, CallOptions, QueryOptions } from './types/index.js';
import { Connection } from './websocket/types.js';
import Emitter from './Emitter.js';
import { BasedQuery } from './query/index.js';
import { StreamFunctionOpts, StreamQueue, StreamFunctionResponseListeners } from './stream/types.js';
import { BasedChannel } from './channel/index.js';
export * from './authState/parseAuthState.js';
export { AuthState, BasedQuery };

@@ -9,0 +9,0 @@ export declare class BasedClient extends Emitter {

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

import connectWebsocket from "./websocket/index.js";
import Emitter from "./Emitter.js";
import { addChannelPublishIdentifier, addChannelSubscribeToQueue, addObsToQueue, addToFunctionQueue, drainQueue, sendAuth, } from "./outgoing/index.js";
import { incoming } from "./incoming/index.js";
import { BasedQuery } from "./query/index.js";
import startStream from "./stream/index.js";
import { initStorage, clearStorage, updateStorage, } from "./persistentStorage/index.js";
import { BasedChannel } from "./channel/index.js";
import { hashObjectIgnoreKeyOrder } from "@saulx/hash";
import { deepEqual } from "@saulx/utils";
import parseOpts from "@based/opts";
import { freeCacheMemory } from "./cache.js";
export * from "./authState/parseAuthState.js";
import connectWebsocket from './websocket/index.js';
import Emitter from './Emitter.js';
import { addChannelPublishIdentifier, addChannelSubscribeToQueue, addObsToQueue, addToFunctionQueue, drainQueue, sendAuth, } from './outgoing/index.js';
import { incoming } from './incoming/index.js';
import { BasedQuery } from './query/index.js';
import startStream from './stream/index.js';
import { initStorage, clearStorage, updateStorage, } from './persistentStorage/index.js';
import { BasedChannel } from './channel/index.js';
import { hashObjectIgnoreKeyOrder } from '@saulx/hash';
import { deepEqual } from '@saulx/utils';
import parseOpts from '@based/opts';
import { freeCacheMemory } from './cache.js';
export * from './authState/parseAuthState.js';
export { BasedQuery };
// global polyfill
if (typeof window !== "undefined" && typeof global === "undefined") {
if (typeof window !== 'undefined' && typeof global === 'undefined') {
window.global = window;

@@ -26,3 +26,2 @@ }

if (settings?.maxCacheSize) {
console.warn("MaxCacheSize setting not implemented yet...");
this.maxCacheSize = settings.maxCacheSize;

@@ -108,11 +107,11 @@ }

}
this.emit("disconnect", true);
this.emit('disconnect', true);
}
onReconnect() {
this.connected = true;
this.emit("reconnect", true);
this.emit('reconnect', true);
}
onOpen() {
this.connected = true;
this.emit("connect", true);
this.emit('connect', true);
// Resend all subscriptions

@@ -173,3 +172,3 @@ for (const [id, obs] of this.observeState) {

if (!this.opts) {
console.error("Configure opts to connect");
console.error('Configure opts to connect');
return;

@@ -285,3 +284,3 @@ }

retries++;
if (typeof newTime === "number" && !isNaN(newTime)) {
if (typeof newTime === 'number' && !isNaN(newTime)) {
time = newTime;

@@ -328,7 +327,7 @@ if (newTime === 0) {

setAuthState(authState) {
if (typeof authState === "object") {
if (typeof authState === 'object') {
return sendAuth(this, authState);
}
else {
throw new Error("Invalid auth() arguments");
throw new Error('Invalid auth() arguments');
}

@@ -335,0 +334,0 @@ }

{
"name": "@based/client",
"version": "6.3.0",
"version": "6.3.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "scripts": {

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