@fedify/vocab-runtime 2.3.4 → 2.3.5
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 +12 -9
- package/dist/mod.d.cts +1 -0
- package/dist/mod.d.ts +1 -0
- package/dist/mod.js +12 -9
- package/dist/tests/decimal.test.cjs +1 -1
- package/dist/tests/decimal.test.mjs +1 -1
- package/dist/tests/{docloader-BGlBKr7D.mjs → docloader-bcolBlfC.mjs} +12 -9
- package/dist/tests/{docloader-BFM7h1Xa.cjs → docloader-tdU-3Xzs.cjs} +12 -9
- package/dist/tests/docloader.test.cjs +18 -2
- package/dist/tests/docloader.test.mjs +18 -2
- package/dist/tests/{request-BOB5ItB9.cjs → request-CjvsZ9kT.cjs} +1 -1
- package/dist/tests/{request-BaUm0-cs.mjs → request-ObdjC6Ss.mjs} +1 -1
- package/dist/tests/request.test.cjs +1 -1
- package/dist/tests/request.test.mjs +1 -1
- package/package.json +1 -1
- package/src/contexts/fep-ef61.json +10 -0
- package/src/contexts/miscellany.json +2 -4
- package/src/contexts.ts +10 -0
- package/src/docloader.test.ts +25 -0
- package/src/docloader.ts +1 -0
package/deno.json
CHANGED
package/dist/mod.cjs
CHANGED
|
@@ -4288,6 +4288,14 @@ const preloadedContexts = {
|
|
|
4288
4288
|
"@type": "@id"
|
|
4289
4289
|
}
|
|
4290
4290
|
} },
|
|
4291
|
+
"https://w3id.org/fep/ef61": { "@context": {
|
|
4292
|
+
"gateways": {
|
|
4293
|
+
"@id": "https://w3id.org/fep/ef61/gateways",
|
|
4294
|
+
"@type": "@id",
|
|
4295
|
+
"@container": "@list"
|
|
4296
|
+
},
|
|
4297
|
+
"digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase"
|
|
4298
|
+
} },
|
|
4291
4299
|
"https://join-lemmy.org/context.json": { "@context": ["https://w3id.org/security/v1", {
|
|
4292
4300
|
"as": "https://www.w3.org/ns/activitystreams#",
|
|
4293
4301
|
"lemmy": "https://join-lemmy.org/ns#",
|
|
@@ -4346,24 +4354,18 @@ const preloadedContexts = {
|
|
|
4346
4354
|
"as": "https://www.w3.org/ns/activitystreams#",
|
|
4347
4355
|
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
4348
4356
|
"Hashtag": "as:Hashtag",
|
|
4349
|
-
"manuallyApprovesFollowers": {
|
|
4350
|
-
"@id": "as:manuallyApprovesFollowers",
|
|
4351
|
-
"@type": "xsd:boolean"
|
|
4352
|
-
},
|
|
4357
|
+
"manuallyApprovesFollowers": { "@id": "as:manuallyApprovesFollowers" },
|
|
4353
4358
|
"movedTo": {
|
|
4354
4359
|
"@id": "as:movedTo",
|
|
4355
4360
|
"@type": "@id"
|
|
4356
4361
|
},
|
|
4357
|
-
"sensitive": {
|
|
4358
|
-
"@id": "as:sensitive",
|
|
4359
|
-
"@type": "xsd:boolean"
|
|
4360
|
-
}
|
|
4362
|
+
"sensitive": { "@id": "as:sensitive" }
|
|
4361
4363
|
} }
|
|
4362
4364
|
};
|
|
4363
4365
|
//#endregion
|
|
4364
4366
|
//#region deno.json
|
|
4365
4367
|
var name = "@fedify/vocab-runtime";
|
|
4366
|
-
var version = "2.3.
|
|
4368
|
+
var version = "2.3.5";
|
|
4367
4369
|
//#endregion
|
|
4368
4370
|
//#region src/link.ts
|
|
4369
4371
|
const parametersNeedLowerCase = ["rel", "type"];
|
|
@@ -4931,6 +4933,7 @@ async function getRemoteDocument(url, response, fetch) {
|
|
|
4931
4933
|
* - <https://w3id.org/security/data-integrity/v1>
|
|
4932
4934
|
* - <https://www.w3.org/ns/did/v1>
|
|
4933
4935
|
* - <https://w3id.org/security/multikey/v1>
|
|
4936
|
+
* - <https://w3id.org/fep/ef61>
|
|
4934
4937
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
4935
4938
|
* - <http://schema.org/>
|
|
4936
4939
|
* @param options Options for the document loader.
|
package/dist/mod.d.cts
CHANGED
|
@@ -190,6 +190,7 @@ interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
|
|
|
190
190
|
* - <https://w3id.org/security/data-integrity/v1>
|
|
191
191
|
* - <https://www.w3.org/ns/did/v1>
|
|
192
192
|
* - <https://w3id.org/security/multikey/v1>
|
|
193
|
+
* - <https://w3id.org/fep/ef61>
|
|
193
194
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
194
195
|
* - <http://schema.org/>
|
|
195
196
|
* @param options Options for the document loader.
|
package/dist/mod.d.ts
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.js
CHANGED
|
@@ -4284,6 +4284,14 @@ const preloadedContexts = {
|
|
|
4284
4284
|
"@type": "@id"
|
|
4285
4285
|
}
|
|
4286
4286
|
} },
|
|
4287
|
+
"https://w3id.org/fep/ef61": { "@context": {
|
|
4288
|
+
"gateways": {
|
|
4289
|
+
"@id": "https://w3id.org/fep/ef61/gateways",
|
|
4290
|
+
"@type": "@id",
|
|
4291
|
+
"@container": "@list"
|
|
4292
|
+
},
|
|
4293
|
+
"digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase"
|
|
4294
|
+
} },
|
|
4287
4295
|
"https://join-lemmy.org/context.json": { "@context": ["https://w3id.org/security/v1", {
|
|
4288
4296
|
"as": "https://www.w3.org/ns/activitystreams#",
|
|
4289
4297
|
"lemmy": "https://join-lemmy.org/ns#",
|
|
@@ -4342,24 +4350,18 @@ const preloadedContexts = {
|
|
|
4342
4350
|
"as": "https://www.w3.org/ns/activitystreams#",
|
|
4343
4351
|
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
4344
4352
|
"Hashtag": "as:Hashtag",
|
|
4345
|
-
"manuallyApprovesFollowers": {
|
|
4346
|
-
"@id": "as:manuallyApprovesFollowers",
|
|
4347
|
-
"@type": "xsd:boolean"
|
|
4348
|
-
},
|
|
4353
|
+
"manuallyApprovesFollowers": { "@id": "as:manuallyApprovesFollowers" },
|
|
4349
4354
|
"movedTo": {
|
|
4350
4355
|
"@id": "as:movedTo",
|
|
4351
4356
|
"@type": "@id"
|
|
4352
4357
|
},
|
|
4353
|
-
"sensitive": {
|
|
4354
|
-
"@id": "as:sensitive",
|
|
4355
|
-
"@type": "xsd:boolean"
|
|
4356
|
-
}
|
|
4358
|
+
"sensitive": { "@id": "as:sensitive" }
|
|
4357
4359
|
} }
|
|
4358
4360
|
};
|
|
4359
4361
|
//#endregion
|
|
4360
4362
|
//#region deno.json
|
|
4361
4363
|
var name = "@fedify/vocab-runtime";
|
|
4362
|
-
var version = "2.3.
|
|
4364
|
+
var version = "2.3.5";
|
|
4363
4365
|
//#endregion
|
|
4364
4366
|
//#region src/link.ts
|
|
4365
4367
|
const parametersNeedLowerCase = ["rel", "type"];
|
|
@@ -4927,6 +4929,7 @@ async function getRemoteDocument(url, response, fetch) {
|
|
|
4927
4929
|
* - <https://w3id.org/security/data-integrity/v1>
|
|
4928
4930
|
* - <https://www.w3.org/ns/did/v1>
|
|
4929
4931
|
* - <https://w3id.org/security/multikey/v1>
|
|
4932
|
+
* - <https://w3id.org/fep/ef61>
|
|
4930
4933
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
4931
4934
|
* - <http://schema.org/>
|
|
4932
4935
|
* @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-
|
|
1
|
+
import { a as name, i as logRequest, n as createActivityPubRequest, o as version, t as FetchError } from "./request-ObdjC6Ss.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";
|
|
@@ -4277,6 +4277,14 @@ const preloadedContexts = {
|
|
|
4277
4277
|
"@type": "@id"
|
|
4278
4278
|
}
|
|
4279
4279
|
} },
|
|
4280
|
+
"https://w3id.org/fep/ef61": { "@context": {
|
|
4281
|
+
"gateways": {
|
|
4282
|
+
"@id": "https://w3id.org/fep/ef61/gateways",
|
|
4283
|
+
"@type": "@id",
|
|
4284
|
+
"@container": "@list"
|
|
4285
|
+
},
|
|
4286
|
+
"digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase"
|
|
4287
|
+
} },
|
|
4280
4288
|
"https://join-lemmy.org/context.json": { "@context": ["https://w3id.org/security/v1", {
|
|
4281
4289
|
"as": "https://www.w3.org/ns/activitystreams#",
|
|
4282
4290
|
"lemmy": "https://join-lemmy.org/ns#",
|
|
@@ -4335,18 +4343,12 @@ const preloadedContexts = {
|
|
|
4335
4343
|
"as": "https://www.w3.org/ns/activitystreams#",
|
|
4336
4344
|
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
4337
4345
|
"Hashtag": "as:Hashtag",
|
|
4338
|
-
"manuallyApprovesFollowers": {
|
|
4339
|
-
"@id": "as:manuallyApprovesFollowers",
|
|
4340
|
-
"@type": "xsd:boolean"
|
|
4341
|
-
},
|
|
4346
|
+
"manuallyApprovesFollowers": { "@id": "as:manuallyApprovesFollowers" },
|
|
4342
4347
|
"movedTo": {
|
|
4343
4348
|
"@id": "as:movedTo",
|
|
4344
4349
|
"@type": "@id"
|
|
4345
4350
|
},
|
|
4346
|
-
"sensitive": {
|
|
4347
|
-
"@id": "as:sensitive",
|
|
4348
|
-
"@type": "xsd:boolean"
|
|
4349
|
-
}
|
|
4351
|
+
"sensitive": { "@id": "as:sensitive" }
|
|
4350
4352
|
} }
|
|
4351
4353
|
};
|
|
4352
4354
|
//#endregion
|
|
@@ -4465,6 +4467,7 @@ async function getRemoteDocument(url, response, fetch) {
|
|
|
4465
4467
|
* - <https://w3id.org/security/data-integrity/v1>
|
|
4466
4468
|
* - <https://www.w3.org/ns/did/v1>
|
|
4467
4469
|
* - <https://w3id.org/security/multikey/v1>
|
|
4470
|
+
* - <https://w3id.org/fep/ef61>
|
|
4468
4471
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
4469
4472
|
* - <http://schema.org/>
|
|
4470
4473
|
* @param options Options for the document loader.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./chunk-C2EiDwsr.cjs");
|
|
2
|
-
const require_request = require("./request-
|
|
2
|
+
const require_request = require("./request-CjvsZ9kT.cjs");
|
|
3
3
|
const require_link = require("./link-FguCydMA.cjs");
|
|
4
4
|
const require_url = require("./url-BF_Nb_Cu.cjs");
|
|
5
5
|
let _logtape_logtape = require("@logtape/logtape");
|
|
@@ -4278,6 +4278,14 @@ const preloadedContexts = {
|
|
|
4278
4278
|
"@type": "@id"
|
|
4279
4279
|
}
|
|
4280
4280
|
} },
|
|
4281
|
+
"https://w3id.org/fep/ef61": { "@context": {
|
|
4282
|
+
"gateways": {
|
|
4283
|
+
"@id": "https://w3id.org/fep/ef61/gateways",
|
|
4284
|
+
"@type": "@id",
|
|
4285
|
+
"@container": "@list"
|
|
4286
|
+
},
|
|
4287
|
+
"digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase"
|
|
4288
|
+
} },
|
|
4281
4289
|
"https://join-lemmy.org/context.json": { "@context": ["https://w3id.org/security/v1", {
|
|
4282
4290
|
"as": "https://www.w3.org/ns/activitystreams#",
|
|
4283
4291
|
"lemmy": "https://join-lemmy.org/ns#",
|
|
@@ -4336,18 +4344,12 @@ const preloadedContexts = {
|
|
|
4336
4344
|
"as": "https://www.w3.org/ns/activitystreams#",
|
|
4337
4345
|
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
4338
4346
|
"Hashtag": "as:Hashtag",
|
|
4339
|
-
"manuallyApprovesFollowers": {
|
|
4340
|
-
"@id": "as:manuallyApprovesFollowers",
|
|
4341
|
-
"@type": "xsd:boolean"
|
|
4342
|
-
},
|
|
4347
|
+
"manuallyApprovesFollowers": { "@id": "as:manuallyApprovesFollowers" },
|
|
4343
4348
|
"movedTo": {
|
|
4344
4349
|
"@id": "as:movedTo",
|
|
4345
4350
|
"@type": "@id"
|
|
4346
4351
|
},
|
|
4347
|
-
"sensitive": {
|
|
4348
|
-
"@id": "as:sensitive",
|
|
4349
|
-
"@type": "xsd:boolean"
|
|
4350
|
-
}
|
|
4352
|
+
"sensitive": { "@id": "as:sensitive" }
|
|
4351
4353
|
} }
|
|
4352
4354
|
};
|
|
4353
4355
|
//#endregion
|
|
@@ -4466,6 +4468,7 @@ async function getRemoteDocument(url, response, fetch) {
|
|
|
4466
4468
|
* - <https://w3id.org/security/data-integrity/v1>
|
|
4467
4469
|
* - <https://www.w3.org/ns/did/v1>
|
|
4468
4470
|
* - <https://w3id.org/security/multikey/v1>
|
|
4471
|
+
* - <https://w3id.org/fep/ef61>
|
|
4469
4472
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
4470
4473
|
* - <http://schema.org/>
|
|
4471
4474
|
* @param options Options for the document loader.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C2EiDwsr.cjs");
|
|
2
|
-
const require_docloader = require("./docloader-
|
|
3
|
-
const require_request = require("./request-
|
|
2
|
+
const require_docloader = require("./docloader-tdU-3Xzs.cjs");
|
|
3
|
+
const require_request = require("./request-CjvsZ9kT.cjs");
|
|
4
4
|
const require_url = require("./url-BF_Nb_Cu.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-
|
|
2
|
-
import { t as FetchError } from "./request-
|
|
1
|
+
import { n as preloadedContexts, t as getDocumentLoader } from "./docloader-bcolBlfC.mjs";
|
|
2
|
+
import { t as FetchError } from "./request-ObdjC6Ss.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
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-C2EiDwsr.cjs");
|
|
2
|
-
const require_request = require("./request-
|
|
2
|
+
const require_request = require("./request-CjvsZ9kT.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-
|
|
1
|
+
import { o as version, r as getUserAgent } from "./request-ObdjC6Ss.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
|
@@ -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
|
@@ -7,6 +7,7 @@ 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" };
|
|
@@ -37,6 +38,15 @@ const preloadedContexts: Record<string, unknown> = {
|
|
|
37
38
|
"https://gotosocial.org/ns": gotosocial,
|
|
38
39
|
"https://w3id.org/fep/5711": fep5711,
|
|
39
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
|
+
|
|
40
50
|
// Lemmy's context document is served as application/json without the JSON-LD
|
|
41
51
|
// context Link header. The default document loader treats that as a regular
|
|
42
52
|
// JSON response instead of a JSON-LD context, so every Lemmy activity that
|
package/src/docloader.test.ts
CHANGED
|
@@ -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.
|