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

replicache

Package Overview
Dependencies
Maintainers
6
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

replicache - npm Package Compare versions

Comparing version 11.3.1 to 11.3.2

153

out/replicache.d.ts

@@ -38,2 +38,5 @@ /** The values that can be represented in JSON */

declare type BranchID = string;
/**
* The ID describing a client.
*/
declare type ClientID = string;

@@ -266,71 +269,4 @@

declare const PULL_VERSION_SDD = 0;
/**
* Function that gets passed into [[Replicache.experimentalWatch]] and gets
* called when the data in Replicache changes.
*
* @experimental This type is experimental and may change in the future.
*/
declare type WatchNoIndexCallback = (diff: NoIndexDiff) => void;
declare type WatchCallbackForOptions<Options extends WatchOptions> = Options extends WatchIndexOptions ? WatchIndexCallback : WatchNoIndexCallback;
/**
* Function that gets passed into [[Replicache.experimentalWatch]] when doing a
* watch on a secondary index map and gets called when the data in Replicache
* changes.
*
* @experimental This type is experimental and may change in the future.
*/
declare type WatchIndexCallback = (diff: IndexDiff) => void;
/**
* Options for [[Replicache.experimentalWatch]].
*
* @experimental This interface is experimental and may change in the future.
*/
declare type WatchOptions = WatchIndexOptions | WatchNoIndexOptions;
/**
* Options object passed to [[Replicache.experimentalWatch]]. This is for an
* index watch.
*/
declare type WatchIndexOptions = WatchNoIndexOptions & {
/**
* When provided, the `watch` is limited to the changes that apply to the index map.
*/
indexName: string;
};
/**
* Options object passed to [[Replicache.experimentalWatch]]. This is for a non
* index watch.
*/
declare type WatchNoIndexOptions = {
/**
* When provided, the `watch` is limited to changes where the `key` starts
* with `prefix`.
*/
prefix?: string;
/**
* When this is set to `true` (default is `false`), the `watch` callback will
* be called once asynchronously when watch is called. The arguments in that
* case is a diff where we consider all the existing values in Replicache as
* being added.
*/
initialValuesInFirstDiff?: boolean;
};
/**
* The options passed to [[Replicache.subscribe]].
*/
interface SubscribeOptions<R extends ReadonlyJSONValue | undefined, E> {
/**
* Called when the return value of the body function changes.
*/
onData: (result: R) => void;
/**
* If present, called when an error occurs.
*/
onError?: (error: E) => void;
/**
* If present, called when the subscription is removed/done.
*/
onDone?: () => void;
}
/**
* The JSON value used as the body when doing a POST to the [pull

@@ -341,6 +277,6 @@ * endpoint](/server-pull).

profileID: string;
clientID: string;
clientID: ClientID;
cookie: Cookie;
lastMutationID: number;
pullVersion: number;
pullVersion: typeof PULL_VERSION_SDD;
schemaVersion: string;

@@ -356,3 +292,3 @@ };

profileID: string;
clientID: string;
clientID: ClientID;
mutations: Mutation[];

@@ -539,2 +475,70 @@ pushVersion: typeof PUSH_VERSION;

/**
* Function that gets passed into [[Replicache.experimentalWatch]] and gets
* called when the data in Replicache changes.
*
* @experimental This type is experimental and may change in the future.
*/
declare type WatchNoIndexCallback = (diff: NoIndexDiff) => void;
declare type WatchCallbackForOptions<Options extends WatchOptions> = Options extends WatchIndexOptions ? WatchIndexCallback : WatchNoIndexCallback;
/**
* Function that gets passed into [[Replicache.experimentalWatch]] when doing a
* watch on a secondary index map and gets called when the data in Replicache
* changes.
*
* @experimental This type is experimental and may change in the future.
*/
declare type WatchIndexCallback = (diff: IndexDiff) => void;
/**
* Options for [[Replicache.experimentalWatch]].
*
* @experimental This interface is experimental and may change in the future.
*/
declare type WatchOptions = WatchIndexOptions | WatchNoIndexOptions;
/**
* Options object passed to [[Replicache.experimentalWatch]]. This is for an
* index watch.
*/
declare type WatchIndexOptions = WatchNoIndexOptions & {
/**
* When provided, the `watch` is limited to the changes that apply to the index map.
*/
indexName: string;
};
/**
* Options object passed to [[Replicache.experimentalWatch]]. This is for a non
* index watch.
*/
declare type WatchNoIndexOptions = {
/**
* When provided, the `watch` is limited to changes where the `key` starts
* with `prefix`.
*/
prefix?: string;
/**
* When this is set to `true` (default is `false`), the `watch` callback will
* be called once asynchronously when watch is called. The arguments in that
* case is a diff where we consider all the existing values in Replicache as
* being added.
*/
initialValuesInFirstDiff?: boolean;
};
/**
* The options passed to [[Replicache.subscribe]].
*/
interface SubscribeOptions<R extends ReadonlyJSONValue | undefined, E> {
/**
* Called when the return value of the body function changes.
*/
onData: (result: R) => void;
/**
* If present, called when an error occurs.
*/
onError?: (error: E) => void;
/**
* If present, called when the subscription is removed/done.
*/
onDone?: () => void;
}
/**
* ReadTransactions are used with [[Replicache.query]] and

@@ -545,3 +549,3 @@ * [[Replicache.subscribe]] and allows read operations on the

interface ReadTransaction {
readonly clientID: string;
readonly clientID: ClientID;
/**

@@ -1021,3 +1025,2 @@ * Get a single value from the database. If the `key` is not present this

private readonly _closeAbortController;
private readonly _persistPullLock;
private _persistIsScheduled;

@@ -1124,3 +1127,3 @@ private readonly _enableLicensing;

private _indexOp;
protected _maybeEndPull(syncHead: Hash, requestID: string): Promise<void>;
protected _maybeEndPull(requestID: string): Promise<void>;
private _invokePull;

@@ -1248,2 +1251,2 @@ private _isPullDisabled;

export { AsyncIterableIteratorToArray, ClientStateNotFoundReason, ClientStateNotFoundResponse, CreateIndexDefinition, Diff as ExperimentalDiff, DiffOperation as ExperimentalDiffOperation, DiffOperationAdd as ExperimentalDiffOperationAdd, DiffOperationChange as ExperimentalDiffOperationChange, DiffOperationDel as ExperimentalDiffOperationDel, IndexDiff as ExperimentalIndexDiff, Read as ExperimentalKVRead, Store as ExperimentalKVStore, Write as ExperimentalKVWrite, NoIndexDiff as ExperimentalNoIndexDiff, WatchCallbackForOptions as ExperimentalWatchCallbackForOptions, WatchIndexCallback as ExperimentalWatchIndexCallback, WatchIndexOptions as ExperimentalWatchIndexOptions, WatchNoIndexCallback as ExperimentalWatchNoIndexCallback, WatchNoIndexOptions as ExperimentalWatchNoIndexOptions, WatchOptions as ExperimentalWatchOptions, GetIndexScanIterator, GetScanIterator, HTTPRequestInfo, IndexDefinition, IndexDefinitions, IndexKey, IterableUnion, JSONObject, JSONValue, KeyTypeForScanOptions, LogLevel, LogSink, MaybePromise, MutatorDefs, PatchOperation, PendingMutation, Poke, PullError, PullRequest, PullResponse, PullResponseOK, Puller, PullerResult, PushError, PushRequest, Pusher, ReadTransaction, ReadonlyJSONObject, ReadonlyJSONValue, Replicache, ReplicacheOptions, RequestOptions, ScanIndexOptions, ScanNoIndexOptions, ScanOptionIndexedStartKey, ScanOptions, ScanResult, SubscribeOptions, TEST_LICENSE_KEY, TransactionClosedError, WriteTransaction, consoleLogSink, deleteAllReplicacheData, filterAsyncIterable, isScanIndexOptions, makeIDBName, makeScanResult, mergeAsyncIterables, version };
export { AsyncIterableIteratorToArray, ClientID, ClientStateNotFoundReason, ClientStateNotFoundResponse, CreateIndexDefinition, Diff as ExperimentalDiff, DiffOperation as ExperimentalDiffOperation, DiffOperationAdd as ExperimentalDiffOperationAdd, DiffOperationChange as ExperimentalDiffOperationChange, DiffOperationDel as ExperimentalDiffOperationDel, IndexDiff as ExperimentalIndexDiff, Read as ExperimentalKVRead, Store as ExperimentalKVStore, Write as ExperimentalKVWrite, NoIndexDiff as ExperimentalNoIndexDiff, WatchCallbackForOptions as ExperimentalWatchCallbackForOptions, WatchIndexCallback as ExperimentalWatchIndexCallback, WatchIndexOptions as ExperimentalWatchIndexOptions, WatchNoIndexCallback as ExperimentalWatchNoIndexCallback, WatchNoIndexOptions as ExperimentalWatchNoIndexOptions, WatchOptions as ExperimentalWatchOptions, GetIndexScanIterator, GetScanIterator, HTTPRequestInfo, IndexDefinition, IndexDefinitions, IndexKey, IterableUnion, JSONObject, JSONValue, KeyTypeForScanOptions, LogLevel, LogSink, MaybePromise, MutatorDefs, PatchOperation, PendingMutation, Poke, PullError, PullRequest, PullResponse, PullResponseOK, Puller, PullerResult, PushError, PushRequest, Pusher, ReadTransaction, ReadonlyJSONObject, ReadonlyJSONValue, Replicache, ReplicacheOptions, RequestOptions, ScanIndexOptions, ScanNoIndexOptions, ScanOptionIndexedStartKey, ScanOptions, ScanResult, SubscribeOptions, TEST_LICENSE_KEY, TransactionClosedError, WriteTransaction, consoleLogSink, deleteAllReplicacheData, filterAsyncIterable, isScanIndexOptions, makeIDBName, makeScanResult, mergeAsyncIterables, version };
{
"name": "replicache",
"description": "Realtime sync for any backend stack",
"version": "11.3.1",
"version": "11.3.2",
"repository": "github:rocicorp/replicache",

@@ -6,0 +6,0 @@ "license": "https://roci.dev/terms.html",

Sorry, the diff of this file is too big to display

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