@fedify/vocab-runtime 2.2.8 → 2.2.10

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/vocab-runtime",
3
- "version": "2.2.8",
3
+ "version": "2.2.10",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./src/mod.ts",
package/dist/mod.cjs CHANGED
@@ -486,6 +486,16 @@ var fep_5711_default = { "@context": {
486
486
  }
487
487
  } };
488
488
  //#endregion
489
+ //#region src/contexts/fep-ef61.json
490
+ var fep_ef61_default = { "@context": {
491
+ "gateways": {
492
+ "@id": "https://w3id.org/fep/ef61/gateways",
493
+ "@type": "@id",
494
+ "@container": "@list"
495
+ },
496
+ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase"
497
+ } };
498
+ //#endregion
489
499
  //#region src/contexts/gotosocial.json
490
500
  var gotosocial_default = { "@context": {
491
501
  "xsd": "http://www.w3.org/2001/XMLSchema#",
@@ -782,6 +792,19 @@ var joinmastodon_default = { "@context": {
782
792
  }
783
793
  } };
784
794
  //#endregion
795
+ //#region src/contexts/miscellany.json
796
+ var miscellany_default = { "@context": {
797
+ "as": "https://www.w3.org/ns/activitystreams#",
798
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
799
+ "Hashtag": "as:Hashtag",
800
+ "manuallyApprovesFollowers": { "@id": "as:manuallyApprovesFollowers" },
801
+ "movedTo": {
802
+ "@id": "as:movedTo",
803
+ "@type": "@id"
804
+ },
805
+ "sensitive": { "@id": "as:sensitive" }
806
+ } };
807
+ //#endregion
785
808
  //#region src/contexts/schemaorg.json
786
809
  var schemaorg_default = { "@context": {
787
810
  "type": "@type",
@@ -4378,13 +4401,15 @@ const preloadedContexts = {
4378
4401
  "http://schema.org/": schemaorg_default,
4379
4402
  "https://gotosocial.org/ns": gotosocial_default,
4380
4403
  "https://w3id.org/fep/5711": fep_5711_default,
4404
+ "https://w3id.org/fep/ef61": fep_ef61_default,
4381
4405
  "https://join-lemmy.org/context.json": join_lemmy_default,
4382
- "http://joinmastodon.org/ns": joinmastodon_default
4406
+ "http://joinmastodon.org/ns": joinmastodon_default,
4407
+ "https://purl.archive.org/miscellany": miscellany_default
4383
4408
  };
4384
4409
  //#endregion
4385
4410
  //#region deno.json
4386
4411
  var name = "@fedify/vocab-runtime";
4387
- var version = "2.2.8";
4412
+ var version = "2.2.10";
4388
4413
  //#endregion
4389
4414
  //#region src/link.ts
4390
4415
  const parametersNeedLowerCase = ["rel", "type"];
@@ -4952,6 +4977,7 @@ async function getRemoteDocument(url, response, fetch) {
4952
4977
  * - <https://w3id.org/security/data-integrity/v1>
4953
4978
  * - <https://www.w3.org/ns/did/v1>
4954
4979
  * - <https://w3id.org/security/multikey/v1>
4980
+ * - <https://w3id.org/fep/ef61>
4955
4981
  * - <https://purl.archive.org/socialweb/webfinger>
4956
4982
  * - <http://schema.org/>
4957
4983
  * @param options Options for the document loader.
package/dist/mod.d.cts CHANGED
@@ -189,6 +189,7 @@ interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
189
189
  * - <https://w3id.org/security/data-integrity/v1>
190
190
  * - <https://www.w3.org/ns/did/v1>
191
191
  * - <https://w3id.org/security/multikey/v1>
192
+ * - <https://w3id.org/fep/ef61>
192
193
  * - <https://purl.archive.org/socialweb/webfinger>
193
194
  * - <http://schema.org/>
194
195
  * @param options Options for the document loader.
package/dist/mod.d.ts CHANGED
@@ -188,6 +188,7 @@ interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
188
188
  * - <https://w3id.org/security/data-integrity/v1>
189
189
  * - <https://www.w3.org/ns/did/v1>
190
190
  * - <https://w3id.org/security/multikey/v1>
191
+ * - <https://w3id.org/fep/ef61>
191
192
  * - <https://purl.archive.org/socialweb/webfinger>
192
193
  * - <http://schema.org/>
193
194
  * @param options Options for the document loader.
package/dist/mod.js CHANGED
@@ -482,6 +482,16 @@ var fep_5711_default = { "@context": {
482
482
  }
483
483
  } };
484
484
  //#endregion
485
+ //#region src/contexts/fep-ef61.json
486
+ var fep_ef61_default = { "@context": {
487
+ "gateways": {
488
+ "@id": "https://w3id.org/fep/ef61/gateways",
489
+ "@type": "@id",
490
+ "@container": "@list"
491
+ },
492
+ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase"
493
+ } };
494
+ //#endregion
485
495
  //#region src/contexts/gotosocial.json
486
496
  var gotosocial_default = { "@context": {
487
497
  "xsd": "http://www.w3.org/2001/XMLSchema#",
@@ -778,6 +788,19 @@ var joinmastodon_default = { "@context": {
778
788
  }
779
789
  } };
780
790
  //#endregion
791
+ //#region src/contexts/miscellany.json
792
+ var miscellany_default = { "@context": {
793
+ "as": "https://www.w3.org/ns/activitystreams#",
794
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
795
+ "Hashtag": "as:Hashtag",
796
+ "manuallyApprovesFollowers": { "@id": "as:manuallyApprovesFollowers" },
797
+ "movedTo": {
798
+ "@id": "as:movedTo",
799
+ "@type": "@id"
800
+ },
801
+ "sensitive": { "@id": "as:sensitive" }
802
+ } };
803
+ //#endregion
781
804
  //#region src/contexts/schemaorg.json
782
805
  var schemaorg_default = { "@context": {
783
806
  "type": "@type",
@@ -4374,13 +4397,15 @@ const preloadedContexts = {
4374
4397
  "http://schema.org/": schemaorg_default,
4375
4398
  "https://gotosocial.org/ns": gotosocial_default,
4376
4399
  "https://w3id.org/fep/5711": fep_5711_default,
4400
+ "https://w3id.org/fep/ef61": fep_ef61_default,
4377
4401
  "https://join-lemmy.org/context.json": join_lemmy_default,
4378
- "http://joinmastodon.org/ns": joinmastodon_default
4402
+ "http://joinmastodon.org/ns": joinmastodon_default,
4403
+ "https://purl.archive.org/miscellany": miscellany_default
4379
4404
  };
4380
4405
  //#endregion
4381
4406
  //#region deno.json
4382
4407
  var name = "@fedify/vocab-runtime";
4383
- var version = "2.2.8";
4408
+ var version = "2.2.10";
4384
4409
  //#endregion
4385
4410
  //#region src/link.ts
4386
4411
  const parametersNeedLowerCase = ["rel", "type"];
@@ -4948,6 +4973,7 @@ async function getRemoteDocument(url, response, fetch) {
4948
4973
  * - <https://w3id.org/security/data-integrity/v1>
4949
4974
  * - <https://www.w3.org/ns/did/v1>
4950
4975
  * - <https://w3id.org/security/multikey/v1>
4976
+ * - <https://w3id.org/fep/ef61>
4951
4977
  * - <https://purl.archive.org/socialweb/webfinger>
4952
4978
  * - <http://schema.org/>
4953
4979
  * @param options Options for the document loader.
@@ -1,5 +1,5 @@
1
1
  require("./chunk-Do9eywBl.cjs");
2
- require("./docloader-yj9VGANT.cjs");
2
+ require("./docloader-CvVol5B7.cjs");
3
3
  require("./url-CWU5HT3Y.cjs");
4
4
  require("./key-DTTIntwb.cjs");
5
5
  require("./multibase-F7LtMMsK.cjs");
@@ -1,4 +1,4 @@
1
- import "./docloader-CX1mRgBh.mjs";
1
+ import "./docloader-DxI8oOYL.mjs";
2
2
  import "./url-o0e-aXQY.mjs";
3
3
  import "./key-BeTHFQJK.mjs";
4
4
  import "./multibase-BgU9XRf7.mjs";
@@ -1,5 +1,5 @@
1
1
  require("./chunk-Do9eywBl.cjs");
2
- const require_request = require("./request-BOX7nq1q.cjs");
2
+ const require_request = require("./request-CLVea0Oi.cjs");
3
3
  const require_link = require("./link-FguCydMA.cjs");
4
4
  const require_url = require("./url-CWU5HT3Y.cjs");
5
5
  let _logtape_logtape = require("@logtape/logtape");
@@ -476,6 +476,16 @@ var fep_5711_default = { "@context": {
476
476
  }
477
477
  } };
478
478
  //#endregion
479
+ //#region src/contexts/fep-ef61.json
480
+ var fep_ef61_default = { "@context": {
481
+ "gateways": {
482
+ "@id": "https://w3id.org/fep/ef61/gateways",
483
+ "@type": "@id",
484
+ "@container": "@list"
485
+ },
486
+ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase"
487
+ } };
488
+ //#endregion
479
489
  //#region src/contexts/gotosocial.json
480
490
  var gotosocial_default = { "@context": {
481
491
  "xsd": "http://www.w3.org/2001/XMLSchema#",
@@ -772,6 +782,19 @@ var joinmastodon_default = { "@context": {
772
782
  }
773
783
  } };
774
784
  //#endregion
785
+ //#region src/contexts/miscellany.json
786
+ var miscellany_default = { "@context": {
787
+ "as": "https://www.w3.org/ns/activitystreams#",
788
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
789
+ "Hashtag": "as:Hashtag",
790
+ "manuallyApprovesFollowers": { "@id": "as:manuallyApprovesFollowers" },
791
+ "movedTo": {
792
+ "@id": "as:movedTo",
793
+ "@type": "@id"
794
+ },
795
+ "sensitive": { "@id": "as:sensitive" }
796
+ } };
797
+ //#endregion
775
798
  //#region src/contexts/schemaorg.json
776
799
  var schemaorg_default = { "@context": {
777
800
  "type": "@type",
@@ -4368,8 +4391,10 @@ const preloadedContexts = {
4368
4391
  "http://schema.org/": schemaorg_default,
4369
4392
  "https://gotosocial.org/ns": gotosocial_default,
4370
4393
  "https://w3id.org/fep/5711": fep_5711_default,
4394
+ "https://w3id.org/fep/ef61": fep_ef61_default,
4371
4395
  "https://join-lemmy.org/context.json": join_lemmy_default,
4372
- "http://joinmastodon.org/ns": joinmastodon_default
4396
+ "http://joinmastodon.org/ns": joinmastodon_default,
4397
+ "https://purl.archive.org/miscellany": miscellany_default
4373
4398
  };
4374
4399
  //#endregion
4375
4400
  //#region src/docloader.ts
@@ -4487,6 +4512,7 @@ async function getRemoteDocument(url, response, fetch) {
4487
4512
  * - <https://w3id.org/security/data-integrity/v1>
4488
4513
  * - <https://www.w3.org/ns/did/v1>
4489
4514
  * - <https://w3id.org/security/multikey/v1>
4515
+ * - <https://w3id.org/fep/ef61>
4490
4516
  * - <https://purl.archive.org/socialweb/webfinger>
4491
4517
  * - <http://schema.org/>
4492
4518
  * @param options Options for the document loader.
@@ -1,4 +1,4 @@
1
- import { a as name, i as logRequest, n as createActivityPubRequest, o as version, t as FetchError } from "./request-CoxDPWoc.mjs";
1
+ import { a as name, i as logRequest, n as createActivityPubRequest, o as version, t as FetchError } from "./request-Dx7pBE1u.mjs";
2
2
  import { t as HttpHeaderLink } from "./link-NUUWCdnK.mjs";
3
3
  import { o as validatePublicUrl, t as UrlError } from "./url-o0e-aXQY.mjs";
4
4
  import { getLogger } from "@logtape/logtape";
@@ -475,6 +475,16 @@ var fep_5711_default = { "@context": {
475
475
  }
476
476
  } };
477
477
  //#endregion
478
+ //#region src/contexts/fep-ef61.json
479
+ var fep_ef61_default = { "@context": {
480
+ "gateways": {
481
+ "@id": "https://w3id.org/fep/ef61/gateways",
482
+ "@type": "@id",
483
+ "@container": "@list"
484
+ },
485
+ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase"
486
+ } };
487
+ //#endregion
478
488
  //#region src/contexts/gotosocial.json
479
489
  var gotosocial_default = { "@context": {
480
490
  "xsd": "http://www.w3.org/2001/XMLSchema#",
@@ -771,6 +781,19 @@ var joinmastodon_default = { "@context": {
771
781
  }
772
782
  } };
773
783
  //#endregion
784
+ //#region src/contexts/miscellany.json
785
+ var miscellany_default = { "@context": {
786
+ "as": "https://www.w3.org/ns/activitystreams#",
787
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
788
+ "Hashtag": "as:Hashtag",
789
+ "manuallyApprovesFollowers": { "@id": "as:manuallyApprovesFollowers" },
790
+ "movedTo": {
791
+ "@id": "as:movedTo",
792
+ "@type": "@id"
793
+ },
794
+ "sensitive": { "@id": "as:sensitive" }
795
+ } };
796
+ //#endregion
774
797
  //#region src/contexts/schemaorg.json
775
798
  var schemaorg_default = { "@context": {
776
799
  "type": "@type",
@@ -4367,8 +4390,10 @@ const preloadedContexts = {
4367
4390
  "http://schema.org/": schemaorg_default,
4368
4391
  "https://gotosocial.org/ns": gotosocial_default,
4369
4392
  "https://w3id.org/fep/5711": fep_5711_default,
4393
+ "https://w3id.org/fep/ef61": fep_ef61_default,
4370
4394
  "https://join-lemmy.org/context.json": join_lemmy_default,
4371
- "http://joinmastodon.org/ns": joinmastodon_default
4395
+ "http://joinmastodon.org/ns": joinmastodon_default,
4396
+ "https://purl.archive.org/miscellany": miscellany_default
4372
4397
  };
4373
4398
  //#endregion
4374
4399
  //#region src/docloader.ts
@@ -4486,6 +4511,7 @@ async function getRemoteDocument(url, response, fetch) {
4486
4511
  * - <https://w3id.org/security/data-integrity/v1>
4487
4512
  * - <https://www.w3.org/ns/did/v1>
4488
4513
  * - <https://w3id.org/security/multikey/v1>
4514
+ * - <https://w3id.org/fep/ef61>
4489
4515
  * - <https://purl.archive.org/socialweb/webfinger>
4490
4516
  * - <http://schema.org/>
4491
4517
  * @param options Options for the document loader.
@@ -1,6 +1,6 @@
1
1
  const require_chunk = require("./chunk-Do9eywBl.cjs");
2
- const require_docloader = require("./docloader-yj9VGANT.cjs");
3
- const require_request = require("./request-BOX7nq1q.cjs");
2
+ const require_docloader = require("./docloader-CvVol5B7.cjs");
3
+ const require_request = require("./request-CLVea0Oi.cjs");
4
4
  const require_url = require("./url-CWU5HT3Y.cjs");
5
5
  let node_assert = require("node:assert");
6
6
  let node_test = require("node:test");
@@ -1431,6 +1431,22 @@ var esm_default = new class FetchMock {
1431
1431
  document
1432
1432
  });
1433
1433
  });
1434
+ await t.test("preloaded FEP-ef61 context", async () => {
1435
+ const url = "https://w3id.org/fep/ef61";
1436
+ (0, node_assert.ok)(url in require_docloader.preloadedContexts);
1437
+ (0, node_assert.deepStrictEqual)(await fetchDocumentLoader(url), {
1438
+ contextUrl: null,
1439
+ documentUrl: url,
1440
+ document: { "@context": {
1441
+ gateways: {
1442
+ "@id": "https://w3id.org/fep/ef61/gateways",
1443
+ "@type": "@id",
1444
+ "@container": "@list"
1445
+ },
1446
+ digestMultibase: "https://www.w3.org/ns/credentials/v2#digestMultibase"
1447
+ } }
1448
+ });
1449
+ });
1434
1450
  await t.test("deny non-HTTP/HTTPS", async () => {
1435
1451
  await (0, node_assert.rejects)(() => fetchDocumentLoader("ftp://localhost"), require_url.UrlError);
1436
1452
  });
@@ -1,5 +1,5 @@
1
- import { n as preloadedContexts, t as getDocumentLoader } from "./docloader-CX1mRgBh.mjs";
2
- import { t as FetchError } from "./request-CoxDPWoc.mjs";
1
+ import { n as preloadedContexts, t as getDocumentLoader } from "./docloader-DxI8oOYL.mjs";
2
+ import { t as FetchError } from "./request-Dx7pBE1u.mjs";
3
3
  import { t as UrlError } from "./url-o0e-aXQY.mjs";
4
4
  import { deepStrictEqual, ok, rejects } from "node:assert";
5
5
  import { test } from "node:test";
@@ -1450,6 +1450,22 @@ test("getDocumentLoader()", async (t) => {
1450
1450
  document
1451
1451
  });
1452
1452
  });
1453
+ await t.test("preloaded FEP-ef61 context", async () => {
1454
+ const url = "https://w3id.org/fep/ef61";
1455
+ ok(url in preloadedContexts);
1456
+ deepStrictEqual(await fetchDocumentLoader(url), {
1457
+ contextUrl: null,
1458
+ documentUrl: url,
1459
+ document: { "@context": {
1460
+ gateways: {
1461
+ "@id": "https://w3id.org/fep/ef61/gateways",
1462
+ "@type": "@id",
1463
+ "@container": "@list"
1464
+ },
1465
+ digestMultibase: "https://www.w3.org/ns/credentials/v2#digestMultibase"
1466
+ } }
1467
+ });
1468
+ });
1453
1469
  await t.test("deny non-HTTP/HTTPS", async () => {
1454
1470
  await rejects(() => fetchDocumentLoader("ftp://localhost"), UrlError);
1455
1471
  });
@@ -3,7 +3,7 @@ let node_process = require("node:process");
3
3
  node_process = require_chunk.__toESM(node_process);
4
4
  //#region deno.json
5
5
  var name = "@fedify/vocab-runtime";
6
- var version = "2.2.8";
6
+ var version = "2.2.10";
7
7
  //#endregion
8
8
  //#region src/request.ts
9
9
  /**
@@ -1,7 +1,7 @@
1
1
  import process from "node:process";
2
2
  //#region deno.json
3
3
  var name = "@fedify/vocab-runtime";
4
- var version = "2.2.8";
4
+ var version = "2.2.10";
5
5
  //#endregion
6
6
  //#region src/request.ts
7
7
  /**
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Do9eywBl.cjs");
2
- const require_request = require("./request-BOX7nq1q.cjs");
2
+ const require_request = require("./request-CLVea0Oi.cjs");
3
3
  let node_assert = require("node:assert");
4
4
  let node_test = require("node:test");
5
5
  let node_process = require("node:process");
@@ -1,4 +1,4 @@
1
- import { o as version, r as getUserAgent } from "./request-CoxDPWoc.mjs";
1
+ import { o as version, r as getUserAgent } from "./request-Dx7pBE1u.mjs";
2
2
  import { deepStrictEqual } from "node:assert";
3
3
  import { test } from "node:test";
4
4
  import process from "node:process";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/vocab-runtime",
3
- "version": "2.2.8",
3
+ "version": "2.2.10",
4
4
  "homepage": "https://fedify.dev/",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,10 @@
1
+ {
2
+ "@context": {
3
+ "gateways": {
4
+ "@id": "https://w3id.org/fep/ef61/gateways",
5
+ "@type": "@id",
6
+ "@container": "@list"
7
+ },
8
+ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase"
9
+ }
10
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "@context": {
3
+ "as": "https://www.w3.org/ns/activitystreams#",
4
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
5
+ "Hashtag": "as:Hashtag",
6
+ "manuallyApprovesFollowers": {
7
+ "@id": "as:manuallyApprovesFollowers"
8
+ },
9
+ "movedTo": {
10
+ "@id": "as:movedTo",
11
+ "@type": "@id"
12
+ },
13
+ "sensitive": {
14
+ "@id": "as:sensitive"
15
+ }
16
+ }
17
+ }
package/src/contexts.ts CHANGED
@@ -7,10 +7,12 @@ import activitystreams from "./contexts/activitystreams.json" with {
7
7
  };
8
8
  import didV1 from "./contexts/did-v1.json" with { type: "json" };
9
9
  import fep5711 from "./contexts/fep-5711.json" with { type: "json" };
10
+ import fepEf61 from "./contexts/fep-ef61.json" with { type: "json" };
10
11
  import gotosocial from "./contexts/gotosocial.json" with { type: "json" };
11
12
  import identityV1 from "./contexts/identity-v1.json" with { type: "json" };
12
13
  import joinLemmyContext from "./contexts/join-lemmy.json" with { type: "json" };
13
14
  import joinmastodon from "./contexts/joinmastodon.json" with { type: "json" };
15
+ import miscellany from "./contexts/miscellany.json" with { type: "json" };
14
16
  import schemaorg from "./contexts/schemaorg.json" with { type: "json" };
15
17
  import securityDataIntegrityV1 from "./contexts/security-data-integrity-v1.json" with {
16
18
  type: "json",
@@ -36,6 +38,15 @@ const preloadedContexts: Record<string, unknown> = {
36
38
  "https://gotosocial.org/ns": gotosocial,
37
39
  "https://w3id.org/fep/5711": fep5711,
38
40
 
41
+ // The FEP-ef61 context. The w3id.org URL redirects to Codeberg Pages, which
42
+ // suffers recurring outages; while it is unreachable, every document
43
+ // referencing this URL fails JSON-LD expansion before application handlers
44
+ // run. We ship a built-in copy so that portable objects can be processed
45
+ // without depending on the availability of the remote context server.
46
+ // See: https://w3id.org/fep/ef61
47
+ // https://github.com/fedify-dev/fedify/issues/982
48
+ "https://w3id.org/fep/ef61": fepEf61,
49
+
39
50
  // Lemmy's context document is served as application/json without the JSON-LD
40
51
  // context Link header. The default document loader treats that as a regular
41
52
  // JSON response instead of a JSON-LD context, so every Lemmy activity that
@@ -55,6 +66,18 @@ const preloadedContexts: Record<string, unknown> = {
55
66
  // See: https://github.com/mastodon/joinmastodon/issues/148
56
67
  // https://github.com/fedify-dev/fedify/issues/630
57
68
  "http://joinmastodon.org/ns": joinmastodon,
69
+
70
+ // The SWICG "ActivityPub Miscellaneous Terms" context. Bridgy Fed (via
71
+ // granary) references this URL in the @context of every activity it sends,
72
+ // and other implementations use it as the recommended home for widely
73
+ // deployed extension terms like as:Hashtag and as:sensitive. It is served
74
+ // through purl.archive.org (Internet Archive's PURL service), which suffers
75
+ // recurring outages; while it is unreachable, every activity referencing
76
+ // this URL fails JSON-LD expansion before application handlers run. The
77
+ // document is a deliberately stable, versioned SWICG deliverable, so we
78
+ // ship a built-in copy.
79
+ // See: https://swicg.github.io/miscellany/
80
+ "https://purl.archive.org/miscellany": miscellany,
58
81
  };
59
82
 
60
83
  export default preloadedContexts;
@@ -293,6 +293,31 @@ test("getDocumentLoader()", async (t) => {
293
293
  }
294
294
  });
295
295
 
296
+ // The <https://w3id.org/fep/ef61> URL redirects to a Codeberg Pages host
297
+ // which suffers recurring outages; while it is unreachable, expanding any
298
+ // document referencing it fails before application handlers run. It has to
299
+ // be resolved from the built-in copy rather than over the network.
300
+ // See: https://github.com/fedify-dev/fedify/issues/982
301
+ await t.test("preloaded FEP-ef61 context", async () => {
302
+ const url = "https://w3id.org/fep/ef61";
303
+ ok(url in preloadedContexts);
304
+ deepStrictEqual(await fetchDocumentLoader(url), {
305
+ contextUrl: null,
306
+ documentUrl: url,
307
+ document: {
308
+ "@context": {
309
+ gateways: {
310
+ "@id": "https://w3id.org/fep/ef61/gateways",
311
+ "@type": "@id",
312
+ "@container": "@list",
313
+ },
314
+ digestMultibase:
315
+ "https://www.w3.org/ns/credentials/v2#digestMultibase",
316
+ },
317
+ },
318
+ });
319
+ });
320
+
296
321
  await t.test("deny non-HTTP/HTTPS", async () => {
297
322
  await rejects(
298
323
  () => fetchDocumentLoader("ftp://localhost"),
package/src/docloader.ts CHANGED
@@ -285,6 +285,7 @@ export interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
285
285
  * - <https://w3id.org/security/data-integrity/v1>
286
286
  * - <https://www.w3.org/ns/did/v1>
287
287
  * - <https://w3id.org/security/multikey/v1>
288
+ * - <https://w3id.org/fep/ef61>
288
289
  * - <https://purl.archive.org/socialweb/webfinger>
289
290
  * - <http://schema.org/>
290
291
  * @param options Options for the document loader.