@seedprotocol/feed 0.7.9-next.1189.g5e63267 → 0.7.9
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/README.md +7 -2
- package/dist/bootstrap.d.ts +7 -7
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/cache/CacheManager.d.ts +14 -12
- package/dist/cache/CacheManager.d.ts.map +1 -1
- package/dist/cache/FileCache.d.ts +0 -2
- package/dist/cache/FileCache.d.ts.map +1 -1
- package/dist/cache/MemoryCache.d.ts +2 -8
- package/dist/cache/MemoryCache.d.ts.map +1 -1
- package/dist/cache/config.d.ts +0 -2
- package/dist/cache/config.d.ts.map +1 -1
- package/dist/cache/types.d.ts +8 -13
- package/dist/cache/types.d.ts.map +1 -1
- package/dist/config.d.ts +4 -7
- package/dist/config.d.ts.map +1 -1
- package/dist/debug.d.ts +4 -0
- package/dist/debug.d.ts.map +1 -0
- package/dist/getFeedItems.d.ts +13 -2
- package/dist/getFeedItems.d.ts.map +1 -1
- package/dist/index.d.ts +10 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +527 -639
- package/dist/index.js.map +1 -1
- package/dist/services/arweaveImageService.d.ts +8 -5
- package/dist/services/arweaveImageService.d.ts.map +1 -1
- package/dist/types.d.ts +6 -24
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/etag.d.ts +0 -4
- package/dist/utils/etag.d.ts.map +1 -1
- package/package.json +5 -7
- package/dist/feedFieldStorageModel.d.ts +0 -3
- package/dist/feedFieldStorageModel.d.ts.map +0 -1
- package/dist/hydrateArweaveRichText.d.ts +0 -2
- package/dist/hydrateArweaveRichText.d.ts.map +0 -1
- package/dist/imageRelationEnrichment.d.ts +0 -2
- package/dist/imageRelationEnrichment.d.ts.map +0 -1
- package/dist/listRelationKey.d.ts +0 -2
- package/dist/listRelationKey.d.ts.map +0 -1
- package/dist/parseEasPropertyMetadataForFeed.d.ts +0 -3
- package/dist/parseEasPropertyMetadataForFeed.d.ts.map +0 -1
- package/dist/utils/arweaveUrl.d.ts +0 -2
- package/dist/utils/arweaveUrl.d.ts.map +0 -1
|
@@ -10,13 +10,16 @@ export declare class ArweaveImageService {
|
|
|
10
10
|
private config;
|
|
11
11
|
constructor(config: ArweaveImageServiceConfig);
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* Get image metadata from a URL
|
|
13
|
+
* Whether an Arweave transaction is an image, with its metadata. Gateways are tried in order
|
|
14
|
+
* until one answers (any successful HEAD, image or not); a gateway that errors or returns a
|
|
15
|
+
* non-ok status is skipped. Null when no gateway answered, so the caller can try again later
|
|
16
|
+
* instead of recording the transaction as "not an image".
|
|
18
17
|
*/
|
|
18
|
+
detectImage(transactionId: string): Promise<ImageMetadata | null>;
|
|
19
|
+
/** Image metadata for a URL; `isImage: false` when it isn't an image or couldn't be read. */
|
|
19
20
|
getImageMetadata(url: string, hostHint?: string): Promise<ImageMetadata>;
|
|
21
|
+
/** The URL's metadata, or null when the host errored or answered with a non-ok status. */
|
|
22
|
+
private probe;
|
|
20
23
|
/**
|
|
21
24
|
* Fetch image metadata from full request (fallback when range requests fail)
|
|
22
25
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arweaveImageService.d.ts","sourceRoot":"","sources":["../../src/services/arweaveImageService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"arweaveImageService.d.ts","sourceRoot":"","sources":["../../src/services/arweaveImageService.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE7C,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAA2B;gBAE7B,MAAM,EAAE,yBAAyB;IAI7C;;;;;OAKG;IACG,WAAW,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAcvE,6FAA6F;IACvF,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAI9E,0FAA0F;YAC5E,KAAK;IAmEnB;;OAEG;YACW,+BAA+B;IA8B7C;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAO1B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAqB9B;;OAEG;IACH,OAAO,CAAC,cAAc;IA6BtB;;OAEG;YACW,gBAAgB;CAsB/B"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
import type { Request, Response } from 'express';
|
|
2
|
-
/**
|
|
3
|
-
* Express Request/Response types for API routes
|
|
4
|
-
* Use these types in your route handlers
|
|
5
|
-
*/
|
|
6
|
-
export type { Request, Response } from 'express';
|
|
7
|
-
/**
|
|
8
|
-
* Express route handler function type
|
|
9
|
-
*/
|
|
10
|
-
export type ApiHandler = (req: Request, res: Response) => void | Promise<void>;
|
|
11
1
|
export type FeedFormat = 'rss' | 'atom' | 'json';
|
|
12
2
|
export interface TransformOptions {
|
|
13
3
|
schemaName: string;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
itemUrlPath?: string;
|
|
4
|
+
/** Items without a link of their own link to {itemUrlBase}/{itemUrlPath}/{uid} (an EAS explorer). */
|
|
5
|
+
itemUrlBase: string;
|
|
6
|
+
/** e.g. `attestation/view` */
|
|
7
|
+
itemUrlPath: string;
|
|
19
8
|
/**
|
|
20
9
|
* `omit_items` (default): drop feed entries whose rich-text fields contain `data:image/` URIs (large RSS payloads).
|
|
21
10
|
* `include_items`: keep those entries (opt-in).
|
|
@@ -35,7 +24,8 @@ export interface FeedConfig {
|
|
|
35
24
|
link?: string;
|
|
36
25
|
};
|
|
37
26
|
}
|
|
38
|
-
|
|
27
|
+
/** A feed entry: an assembled seed record's `data` with feed defaults applied. */
|
|
28
|
+
export interface FeedItem {
|
|
39
29
|
id: string;
|
|
40
30
|
title: string;
|
|
41
31
|
summary?: string;
|
|
@@ -66,14 +56,6 @@ export interface GraphQLItem {
|
|
|
66
56
|
};
|
|
67
57
|
[key: string]: unknown;
|
|
68
58
|
}
|
|
69
|
-
export interface GraphQLResponse<T> {
|
|
70
|
-
data: {
|
|
71
|
-
[key: string]: T[];
|
|
72
|
-
};
|
|
73
|
-
errors?: Array<{
|
|
74
|
-
message: string;
|
|
75
|
-
}>;
|
|
76
|
-
}
|
|
77
59
|
/**
|
|
78
60
|
* Image metadata extracted from Arweave transaction
|
|
79
61
|
*/
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAA;AAEhD,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAA;IAClB,qGAAqG;IACrG,WAAW,EAAE,MAAM,CAAA;IACnB,8BAA8B;IAC9B,WAAW,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,YAAY,GAAG,eAAe,CAAA;CACvD;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE;QACP,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,C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,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
|
package/dist/utils/etag.d.ts
CHANGED
|
@@ -3,10 +3,6 @@
|
|
|
3
3
|
* Uses MD5 hash for consistency and performance
|
|
4
4
|
*/
|
|
5
5
|
export declare function generateETag(value: string): string;
|
|
6
|
-
/**
|
|
7
|
-
* Generate an ETag for cached feed content
|
|
8
|
-
*/
|
|
9
|
-
export declare function generateContentETag(schemaName: string, format: string, lastModified: number, contentLength: number): string;
|
|
10
6
|
/**
|
|
11
7
|
* Check if an ETag matches the provided value
|
|
12
8
|
* Handles both quoted and unquoted ETags
|
package/dist/utils/etag.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"etag.d.ts","sourceRoot":"","sources":["../../src/utils/etag.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGlD;AAED
|
|
1
|
+
{"version":3,"file":"etag.d.ts","sourceRoot":"","sources":["../../src/utils/etag.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGlD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAIjE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,EAAE,CAQjF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC5C,WAAW,EAAE,MAAM,GAClB,OAAO,CAaT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seedprotocol/feed",
|
|
3
|
-
"version": "0.7.9
|
|
3
|
+
"version": "0.7.9",
|
|
4
4
|
"description": "RSS 2.0, Atom and JSON Feed generation for Seed Protocol items, with HTTP handlers, ETag caching and RFC 5005 archives",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"seed-protocol",
|
|
@@ -36,12 +36,11 @@
|
|
|
36
36
|
"prepublishOnly": "bun run build && node ../../scripts/sync-versions.js"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@seedprotocol/arweave": "0.7.9
|
|
40
|
-
"@seedprotocol/eas": "0.7.9
|
|
41
|
-
"@seedprotocol/query": "0.7.9
|
|
42
|
-
"
|
|
39
|
+
"@seedprotocol/arweave": "0.7.9",
|
|
40
|
+
"@seedprotocol/eas": "0.7.9",
|
|
41
|
+
"@seedprotocol/query": "0.7.9",
|
|
42
|
+
"debug": "^4.4.1",
|
|
43
43
|
"feedsmith": "^2.9.0",
|
|
44
|
-
"graphql-request": "^7.3.5",
|
|
45
44
|
"image-size": "^1.1.1",
|
|
46
45
|
"pluralize": "^8.0.0",
|
|
47
46
|
"rss-parser": "^3.13.0",
|
|
@@ -49,7 +48,6 @@
|
|
|
49
48
|
},
|
|
50
49
|
"devDependencies": {
|
|
51
50
|
"@types/bun": "latest",
|
|
52
|
-
"@types/express": "^5.0.6",
|
|
53
51
|
"typescript": "~5.9.3",
|
|
54
52
|
"vite": "^8.0.0"
|
|
55
53
|
},
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { FEED_RICH_BODY_STORAGE_SCHEMAS, RICH_BODY_STORAGE_SCHEMAS, isFeedRichBodyStorageSchema, isRichBodyStorageSchema, feedRichBodyModelPriority, richBodyModelPriority, getFeedFieldStorageModels, getFieldStorageModels, getFeedListElementStorageModels, getListElementStorageModels, setFeedFieldStorageModel, setFieldStorageModel, setFeedListElementStorageModels, setListElementStorageModels, } from '@seedprotocol/query';
|
|
2
|
-
export type { FeedFieldStorageModels, FieldStorageModels, FeedListElementStorageModels, ListElementStorageModels, } from '@seedprotocol/query';
|
|
3
|
-
//# sourceMappingURL=feedFieldStorageModel.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feedFieldStorageModel.d.ts","sourceRoot":"","sources":["../src/feedFieldStorageModel.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,EACzB,2BAA2B,EAC3B,uBAAuB,EACvB,yBAAyB,EACzB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,+BAA+B,EAC/B,2BAA2B,EAC3B,wBAAwB,EACxB,oBAAoB,EACpB,+BAA+B,EAC/B,2BAA2B,GAC5B,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,sBAAsB,EACtB,kBAAkB,EAClB,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,qBAAqB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hydrateArweaveRichText.d.ts","sourceRoot":"","sources":["../src/hydrateArweaveRichText.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,6BAA6B,EAC7B,8BAA8B,GAC/B,MAAM,qBAAqB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"imageRelationEnrichment.d.ts","sourceRoot":"","sources":["../src/imageRelationEnrichment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,GACrB,MAAM,qBAAqB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"listRelationKey.d.ts","sourceRoot":"","sources":["../src/listRelationKey.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,2CAA2C,EAC3C,wBAAwB,GACzB,MAAM,qBAAqB,CAAA"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { parseEasPropertyMetadataForFeed, parseEasPropertyMetadata, } from '@seedprotocol/query';
|
|
2
|
-
export type { EasPropertyMetadataForFeed, ParseEasPropertyMetadataForFeedResult, EasPropertyMetadata, ParseEasPropertyMetadataResult, } from '@seedprotocol/query';
|
|
3
|
-
//# sourceMappingURL=parseEasPropertyMetadataForFeed.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parseEasPropertyMetadataForFeed.d.ts","sourceRoot":"","sources":["../src/parseEasPropertyMetadataForFeed.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,wBAAwB,GACzB,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,0BAA0B,EAC1B,qCAAqC,EACrC,mBAAmB,EACnB,8BAA8B,GAC/B,MAAM,qBAAqB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"arweaveUrl.d.ts","sourceRoot":"","sources":["../../src/utils/arweaveUrl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAA"}
|