@j0hanz/superfetch 2.4.3 → 2.4.5
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/dist/cache.d.ts +8 -8
- package/dist/cache.js +277 -264
- package/dist/config.d.ts +1 -0
- package/dist/config.js +1 -0
- package/dist/crypto.js +4 -3
- package/dist/dom-noise-removal.js +355 -297
- package/dist/fetch.d.ts +13 -7
- package/dist/fetch.js +636 -690
- package/dist/http-native.js +535 -474
- package/dist/instructions.md +38 -27
- package/dist/language-detection.js +190 -153
- package/dist/markdown-cleanup.js +171 -158
- package/dist/mcp.js +183 -2
- package/dist/resources.d.ts +2 -0
- package/dist/resources.js +44 -0
- package/dist/session.js +144 -105
- package/dist/tasks.d.ts +37 -0
- package/dist/tasks.js +66 -0
- package/dist/tools.d.ts +8 -12
- package/dist/tools.js +196 -147
- package/dist/transform.d.ts +3 -1
- package/dist/transform.js +680 -778
- package/package.json +6 -6
package/dist/cache.d.ts
CHANGED
|
@@ -12,12 +12,17 @@ export interface CachedPayload {
|
|
|
12
12
|
markdown?: string;
|
|
13
13
|
title?: string;
|
|
14
14
|
}
|
|
15
|
-
export declare function parseCachedPayload(raw: string): CachedPayload | null;
|
|
16
|
-
export declare function resolveCachedPayloadContent(payload: CachedPayload): string | null;
|
|
17
15
|
export interface CacheKeyParts {
|
|
18
16
|
namespace: string;
|
|
19
17
|
urlHash: string;
|
|
20
18
|
}
|
|
19
|
+
export interface McpIcon {
|
|
20
|
+
src: string;
|
|
21
|
+
mimeType: string;
|
|
22
|
+
sizes: string[];
|
|
23
|
+
}
|
|
24
|
+
export declare function parseCachedPayload(raw: string): CachedPayload | null;
|
|
25
|
+
export declare function resolveCachedPayloadContent(payload: CachedPayload): string | null;
|
|
21
26
|
export declare function createCacheKey(namespace: string, url: string, vary?: Record<string, unknown> | string): string | null;
|
|
22
27
|
export declare function parseCacheKey(cacheKey: string): CacheKeyParts | null;
|
|
23
28
|
export declare function toResourceUri(cacheKey: string): string | null;
|
|
@@ -27,20 +32,15 @@ interface CacheUpdateEvent {
|
|
|
27
32
|
urlHash: string;
|
|
28
33
|
}
|
|
29
34
|
type CacheUpdateListener = (event: CacheUpdateEvent) => void;
|
|
30
|
-
export declare function onCacheUpdate(listener: CacheUpdateListener): () => void;
|
|
31
35
|
interface CacheEntryMetadata {
|
|
32
36
|
url: string;
|
|
33
37
|
title?: string;
|
|
34
38
|
}
|
|
39
|
+
export declare function onCacheUpdate(listener: CacheUpdateListener): () => void;
|
|
35
40
|
export declare function get(cacheKey: string | null): CacheEntry | undefined;
|
|
36
41
|
export declare function set(cacheKey: string | null, content: string, metadata: CacheEntryMetadata): void;
|
|
37
42
|
export declare function keys(): readonly string[];
|
|
38
43
|
export declare function isEnabled(): boolean;
|
|
39
|
-
export interface McpIcon {
|
|
40
|
-
src: string;
|
|
41
|
-
mimeType: string;
|
|
42
|
-
sizes: string[];
|
|
43
|
-
}
|
|
44
44
|
export declare function registerCachedContentResource(server: McpServer, serverIcons?: McpIcon[]): void;
|
|
45
45
|
export declare function generateSafeFilename(url: string, title?: string, hashFallback?: string, extension?: string): string;
|
|
46
46
|
export declare function handleDownload(res: ServerResponse, namespace: string, hash: string): void;
|