@fedify/vocab-runtime 2.4.0-dev.1832 → 2.4.0-dev.1867

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.4.0-dev.1832+1af9355c",
3
+ "version": "2.4.0-dev.1867+ac08358f",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./src/mod.ts",
package/dist/mod.cjs CHANGED
@@ -4371,24 +4371,18 @@ const preloadedContexts = {
4371
4371
  "as": "https://www.w3.org/ns/activitystreams#",
4372
4372
  "xsd": "http://www.w3.org/2001/XMLSchema#",
4373
4373
  "Hashtag": "as:Hashtag",
4374
- "manuallyApprovesFollowers": {
4375
- "@id": "as:manuallyApprovesFollowers",
4376
- "@type": "xsd:boolean"
4377
- },
4374
+ "manuallyApprovesFollowers": { "@id": "as:manuallyApprovesFollowers" },
4378
4375
  "movedTo": {
4379
4376
  "@id": "as:movedTo",
4380
4377
  "@type": "@id"
4381
4378
  },
4382
- "sensitive": {
4383
- "@id": "as:sensitive",
4384
- "@type": "xsd:boolean"
4385
- }
4379
+ "sensitive": { "@id": "as:sensitive" }
4386
4380
  } }
4387
4381
  };
4388
4382
  //#endregion
4389
4383
  //#region deno.json
4390
4384
  var name = "@fedify/vocab-runtime";
4391
- var version = "2.4.0-dev.1832+1af9355c";
4385
+ var version = "2.4.0-dev.1867+ac08358f";
4392
4386
  //#endregion
4393
4387
  //#region src/link.ts
4394
4388
  const parametersNeedLowerCase = ["rel", "type"];
package/dist/mod.js CHANGED
@@ -4367,24 +4367,18 @@ const preloadedContexts = {
4367
4367
  "as": "https://www.w3.org/ns/activitystreams#",
4368
4368
  "xsd": "http://www.w3.org/2001/XMLSchema#",
4369
4369
  "Hashtag": "as:Hashtag",
4370
- "manuallyApprovesFollowers": {
4371
- "@id": "as:manuallyApprovesFollowers",
4372
- "@type": "xsd:boolean"
4373
- },
4370
+ "manuallyApprovesFollowers": { "@id": "as:manuallyApprovesFollowers" },
4374
4371
  "movedTo": {
4375
4372
  "@id": "as:movedTo",
4376
4373
  "@type": "@id"
4377
4374
  },
4378
- "sensitive": {
4379
- "@id": "as:sensitive",
4380
- "@type": "xsd:boolean"
4381
- }
4375
+ "sensitive": { "@id": "as:sensitive" }
4382
4376
  } }
4383
4377
  };
4384
4378
  //#endregion
4385
4379
  //#region deno.json
4386
4380
  var name = "@fedify/vocab-runtime";
4387
- var version = "2.4.0-dev.1832+1af9355c";
4381
+ var version = "2.4.0-dev.1867+ac08358f";
4388
4382
  //#endregion
4389
4383
  //#region src/link.ts
4390
4384
  const parametersNeedLowerCase = ["rel", "type"];
@@ -1,4 +1,4 @@
1
- require("./docloader-BcgLsZLt.cjs");
1
+ require("./docloader-BWFjg4zU.cjs");
2
2
  require("./url-CPfMatUL.cjs");
3
3
  require("./key-8Qg2SbZi.cjs");
4
4
  require("./multibase-B5Mea7Ip.cjs");
@@ -1,4 +1,4 @@
1
- import "./docloader-QMaFWkEs.mjs";
1
+ import "./docloader-BLb7n2Ee.mjs";
2
2
  import "./url-Basm1L_c.mjs";
3
3
  import "./key-C7MNhlkO.mjs";
4
4
  import "./multibase-BPnF_L4e.mjs";
@@ -1,4 +1,4 @@
1
- import { a as name, i as logRequest, n as createActivityPubRequest, o as version, t as FetchError } from "./request-DKCqSP_0.mjs";
1
+ import { a as name, i as logRequest, n as createActivityPubRequest, o as version, t as FetchError } from "./request-DUm2bK6k.mjs";
2
2
  import { t as HttpHeaderLink } from "./link-Cevmc87v.mjs";
3
3
  import { g as validatePublicUrl, t as UrlError } from "./url-Basm1L_c.mjs";
4
4
  import { getLogger } from "@logtape/logtape";
@@ -4361,18 +4361,12 @@ const preloadedContexts = {
4361
4361
  "as": "https://www.w3.org/ns/activitystreams#",
4362
4362
  "xsd": "http://www.w3.org/2001/XMLSchema#",
4363
4363
  "Hashtag": "as:Hashtag",
4364
- "manuallyApprovesFollowers": {
4365
- "@id": "as:manuallyApprovesFollowers",
4366
- "@type": "xsd:boolean"
4367
- },
4364
+ "manuallyApprovesFollowers": { "@id": "as:manuallyApprovesFollowers" },
4368
4365
  "movedTo": {
4369
4366
  "@id": "as:movedTo",
4370
4367
  "@type": "@id"
4371
4368
  },
4372
- "sensitive": {
4373
- "@id": "as:sensitive",
4374
- "@type": "xsd:boolean"
4375
- }
4369
+ "sensitive": { "@id": "as:sensitive" }
4376
4370
  } }
4377
4371
  };
4378
4372
  //#endregion
@@ -1,4 +1,4 @@
1
- const require_request = require("./request-Dy_Y5orp.cjs");
1
+ const require_request = require("./request-C49So-sz.cjs");
2
2
  const require_link = require("./link-DlKm8bEr.cjs");
3
3
  const require_url = require("./url-CPfMatUL.cjs");
4
4
  let _logtape_logtape = require("@logtape/logtape");
@@ -4361,18 +4361,12 @@ const preloadedContexts = {
4361
4361
  "as": "https://www.w3.org/ns/activitystreams#",
4362
4362
  "xsd": "http://www.w3.org/2001/XMLSchema#",
4363
4363
  "Hashtag": "as:Hashtag",
4364
- "manuallyApprovesFollowers": {
4365
- "@id": "as:manuallyApprovesFollowers",
4366
- "@type": "xsd:boolean"
4367
- },
4364
+ "manuallyApprovesFollowers": { "@id": "as:manuallyApprovesFollowers" },
4368
4365
  "movedTo": {
4369
4366
  "@id": "as:movedTo",
4370
4367
  "@type": "@id"
4371
4368
  },
4372
- "sensitive": {
4373
- "@id": "as:sensitive",
4374
- "@type": "xsd:boolean"
4375
- }
4369
+ "sensitive": { "@id": "as:sensitive" }
4376
4370
  } }
4377
4371
  };
4378
4372
  //#endregion
@@ -1,6 +1,6 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.cjs");
2
- const require_docloader = require("./docloader-BcgLsZLt.cjs");
3
- const require_request = require("./request-Dy_Y5orp.cjs");
2
+ const require_docloader = require("./docloader-BWFjg4zU.cjs");
3
+ const require_request = require("./request-C49So-sz.cjs");
4
4
  const require_url = require("./url-CPfMatUL.cjs");
5
5
  let node_assert = require("node:assert");
6
6
  let node_test = require("node:test");
@@ -1490,6 +1490,22 @@ var esm_default = new class FetchMock {
1490
1490
  document
1491
1491
  });
1492
1492
  });
1493
+ await t.test("preloaded FEP-ef61 context", async () => {
1494
+ const url = "https://w3id.org/fep/ef61";
1495
+ (0, node_assert.ok)(url in require_docloader.preloadedContexts);
1496
+ (0, node_assert.deepStrictEqual)(await fetchDocumentLoader(url), {
1497
+ contextUrl: null,
1498
+ documentUrl: url,
1499
+ document: { "@context": {
1500
+ gateways: {
1501
+ "@id": "https://w3id.org/fep/ef61/gateways",
1502
+ "@type": "@id",
1503
+ "@container": "@list"
1504
+ },
1505
+ digestMultibase: "https://www.w3.org/ns/credentials/v2#digestMultibase"
1506
+ } }
1507
+ });
1508
+ });
1493
1509
  await t.test("deny non-HTTP/HTTPS", async () => {
1494
1510
  await (0, node_assert.rejects)(() => fetchDocumentLoader("ftp://localhost"), require_url.UrlError);
1495
1511
  });
@@ -1,5 +1,5 @@
1
- import { n as getRemoteDocument, r as preloadedContexts, t as getDocumentLoader } from "./docloader-QMaFWkEs.mjs";
2
- import { t as FetchError } from "./request-DKCqSP_0.mjs";
1
+ import { n as getRemoteDocument, r as preloadedContexts, t as getDocumentLoader } from "./docloader-BLb7n2Ee.mjs";
2
+ import { t as FetchError } from "./request-DUm2bK6k.mjs";
3
3
  import { t as UrlError } from "./url-Basm1L_c.mjs";
4
4
  import { deepStrictEqual, ok, rejects } from "node:assert";
5
5
  import { test } from "node:test";
@@ -1509,6 +1509,22 @@ test("getDocumentLoader()", async (t) => {
1509
1509
  document
1510
1510
  });
1511
1511
  });
1512
+ await t.test("preloaded FEP-ef61 context", async () => {
1513
+ const url = "https://w3id.org/fep/ef61";
1514
+ ok(url in preloadedContexts);
1515
+ deepStrictEqual(await fetchDocumentLoader(url), {
1516
+ contextUrl: null,
1517
+ documentUrl: url,
1518
+ document: { "@context": {
1519
+ gateways: {
1520
+ "@id": "https://w3id.org/fep/ef61/gateways",
1521
+ "@type": "@id",
1522
+ "@container": "@list"
1523
+ },
1524
+ digestMultibase: "https://www.w3.org/ns/credentials/v2#digestMultibase"
1525
+ } }
1526
+ });
1527
+ });
1512
1528
  await t.test("deny non-HTTP/HTTPS", async () => {
1513
1529
  await rejects(() => fetchDocumentLoader("ftp://localhost"), UrlError);
1514
1530
  });
@@ -3,7 +3,7 @@ let node_process = require("node:process");
3
3
  node_process = require_rolldown_runtime.__toESM(node_process, 1);
4
4
  //#region deno.json
5
5
  var name = "@fedify/vocab-runtime";
6
- var version = "2.4.0-dev.1832+1af9355c";
6
+ var version = "2.4.0-dev.1867+ac08358f";
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.4.0-dev.1832+1af9355c";
4
+ var version = "2.4.0-dev.1867+ac08358f";
5
5
  //#endregion
6
6
  //#region src/request.ts
7
7
  /**
@@ -1,5 +1,5 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.cjs");
2
- const require_request = require("./request-Dy_Y5orp.cjs");
2
+ const require_request = require("./request-C49So-sz.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-DKCqSP_0.mjs";
1
+ import { o as version, r as getUserAgent } from "./request-DUm2bK6k.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.4.0-dev.1832+1af9355c",
3
+ "version": "2.4.0-dev.1867+ac08358f",
4
4
  "homepage": "https://fedify.dev/",
5
5
  "repository": {
6
6
  "type": "git",
@@ -4,16 +4,14 @@
4
4
  "xsd": "http://www.w3.org/2001/XMLSchema#",
5
5
  "Hashtag": "as:Hashtag",
6
6
  "manuallyApprovesFollowers": {
7
- "@id": "as:manuallyApprovesFollowers",
8
- "@type": "xsd:boolean"
7
+ "@id": "as:manuallyApprovesFollowers"
9
8
  },
10
9
  "movedTo": {
11
10
  "@id": "as:movedTo",
12
11
  "@type": "@id"
13
12
  },
14
13
  "sensitive": {
15
- "@id": "as:sensitive",
16
- "@type": "xsd:boolean"
14
+ "@id": "as:sensitive"
17
15
  }
18
16
  }
19
17
  }
package/src/contexts.ts CHANGED
@@ -39,6 +39,14 @@ const preloadedContexts: Record<string, unknown> = {
39
39
  "https://gotosocial.org/ns": gotosocial,
40
40
  "https://w3id.org/fep/5711": fep5711,
41
41
  "https://w3id.org/fep/7aa9": fep7aa9,
42
+
43
+ // The FEP-ef61 context. The w3id.org URL redirects to Codeberg Pages, which
44
+ // suffers recurring outages; while it is unreachable, every document
45
+ // referencing this URL fails JSON-LD expansion before application handlers
46
+ // run. We ship a built-in copy so that portable objects can be processed
47
+ // without depending on the availability of the remote context server.
48
+ // See: https://w3id.org/fep/ef61
49
+ // https://github.com/fedify-dev/fedify/issues/982
42
50
  "https://w3id.org/fep/ef61": fepEf61,
43
51
 
44
52
  // Lemmy's context document is served as application/json without the JSON-LD
@@ -389,6 +389,31 @@ test("getDocumentLoader()", async (t) => {
389
389
  }
390
390
  });
391
391
 
392
+ // The <https://w3id.org/fep/ef61> URL redirects to a Codeberg Pages host
393
+ // which suffers recurring outages; while it is unreachable, expanding any
394
+ // document referencing it fails before application handlers run. It has to
395
+ // be resolved from the built-in copy rather than over the network.
396
+ // See: https://github.com/fedify-dev/fedify/issues/982
397
+ await t.test("preloaded FEP-ef61 context", async () => {
398
+ const url = "https://w3id.org/fep/ef61";
399
+ ok(url in preloadedContexts);
400
+ deepStrictEqual(await fetchDocumentLoader(url), {
401
+ contextUrl: null,
402
+ documentUrl: url,
403
+ document: {
404
+ "@context": {
405
+ gateways: {
406
+ "@id": "https://w3id.org/fep/ef61/gateways",
407
+ "@type": "@id",
408
+ "@container": "@list",
409
+ },
410
+ digestMultibase:
411
+ "https://www.w3.org/ns/credentials/v2#digestMultibase",
412
+ },
413
+ },
414
+ });
415
+ });
416
+
392
417
  await t.test("deny non-HTTP/HTTPS", async () => {
393
418
  await rejects(
394
419
  () => fetchDocumentLoader("ftp://localhost"),