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

replicache

Package Overview
Dependencies
Maintainers
8
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 14.2.2 to 15.0.0

96

out/replicache.d.ts

@@ -300,4 +300,2 @@ import { LogLevel, LogSink } from '@rocicorp/logger';

*
* @experimental This interface is experimental and might be removed or changed
* in the future without following semver versioning. Please be cautious.
*/

@@ -317,7 +315,21 @@ interface Store {

*
* @experimental This type is experimental and might be removed or changed
* in the future without following semver versioning. Please be cautious.
*/
type CreateStore = (name: string) => Store;
/**
* Function for deleting {@link Store} instances.
*
* The name is used to identify the store. If the same name is used for multiple
* stores, they should share the same data.
*
*/
type DropStore = (name: string) => Promise<void>;
/**
* Provider for creating and deleting {@link Store} instances.
*
*/
type StoreProvider = {
create: CreateStore;
drop: DropStore;
};
/**
* This interface is used so that we can release the lock when the transaction

@@ -361,21 +373,2 @@ * is done.

/**
* A named in-memory Store implementation.
*
* Two (or more) named memory stores with the same name will share the same
* underlying storage. They will also share the same read/write locks, so that
* only one write transaction can be running at the same time.
*
* @experimental This class is experimental and might be removed or changed
* in the future without following semver versioning. Please be cautious.
*/
declare class MemStore implements Store {
#private;
constructor(name: string);
read(): Promise<Read>;
write(): Promise<Write>;
close(): Promise<void>;
get closed(): boolean;
}
/**
* Merges an iterable on to another iterable.

@@ -403,2 +396,36 @@ *

/**
* Options for `dropDatabase` and `dropAllDatabases`.
*/
type DropDatabaseOptions = {
/**
* Allows providing a custom implementation of the underlying storage layer.
* Default is `'idb'`.
*/
kvStore?: 'idb' | 'mem' | StoreProvider | undefined;
/**
* Determines how much logging to do. When this is set to `'debug'`,
* Replicache will also log `'info'` and `'error'` messages. When set to
* `'info'` we log `'info'` and `'error'` but not `'debug'`. When set to
* `'error'` we only log `'error'` messages.
* Default is `'info'`.
*/
logLevel?: LogLevel | undefined;
/**
* Enables custom handling of logs.
*
* By default logs are logged to the console. If you would like logs to be
* sent elsewhere (e.g. to a cloud logging service like DataDog) you can
* provide an array of {@link LogSink}s. Logs at or above
* {@link DropDatabaseOptions.logLevel} are sent to each of these {@link LogSink}s.
* If you would still like logs to go to the console, include
* `consoleLogSink` in the array.
*
* ```ts
* logSinks: [consoleLogSink, myCloudLogSink],
* ```
* Default is `[consoleLogSink]`.
*/
logSinks?: LogSink[] | undefined;
};
/**
* Deletes a single Replicache database.

@@ -408,3 +435,3 @@ * @param dbName

*/
declare function dropDatabase(dbName: string, createKVStore?: CreateStore): Promise<void>;
declare function dropDatabase(dbName: string, opts?: DropDatabaseOptions | undefined): Promise<void>;
/**

@@ -416,3 +443,3 @@ * Deletes all IndexedDB data associated with Replicache.

*/
declare function dropAllDatabases(createKVStore?: CreateStore): Promise<{
declare function dropAllDatabases(opts?: DropDatabaseOptions | undefined): Promise<{
dropped: string[];

@@ -429,3 +456,3 @@ errors: unknown[];

*/
declare function deleteAllReplicacheData(createKVStore?: CreateStore): Promise<{
declare function deleteAllReplicacheData(opts?: DropDatabaseOptions | undefined): Promise<{
dropped: string[];

@@ -811,3 +838,3 @@ errors: unknown[];

*/
prefix?: string;
prefix?: string | undefined;
/**

@@ -819,3 +846,3 @@ * When this is set to `true` (default is `false`), the `watch` callback will

*/
initialValuesInFirstDiff?: boolean;
initialValuesInFirstDiff?: boolean | undefined;
};

@@ -944,4 +971,6 @@ /**

/**
* `onSync` is called when a sync begins (the `syncing` parameter is then set
* to `true`), and again when the sync ends (`syncing` is set to `false`).
* `onSync(true)` is called when Replicache transitions from no push or pull
* happening to at least one happening. `onSync(false)` is called in the
* opposite case: when Replicache transitions from at least one push or pull
* happening to none happening.
*

@@ -1342,7 +1371,4 @@ * This can be used in a React like app by doing something like the following:

* Allows providing a custom implementation of the underlying storage layer.
*
* @experimental This option is experimental and might be removed or changed
* in the future without following semver versioning. Please be cautious.
*/
experimentalCreateKVStore?: CreateStore | undefined;
kvStore?: 'mem' | 'idb' | StoreProvider | undefined;
/**

@@ -1368,2 +1394,2 @@ * Defines the indexes, if any, to use on the data.

export { AsyncIterableIteratorToArray, ClientGroupID, ClientID, ClientStateNotFoundResponse, Cookie, CreateIndexDefinition, DeepReadonly, DeepReadonlyObject, CreateStore as ExperimentalCreateKVStore, 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, MemStore as ExperimentalMemKVStore, NoIndexDiff as ExperimentalNoIndexDiff, WatchCallbackForOptions as ExperimentalWatchCallbackForOptions, WatchIndexCallback as ExperimentalWatchIndexCallback, WatchIndexOptions as ExperimentalWatchIndexOptions, WatchNoIndexCallback as ExperimentalWatchNoIndexCallback, WatchNoIndexOptions as ExperimentalWatchNoIndexOptions, WatchOptions as ExperimentalWatchOptions, GetIndexScanIterator, GetScanIterator, HTTPRequestInfo, IDBNotFoundError, IndexDefinition, IndexDefinitions, IndexKey, IterableUnion, JSONObject, JSONValue, KeyTypeForScanOptions, MaybePromise, MutationV0, MutationV1, MutatorDefs, MutatorReturn, PatchOperation, PendingMutation, Poke, PullError, PullRequest, PullRequestV0, PullRequestV1, PullResponse, PullResponseOKV0, PullResponseOKV1, PullResponseV0, PullResponseV1, Puller, PullerResult, PullerResultV0, PullerResultV1, PushError, PushRequest, PushRequestV0, PushRequestV1, PushResponse, Pusher, PusherResult, ReadTransaction, ReadonlyJSONObject, ReadonlyJSONValue, Replicache, ReplicacheOptions, RequestOptions, ScanIndexOptions, ScanNoIndexOptions, ScanOptionIndexedStartKey, ScanOptions, ScanResult, SubscribeOptions, TEST_LICENSE_KEY, TransactionClosedError, TransactionEnvironment, TransactionLocation, TransactionReason, UpdateNeededReason, VersionNotSupportedResponse, WriteTransaction, deleteAllReplicacheData, dropAllDatabases, dropDatabase, filterAsyncIterable, getDefaultPuller, isScanIndexOptions, makeIDBName, makeScanResult, mergeAsyncIterables, version };
export { AsyncIterableIteratorToArray, ClientGroupID, ClientID, ClientStateNotFoundResponse, Cookie, CreateIndexDefinition, CreateStore as CreateKVStore, DeepReadonly, DeepReadonlyObject, DropDatabaseOptions, DropStore as DropKVStore, Diff as ExperimentalDiff, DiffOperation as ExperimentalDiffOperation, DiffOperationAdd as ExperimentalDiffOperationAdd, DiffOperationChange as ExperimentalDiffOperationChange, DiffOperationDel as ExperimentalDiffOperationDel, IndexDiff as ExperimentalIndexDiff, NoIndexDiff as ExperimentalNoIndexDiff, WatchCallbackForOptions as ExperimentalWatchCallbackForOptions, WatchIndexCallback as ExperimentalWatchIndexCallback, WatchIndexOptions as ExperimentalWatchIndexOptions, WatchNoIndexCallback as ExperimentalWatchNoIndexCallback, WatchNoIndexOptions as ExperimentalWatchNoIndexOptions, WatchOptions as ExperimentalWatchOptions, GetIndexScanIterator, GetScanIterator, HTTPRequestInfo, IDBNotFoundError, IndexDefinition, IndexDefinitions, IndexKey, IterableUnion, JSONObject, JSONValue, Read as KVRead, Store as KVStore, StoreProvider as KVStoreProvider, Write as KVWrite, KeyTypeForScanOptions, MaybePromise, MutationV0, MutationV1, MutatorDefs, MutatorReturn, PatchOperation, PendingMutation, Poke, PullError, PullRequest, PullRequestV0, PullRequestV1, PullResponse, PullResponseOKV0, PullResponseOKV1, PullResponseV0, PullResponseV1, Puller, PullerResult, PullerResultV0, PullerResultV1, PushError, PushRequest, PushRequestV0, PushRequestV1, PushResponse, Pusher, PusherResult, ReadTransaction, ReadonlyJSONObject, ReadonlyJSONValue, Replicache, ReplicacheOptions, RequestOptions, ScanIndexOptions, ScanNoIndexOptions, ScanOptionIndexedStartKey, ScanOptions, ScanResult, SubscribeOptions, TEST_LICENSE_KEY, TransactionClosedError, TransactionEnvironment, TransactionLocation, TransactionReason, UpdateNeededReason, VersionNotSupportedResponse, WriteTransaction, deleteAllReplicacheData, dropAllDatabases, dropDatabase, filterAsyncIterable, getDefaultPuller, isScanIndexOptions, makeIDBName, makeScanResult, mergeAsyncIterables, version };
{
"name": "replicache",
"description": "Realtime sync for any backend stack",
"version": "14.2.2",
"version": "15.0.0",
"repository": "github:rocicorp/replicache",

@@ -56,3 +56,3 @@ "license": "https://roci.dev/terms.html",

"sinon": "^13.0.1",
"typescript": "^5.2.2",
"typescript": "^5.4.2",
"xbytes": "^1.7.0"

@@ -59,0 +59,0 @@ },

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

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