@fedify/fedify 1.1.0-dev.431 → 1.1.0-dev.432
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGES.md +7 -0
- package/esm/federation/handler.js +1 -1
- package/esm/federation/middleware.js +7 -1
- package/esm/testing/fixtures/example.com/collection +19 -0
- package/esm/testing/fixtures/example.com/paged/a +13 -0
- package/esm/testing/fixtures/example.com/paged/b +16 -0
- package/esm/testing/fixtures/example.com/paged-collection +6 -0
- package/esm/vocab/lookup.js +36 -0
- package/package.json +1 -1
- package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/common.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/encoding.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/language.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/media_type.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/negotiation.d.ts.map +1 -1
- package/types/federation/context.d.ts +25 -2
- package/types/federation/context.d.ts.map +1 -1
- package/types/federation/middleware.d.ts +3 -2
- package/types/federation/middleware.d.ts.map +1 -1
- package/types/vocab/lookup.d.ts +37 -2
- package/types/vocab/lookup.d.ts.map +1 -1
- /package/esm/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/common.js +0 -0
- /package/esm/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/encoding.js +0 -0
- /package/esm/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/language.js +0 -0
- /package/esm/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/media_type.js +0 -0
- /package/esm/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/negotiation.js +0 -0
- /package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/common.d.ts +0 -0
- /package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/encoding.d.ts +0 -0
- /package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/language.d.ts +0 -0
- /package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/_negotiation/media_type.d.ts +0 -0
- /package/types/deps/jsr.io/@std/http/{1.0.7 → 1.0.8}/negotiation.d.ts +0 -0
package/CHANGES.md
CHANGED
@@ -8,6 +8,12 @@ Version 1.1.0
|
|
8
8
|
|
9
9
|
To be released.
|
10
10
|
|
11
|
+
- Added utility functions for traversing remote collections. [[#150]]
|
12
|
+
|
13
|
+
- Added `Context.traverseCollection()` method.
|
14
|
+
- Added `traverseCollection()` function.
|
15
|
+
- Added `TraverseCollectionOptions` interface.
|
16
|
+
|
11
17
|
- Added `EmojiReact` class to Activity Vocabulary API. [[FEP-c0e0]]
|
12
18
|
|
13
19
|
- Added `DidService` class to Activity Vocabulary API.
|
@@ -53,6 +59,7 @@ To be released.
|
|
53
59
|
[FEP-c0e0]: https://w3id.org/fep/c0e0
|
54
60
|
[FEP-9091]: https://w3id.org/fep/9091
|
55
61
|
[#146]: https://github.com/dahlia/fedify/issues/146
|
62
|
+
[#150]: https://github.com/dahlia/fedify/issues/150
|
56
63
|
|
57
64
|
|
58
65
|
Version 1.0.2
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as dntShim from "../_dnt.shims.js";
|
2
2
|
import { getLogger } from "@logtape/logtape";
|
3
|
-
import { accepts } from "../deps/jsr.io/@std/http/1.0.
|
3
|
+
import { accepts } from "../deps/jsr.io/@std/http/1.0.8/negotiation.js";
|
4
4
|
import { verifyRequest } from "../sig/http.js";
|
5
5
|
import { detachSignature, verifyJsonLd } from "../sig/ld.js";
|
6
6
|
import { doesActorOwnKey } from "../sig/owner.js";
|
@@ -7,7 +7,7 @@ import { exportJwk, importJwk, validateCryptoKey } from "../sig/key.js";
|
|
7
7
|
import { hasSignature, signJsonLd } from "../sig/ld.js";
|
8
8
|
import { getKeyOwner } from "../sig/owner.js";
|
9
9
|
import { signObject } from "../sig/proof.js";
|
10
|
-
import { lookupObject } from "../vocab/lookup.js";
|
10
|
+
import { lookupObject, traverseCollection, } from "../vocab/lookup.js";
|
11
11
|
import { Activity, CryptographicKey, Multikey, } from "../vocab/vocab.js";
|
12
12
|
import { handleWebFinger } from "../webfinger/handler.js";
|
13
13
|
import { buildCollectionSynchronizationHeader } from "./collection.js";
|
@@ -1533,6 +1533,12 @@ export class ContextImpl {
|
|
1533
1533
|
contextLoader: options.contextLoader ?? this.contextLoader,
|
1534
1534
|
});
|
1535
1535
|
}
|
1536
|
+
traverseCollection(collection, options = {}) {
|
1537
|
+
return traverseCollection(collection, {
|
1538
|
+
documentLoader: options.documentLoader ?? this.documentLoader,
|
1539
|
+
contextLoader: options.contextLoader ?? this.contextLoader,
|
1540
|
+
});
|
1541
|
+
}
|
1536
1542
|
async sendActivity(sender, recipients, activity, options = {}) {
|
1537
1543
|
let keys;
|
1538
1544
|
let identifier = null;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
{
|
2
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
3
|
+
"id": "https://example.com/collection",
|
4
|
+
"type": "OrderedCollection",
|
5
|
+
"orderedItems": [
|
6
|
+
{
|
7
|
+
"type": "Note",
|
8
|
+
"content": "This is a simple note"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"type": "Note",
|
12
|
+
"content": "This is another simple note"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
"type": "Note",
|
16
|
+
"content": "This is a third simple note"
|
17
|
+
}
|
18
|
+
]
|
19
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
{
|
2
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
3
|
+
"id": "https://example.com/collection",
|
4
|
+
"type": "OrderedCollectionPage",
|
5
|
+
"partOf": "https://example.com/paged-collection",
|
6
|
+
"next": "https://example.com/paged/b",
|
7
|
+
"orderedItems": [
|
8
|
+
{
|
9
|
+
"type": "Note",
|
10
|
+
"content": "This is a simple note"
|
11
|
+
}
|
12
|
+
]
|
13
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
3
|
+
"id": "https://example.com/collection",
|
4
|
+
"type": "OrderedCollectionPage",
|
5
|
+
"partOf": "https://example.com/paged-collection",
|
6
|
+
"orderedItems": [
|
7
|
+
{
|
8
|
+
"type": "Note",
|
9
|
+
"content": "This is another simple note"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"type": "Note",
|
13
|
+
"content": "This is a third simple note"
|
14
|
+
}
|
15
|
+
]
|
16
|
+
}
|
package/esm/vocab/lookup.js
CHANGED
@@ -89,3 +89,39 @@ export async function lookupObject(identifier, options = {}) {
|
|
89
89
|
throw error;
|
90
90
|
}
|
91
91
|
}
|
92
|
+
/**
|
93
|
+
* Traverses a collection, yielding each item in the collection.
|
94
|
+
* If the collection is paginated, it will fetch the next page
|
95
|
+
* automatically.
|
96
|
+
*
|
97
|
+
* @example
|
98
|
+
* ``` typescript
|
99
|
+
* const collection = await lookupObject(collectionUrl);
|
100
|
+
* if (collection instanceof Collection) {
|
101
|
+
* for await (const item of traverseCollection(collection)) {
|
102
|
+
* console.log(item.id?.href);
|
103
|
+
* }
|
104
|
+
* }
|
105
|
+
* ```
|
106
|
+
*
|
107
|
+
* @param collection The collection to traverse.
|
108
|
+
* @param options Options for traversing the collection.
|
109
|
+
* @returns An async iterable of each item in the collection.
|
110
|
+
* @since 1.1.0
|
111
|
+
*/
|
112
|
+
export async function* traverseCollection(collection, options = {}) {
|
113
|
+
if (collection.firstId == null) {
|
114
|
+
for await (const item of collection.getItems(options)) {
|
115
|
+
yield item;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
else {
|
119
|
+
let page = await collection.getFirst(options);
|
120
|
+
while (page != null) {
|
121
|
+
for await (const item of page.getItems(options)) {
|
122
|
+
yield item;
|
123
|
+
}
|
124
|
+
page = await page.getNext(options);
|
125
|
+
}
|
126
|
+
}
|
127
|
+
}
|
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/http/1.0.
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/http/1.0.8/_negotiation/common.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvB;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,MAAM,CAQnE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAEpD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/http/1.0.
|
1
|
+
{"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/http/1.0.8/_negotiation/encoding.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AA8GH;;qCAEqC;AACrC,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,MAAM,EAAE,GAClB,MAAM,EAAE,CAkBV"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/http/1.0.
|
1
|
+
{"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/http/1.0.8/_negotiation/language.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAkGH,wBAAgB,kBAAkB,CAChC,MAAM,SAAM,EACZ,QAAQ,CAAC,EAAE,MAAM,EAAE,GAClB,MAAM,EAAE,CAiBV"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"media_type.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/http/1.0.
|
1
|
+
{"version":3,"file":"media_type.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/http/1.0.8/_negotiation/media_type.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAiJH,wBAAgB,mBAAmB,CACjC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,EACtB,QAAQ,CAAC,EAAE,MAAM,EAAE,GAClB,MAAM,EAAE,CAkBV"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"negotiation.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/http/1.0.
|
1
|
+
{"version":3,"file":"negotiation.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/http/1.0.8/negotiation.ts"],"names":[],"mappings":";AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,MAAM,EAAE,CAAC;AACrE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,OAAO,CACrB,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,EACjC,GAAG,KAAK,EAAE,MAAM,EAAE,GACjB,MAAM,GAAG,SAAS,CAAC;AAatB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,MAAM,EAAE,CAAC;AAC9E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,EACjC,GAAG,SAAS,EAAE,MAAM,EAAE,GACrB,MAAM,GAAG,SAAS,CAAC;AAetB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,MAAM,EAAE,CAAC;AAC9E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,EACjC,GAAG,KAAK,EAAE,MAAM,EAAE,GACjB,MAAM,GAAG,SAAS,CAAC"}
|
@@ -3,8 +3,8 @@
|
|
3
3
|
import * as dntShim from "../_dnt.shims.js";
|
4
4
|
import type { DocumentLoader } from "../runtime/docloader.js";
|
5
5
|
import type { Actor, Recipient } from "../vocab/actor.js";
|
6
|
-
import type { LookupObjectOptions } from "../vocab/lookup.js";
|
7
|
-
import type { Activity, CryptographicKey, Multikey, Object } from "../vocab/
|
6
|
+
import type { LookupObjectOptions, TraverseCollectionOptions } from "../vocab/lookup.js";
|
7
|
+
import type { Activity, Collection, CryptographicKey, Link, Multikey, Object } from "../vocab/vocab.js";
|
8
8
|
import type { SenderKeyPair } from "./send.js";
|
9
9
|
/**
|
10
10
|
* A context.
|
@@ -213,6 +213,29 @@ export interface Context<TContextData> {
|
|
213
213
|
* @since 0.15.0
|
214
214
|
*/
|
215
215
|
lookupObject(identifier: string | URL, options?: LookupObjectOptions): Promise<Object | null>;
|
216
|
+
/**
|
217
|
+
* Traverses a collection, yielding each item in the collection.
|
218
|
+
* If the collection is paginated, it will fetch the next page
|
219
|
+
* automatically.
|
220
|
+
*
|
221
|
+
* @example
|
222
|
+
* ``` typescript
|
223
|
+
* const collection = await ctx.lookupObject(collectionUrl);
|
224
|
+
* if (collection instanceof Collection) {
|
225
|
+
* for await (const item of ctx.traverseCollection(collection)) {
|
226
|
+
* console.log(item.id?.href);
|
227
|
+
* }
|
228
|
+
* }
|
229
|
+
* ```
|
230
|
+
*
|
231
|
+
* It's almost the same as the {@link traverseCollection} function, but it
|
232
|
+
* uses the context's document loader and context loader by default.
|
233
|
+
* @param collection The collection to traverse.
|
234
|
+
* @param options Options for traversing the collection.
|
235
|
+
* @returns An async iterable of each item in the collection.
|
236
|
+
* @since 1.1.0
|
237
|
+
*/
|
238
|
+
traverseCollection(collection: Collection, options?: TraverseCollectionOptions): AsyncIterable<Object | Link>;
|
216
239
|
/**
|
217
240
|
* Sends an activity to recipients' inboxes.
|
218
241
|
* @param sender The sender's identifier or the sender's username or
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/federation/context.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/federation/context.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,IAAI,EACJ,QAAQ,EACR,MAAM,EACP,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,OAAO,CAAC,YAAY;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,GAAG,EAAE,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE;;;;;;;OAOG;IACH,cAAc,EAAE,OAAO,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAa,SAAQ,OAAO,CAAC,aAAa;IACzD;;OAEG;IACH,KAAK,EAAE,GAAG,CAAC;IAEX;;OAEG;IACH,gBAAgB,EAAE,gBAAgB,CAAC;IAEnC;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;CACpB"}
|
@@ -3,8 +3,8 @@
|
|
3
3
|
import * as dntShim from "../_dnt.shims.js";
|
4
4
|
import { type AuthenticatedDocumentLoaderFactory, type DocumentLoader } from "../runtime/docloader.js";
|
5
5
|
import type { Actor, Recipient } from "../vocab/actor.js";
|
6
|
-
import { type LookupObjectOptions } from "../vocab/lookup.js";
|
7
|
-
import { Activity, type Hashtag, type Like, type Object } from "../vocab/vocab.js";
|
6
|
+
import { type LookupObjectOptions, type TraverseCollectionOptions } from "../vocab/lookup.js";
|
7
|
+
import { Activity, type Collection, type Hashtag, type Like, type Link, type Object } from "../vocab/vocab.js";
|
8
8
|
import type { ActorDispatcher, ActorHandleMapper, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionDispatcher, InboxErrorHandler, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectDispatcher, OutboxErrorHandler, SharedInboxKeyDispatcher } from "./callback.js";
|
9
9
|
import type { ActorKeyPair, Context, ForwardActivityOptions, InboxContext, ParseUriResult, RequestContext, SendActivityOptions } from "./context.js";
|
10
10
|
import type { ActorCallbackSetters, CollectionCallbackSetters, Federation, FederationFetchOptions, FederationStartQueueOptions, InboxListenerSetters, ObjectCallbackSetters } from "./federation.js";
|
@@ -274,6 +274,7 @@ export declare class ContextImpl<TContextData> implements Context<TContextData>
|
|
274
274
|
}): Promise<DocumentLoader>;
|
275
275
|
getDocumentLoader(identity: SenderKeyPair): DocumentLoader;
|
276
276
|
lookupObject(identifier: string | URL, options?: LookupObjectOptions): Promise<Object | null>;
|
277
|
+
traverseCollection(collection: Collection, options?: TraverseCollectionOptions): AsyncIterable<Object | Link>;
|
277
278
|
sendActivity(sender: SenderKeyPair | SenderKeyPair[] | {
|
278
279
|
identifier: string;
|
279
280
|
} | {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../src/federation/middleware.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EACL,KAAK,kCAAkC,EACvC,KAAK,cAAc,EAIpB,MAAM,yBAAyB,CAAC;AAMjC,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAgB,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EACL,QAAQ,EAER,KAAK,OAAO,EACZ,KAAK,IAAI,EAET,KAAK,MAAM,EACZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAGlB,oBAAoB,EACpB,iBAAiB,EAEjB,kBAAkB,EAClB,wBAAwB,EACxB,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EACV,YAAY,EACZ,OAAO,EACP,sBAAsB,EACtB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,mBAAmB,EACpB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,oBAAoB,EACpB,yBAAyB,EACzB,UAAU,EACV,sBAAsB,EACtB,2BAA2B,EAC3B,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,KAAK,mBAAmB,EAKzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,K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B,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;CACrE;AAED,UAAU,2BAA2B,CAAC,YAAY,CAChD,SAAQ,mBAAmB;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,YAAY,CAAC;CAC3B"}
|
package/types/vocab/lookup.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import { type DocumentLoader } from "../runtime/docloader.js";
|
3
|
-
import { Object } from "./vocab.js";
|
3
|
+
import { type Collection, type Link, Object } from "./vocab.js";
|
4
4
|
/**
|
5
|
-
* Options for the
|
5
|
+
* Options for the {@link lookupObject} function.
|
6
6
|
*
|
7
7
|
* @since 0.2.0
|
8
8
|
*/
|
@@ -50,4 +50,39 @@ export interface LookupObjectOptions {
|
|
50
50
|
* @since 0.2.0
|
51
51
|
*/
|
52
52
|
export declare function lookupObject(identifier: string | URL, options?: LookupObjectOptions): Promise<Object | null>;
|
53
|
+
/**
|
54
|
+
* Options for the {@link traverseCollection} function.
|
55
|
+
* @since 1.1.0
|
56
|
+
*/
|
57
|
+
export interface TraverseCollectionOptions {
|
58
|
+
/**
|
59
|
+
* The document loader for loading remote JSON-LD documents.
|
60
|
+
*/
|
61
|
+
documentLoader?: DocumentLoader;
|
62
|
+
/**
|
63
|
+
* The context loader for loading remote JSON-LD contexts.
|
64
|
+
*/
|
65
|
+
contextLoader?: DocumentLoader;
|
66
|
+
}
|
67
|
+
/**
|
68
|
+
* Traverses a collection, yielding each item in the collection.
|
69
|
+
* If the collection is paginated, it will fetch the next page
|
70
|
+
* automatically.
|
71
|
+
*
|
72
|
+
* @example
|
73
|
+
* ``` typescript
|
74
|
+
* const collection = await lookupObject(collectionUrl);
|
75
|
+
* if (collection instanceof Collection) {
|
76
|
+
* for await (const item of traverseCollection(collection)) {
|
77
|
+
* console.log(item.id?.href);
|
78
|
+
* }
|
79
|
+
* }
|
80
|
+
* ```
|
81
|
+
*
|
82
|
+
* @param collection The collection to traverse.
|
83
|
+
* @param options Options for traversing the collection.
|
84
|
+
* @returns An async iterable of each item in the collection.
|
85
|
+
* @since 1.1.0
|
86
|
+
*/
|
87
|
+
export declare function traverseCollection(collection: Collection, options?: TraverseCollectionOptions): AsyncIterable<Object | Link>;
|
53
88
|
//# sourceMappingURL=lookup.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../src/vocab/lookup.ts"],"names":[],"mappings":";AACA,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;
|
1
|
+
{"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../src/vocab/lookup.ts"],"names":[],"mappings":";AACA,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,IAAI,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAIhE;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC;;;OAGG;IACH,aAAa,CAAC,EAAE,cAAc,CAAC;CAChC;AAKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,YAAY,CAChC,UAAU,EAAE,MAAM,GAAG,GAAG,EACxB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAiDxB;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC;;OAEG;IACH,aAAa,CAAC,EAAE,cAAc,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAuB,kBAAkB,CACvC,UAAU,EAAE,UAAU,EACtB,OAAO,GAAE,yBAA8B,GACtC,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC,CAc9B"}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|