@fedify/vocab 2.4.0-dev.2056 → 2.4.0-dev.2065
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/deno.json +1 -1
- package/dist/mod.cjs +16674 -9026
- package/dist/mod.d.cts +28 -2
- package/dist/mod.d.ts +28 -2
- package/dist/mod.js +16675 -9027
- package/dist-tests/{actor-BgeBgt_8.mjs → actor-B0IFZjgb.mjs} +2 -2
- package/dist-tests/actor.test.mjs +3 -3
- package/dist-tests/{esm-Df0Yo-Tp.mjs → esm-C9nxP5_e.mjs} +1 -1
- package/dist-tests/gateway.test.mjs +695 -7
- package/dist-tests/{lookup-C13R72YU.mjs → lookup-BnzAXNN7.mjs} +48 -49
- package/dist-tests/lookup.test.mjs +3 -3
- package/dist-tests/portable-lookup.test.mjs +100 -4
- package/dist-tests/signed-representation.test.mjs +1 -1
- package/dist-tests/translation.test.mjs +3 -3
- package/dist-tests/type.test.mjs +1 -1
- package/dist-tests/{vocab-BJGPw--L.mjs → vocab-BHtBRusa.mjs} +16631 -8982
- package/dist-tests/vocab.test.mjs +1 -1
- package/package.json +4 -4
- package/src/gateway.test.ts +980 -7
- package/src/lookup.ts +114 -65
- package/src/portable-lookup.test.ts +133 -0
package/dist/mod.d.cts
CHANGED
|
@@ -21151,8 +21151,11 @@ interface LookupObjectOptions {
|
|
|
21151
21151
|
* whether they are looked up directly or found in the `self` links of
|
|
21152
21152
|
* a WebFinger response, are fetched through FEP-ef61 gateways. A fetched
|
|
21153
21153
|
* portable object is returned only if its `@id` identifies the requested
|
|
21154
|
-
* portable object and this function accepts it.
|
|
21155
|
-
*
|
|
21154
|
+
* portable object and this function accepts it. A document fetched from
|
|
21155
|
+
* an ordinary HTTP(S) URL is checked the same way if its final URL or its
|
|
21156
|
+
* `@id` is a portable or compatible identifier, instead of being trusted
|
|
21157
|
+
* because of its origin. Note that `crossOrigin: "trust"` does not skip
|
|
21158
|
+
* these checks.
|
|
21156
21159
|
*
|
|
21157
21160
|
* Without it, portable identifiers are not looked up, and compatible
|
|
21158
21161
|
* identifiers are fetched as ordinary HTTP(S) URLs, whose objects with
|
|
@@ -21228,6 +21231,29 @@ interface TraverseCollectionOptions {
|
|
|
21228
21231
|
* @default `{ seconds: 0 }`
|
|
21229
21232
|
*/
|
|
21230
21233
|
interval?: Temporal.Duration | Temporal.DurationLike;
|
|
21234
|
+
/**
|
|
21235
|
+
* Whether to trust objects whose origin differs from the collection or page
|
|
21236
|
+
* that refers to them. See the `crossOrigin` option of property accessors
|
|
21237
|
+
* such as `Collection.getItems()`.
|
|
21238
|
+
* @since 2.4.0
|
|
21239
|
+
*/
|
|
21240
|
+
crossOrigin?: "ignore" | "throw" | "trust";
|
|
21241
|
+
/**
|
|
21242
|
+
* The [FEP-ef61] gateways to fetch portable (`ap:`/`ap+ef61:`) pages and
|
|
21243
|
+
* items through, in order. See the `gateways` option of property
|
|
21244
|
+
* accessors.
|
|
21245
|
+
*
|
|
21246
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
21247
|
+
* @since 2.4.0
|
|
21248
|
+
*/
|
|
21249
|
+
gateways?: readonly (string | URL)[];
|
|
21250
|
+
/**
|
|
21251
|
+
* The policy to apply to portable pages and items fetched through
|
|
21252
|
+
* gateways, typically `verifyPortableObject()` from `@fedify/fedify`.
|
|
21253
|
+
* Portable pages and items are not fetched without it.
|
|
21254
|
+
* @since 2.4.0
|
|
21255
|
+
*/
|
|
21256
|
+
verifyPortableObject?: PortableObjectVerifier;
|
|
21231
21257
|
}
|
|
21232
21258
|
/**
|
|
21233
21259
|
* Traverses a collection, yielding each item in the collection.
|
package/dist/mod.d.ts
CHANGED
|
@@ -21151,8 +21151,11 @@ interface LookupObjectOptions {
|
|
|
21151
21151
|
* whether they are looked up directly or found in the `self` links of
|
|
21152
21152
|
* a WebFinger response, are fetched through FEP-ef61 gateways. A fetched
|
|
21153
21153
|
* portable object is returned only if its `@id` identifies the requested
|
|
21154
|
-
* portable object and this function accepts it.
|
|
21155
|
-
*
|
|
21154
|
+
* portable object and this function accepts it. A document fetched from
|
|
21155
|
+
* an ordinary HTTP(S) URL is checked the same way if its final URL or its
|
|
21156
|
+
* `@id` is a portable or compatible identifier, instead of being trusted
|
|
21157
|
+
* because of its origin. Note that `crossOrigin: "trust"` does not skip
|
|
21158
|
+
* these checks.
|
|
21156
21159
|
*
|
|
21157
21160
|
* Without it, portable identifiers are not looked up, and compatible
|
|
21158
21161
|
* identifiers are fetched as ordinary HTTP(S) URLs, whose objects with
|
|
@@ -21228,6 +21231,29 @@ interface TraverseCollectionOptions {
|
|
|
21228
21231
|
* @default `{ seconds: 0 }`
|
|
21229
21232
|
*/
|
|
21230
21233
|
interval?: Temporal.Duration | Temporal.DurationLike;
|
|
21234
|
+
/**
|
|
21235
|
+
* Whether to trust objects whose origin differs from the collection or page
|
|
21236
|
+
* that refers to them. See the `crossOrigin` option of property accessors
|
|
21237
|
+
* such as `Collection.getItems()`.
|
|
21238
|
+
* @since 2.4.0
|
|
21239
|
+
*/
|
|
21240
|
+
crossOrigin?: "ignore" | "throw" | "trust";
|
|
21241
|
+
/**
|
|
21242
|
+
* The [FEP-ef61] gateways to fetch portable (`ap:`/`ap+ef61:`) pages and
|
|
21243
|
+
* items through, in order. See the `gateways` option of property
|
|
21244
|
+
* accessors.
|
|
21245
|
+
*
|
|
21246
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
21247
|
+
* @since 2.4.0
|
|
21248
|
+
*/
|
|
21249
|
+
gateways?: readonly (string | URL)[];
|
|
21250
|
+
/**
|
|
21251
|
+
* The policy to apply to portable pages and items fetched through
|
|
21252
|
+
* gateways, typically `verifyPortableObject()` from `@fedify/fedify`.
|
|
21253
|
+
* Portable pages and items are not fetched without it.
|
|
21254
|
+
* @since 2.4.0
|
|
21255
|
+
*/
|
|
21256
|
+
verifyPortableObject?: PortableObjectVerifier;
|
|
21231
21257
|
}
|
|
21232
21258
|
/**
|
|
21233
21259
|
* Traverses a collection, yielding each item in the collection.
|