speedkey 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
3
+ */
4
+ export declare abstract class ValkeyError extends Error {
5
+ message: string;
6
+ constructor(message?: string);
7
+ get name(): string;
8
+ }
9
+ export declare class ClosingError extends ValkeyError {
10
+ }
11
+ export declare class RequestError extends ValkeyError {
12
+ }
13
+ export declare class TimeoutError extends RequestError {
14
+ }
15
+ export declare const TIMEOUT_ERROR: TimeoutError;
16
+ export declare class ExecAbortError extends RequestError {
17
+ }
18
+ export declare class ConnectionError extends RequestError {
19
+ }
20
+ export declare class ConfigurationError extends RequestError {
21
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ConfigurationError = exports.ConnectionError = exports.ExecAbortError = exports.TIMEOUT_ERROR = exports.TimeoutError = exports.RequestError = exports.ClosingError = exports.ValkeyError = void 0;
7
+ /// Base class for errors.
8
+ class ValkeyError extends Error {
9
+ message;
10
+ constructor(message) {
11
+ super();
12
+ this.message = message ?? "No error message provided";
13
+ }
14
+ get name() {
15
+ return this.constructor.name;
16
+ }
17
+ }
18
+ exports.ValkeyError = ValkeyError;
19
+ /// Errors that report that the client has closed and is no longer usable.
20
+ class ClosingError extends ValkeyError {
21
+ }
22
+ exports.ClosingError = ClosingError;
23
+ /// Errors that were reported during a request.
24
+ class RequestError extends ValkeyError {
25
+ }
26
+ exports.RequestError = RequestError;
27
+ /// Errors that are thrown when a request times out.
28
+ class TimeoutError extends RequestError {
29
+ }
30
+ exports.TimeoutError = TimeoutError;
31
+ exports.TIMEOUT_ERROR = new TimeoutError("Operation timed out");
32
+ /// Errors that are thrown when a transaction is aborted.
33
+ class ExecAbortError extends RequestError {
34
+ }
35
+ exports.ExecAbortError = ExecAbortError;
36
+ /// Errors that are thrown when a connection disconnects. These errors can be temporary, as the client will attempt to reconnect.
37
+ class ConnectionError extends RequestError {
38
+ }
39
+ exports.ConnectionError = ConnectionError;
40
+ /// Errors that are thrown when a request cannot be completed in current configuration settings.
41
+ class ConfigurationError extends RequestError {
42
+ }
43
+ exports.ConfigurationError = ConfigurationError;