@frontmcp/utils 1.9.2 → 1.9.4
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.
- package/class-brand/class-brand.d.ts +37 -0
- package/class-brand/index.d.ts +1 -0
- package/crypto/browser.d.ts +5 -0
- package/crypto/browser.js +33 -5
- package/crypto/node.d.ts +1 -1
- package/esm/crypto/browser.mjs +27 -4
- package/esm/index.mjs +159 -238
- package/fs/fs.d.ts +20 -0
- package/fs/index.d.ts +1 -1
- package/index.d.ts +3 -2
- package/index.js +164 -240
- package/package.json +6 -2
- package/storage/adapters/redis.d.ts +9 -1
- package/storage/index.d.ts +1 -1
- package/storage/redis-url.d.ts +25 -3
package/storage/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { createStorage, createMemoryStorage, getDetectedStorageType } from './fa
|
|
|
9
9
|
export { attachRedisErrorListener, DEFAULT_REDIS_ERROR_LOG_INTERVAL_MS } from './redis-error-listener';
|
|
10
10
|
export type { RedisErrorListenerOptions, ErrorEmitterClient } from './redis-error-listener';
|
|
11
11
|
export { mergeRedisUrlFields, describeRedisUrlConflicts } from './redis-url';
|
|
12
|
-
export type { RedisUrlMerge, RedisUrlSiblingFields } from './redis-url';
|
|
12
|
+
export type { RedisUrlConnection, RedisUrlMerge, RedisUrlSiblingFields } from './redis-url';
|
|
13
13
|
export { NamespacedStorageImpl, createRootStorage, createNamespacedStorage, buildPrefix, NAMESPACE_SEPARATOR, } from './namespace';
|
|
14
14
|
export { StorageError, StorageConnectionError, StorageOperationError, StorageNotSupportedError, StorageConfigError, StorageTTLError, StoragePatternError, StorageNotConnectedError, EncryptedStorageError, } from './errors';
|
|
15
15
|
export { TypedStorage } from './typed-storage';
|
package/storage/redis-url.d.ts
CHANGED
|
@@ -8,20 +8,42 @@ export interface RedisUrlSiblingFields {
|
|
|
8
8
|
db?: number;
|
|
9
9
|
tls?: boolean;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* What a `redis://` or `rediss://` URL states, read as ioredis reads it: the userinfo, port and path
|
|
13
|
+
* first, then the same names in its query. An empty username or password counts as left out.
|
|
14
|
+
*/
|
|
15
|
+
export interface RedisUrlConnection {
|
|
16
|
+
host?: string;
|
|
17
|
+
port?: number;
|
|
18
|
+
username?: string;
|
|
19
|
+
password?: string;
|
|
20
|
+
db?: number;
|
|
21
|
+
tls: boolean;
|
|
22
|
+
/** The query's other options, which ioredis takes as they are (`family` as a number). */
|
|
23
|
+
queryOptions: Record<string, string | number>;
|
|
24
|
+
}
|
|
11
25
|
/**
|
|
12
26
|
* Outcome of combining a Redis URL with the fields written beside it.
|
|
13
27
|
*/
|
|
14
28
|
export interface RedisUrlMerge {
|
|
29
|
+
/** What the URL states. */
|
|
30
|
+
connection: RedisUrlConnection;
|
|
15
31
|
/** Fields the URL leaves out that the sibling fields supply. */
|
|
16
32
|
fillIns: Pick<RedisUrlSiblingFields, 'port' | 'password' | 'db' | 'tls'>;
|
|
17
33
|
/** Sibling fields whose value contradicts the URL. */
|
|
18
34
|
conflicts: Array<keyof RedisUrlSiblingFields>;
|
|
19
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Read a `redis://` or `rediss://` URL. Returns `undefined` for an unparseable URL or another
|
|
38
|
+
* scheme (such as a socket path), which only ioredis reads.
|
|
39
|
+
*/
|
|
40
|
+
export declare function readRedisUrl(rawUrl: string): RedisUrlConnection | undefined;
|
|
20
41
|
/**
|
|
21
42
|
* The URL is the base: fields beside it fill in only what it leaves out (a
|
|
22
|
-
* port, a password, a database, TLS), and a field that contradicts it
|
|
23
|
-
* conflict the caller must reject
|
|
24
|
-
*
|
|
43
|
+
* port, a password, a database, TLS), and a field that contradicts what it
|
|
44
|
+
* states, in its userinfo, path or query, is a conflict the caller must reject
|
|
45
|
+
* (#768). Returns `undefined` for a URL {@link readRedisUrl} cannot read, which
|
|
46
|
+
* the caller reports on its own terms.
|
|
25
47
|
*/
|
|
26
48
|
export declare function mergeRedisUrlFields(rawUrl: string, fields: RedisUrlSiblingFields): RedisUrlMerge | undefined;
|
|
27
49
|
/** Human-readable reason for {@link RedisUrlMerge.conflicts}. */
|