@fedify/vocab-runtime 2.0.29-dev.2046 → 2.0.29-dev.2055
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 +27 -1
- package/dist/mod.d.cts +1 -0
- package/dist/mod.d.ts +1 -0
- package/dist/mod.js +27 -1
- package/dist/tests/{body-GbL4FSd6.cjs → body-CJdaMhaa.cjs} +1 -1
- package/dist/tests/{body-CtVeJKAb.mjs → body-wszEomi_.mjs} +1 -1
- package/dist/tests/body.test.cjs +1 -1
- package/dist/tests/body.test.mjs +1 -1
- package/dist/tests/docloader.test.cjs +59 -2
- package/dist/tests/docloader.test.mjs +59 -2
- package/dist/tests/{request-B8Dv92jS.cjs → request-BSlaLiRK.cjs} +1 -1
- package/dist/tests/{request-3-6XVYbp.mjs → request-PqU9N1x6.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-7aa9.json +24 -0
- package/src/contexts.ts +8 -0
- package/src/docloader.test.ts +37 -0
- package/src/docloader.ts +1 -0
package/deno.json
CHANGED
package/dist/mod.cjs
CHANGED
|
@@ -128,6 +128,30 @@ var cid_v1_default = { "@context": {
|
|
|
128
128
|
}
|
|
129
129
|
} };
|
|
130
130
|
//#endregion
|
|
131
|
+
//#region src/contexts/fep-7aa9.json
|
|
132
|
+
var fep_7aa9_default = { "@context": {
|
|
133
|
+
"FeaturedCollection": "https://w3id.org/fep/7aa9#FeaturedCollection",
|
|
134
|
+
"FeaturedItem": "https://w3id.org/fep/7aa9#FeaturedItem",
|
|
135
|
+
"FeatureRequest": "https://w3id.org/fep/7aa9#FeatureRequest",
|
|
136
|
+
"FeatureAuthorization": "https://w3id.org/fep/7aa9#FeatureAuthorization",
|
|
137
|
+
"topic": {
|
|
138
|
+
"@id": "https://w3id.org/fep/7aa9#topic",
|
|
139
|
+
"@type": "@id"
|
|
140
|
+
},
|
|
141
|
+
"featuredObject": {
|
|
142
|
+
"@id": "https://w3id.org/fep/7aa9#featuredObject",
|
|
143
|
+
"@type": "@id"
|
|
144
|
+
},
|
|
145
|
+
"canFeature": {
|
|
146
|
+
"@id": "https://w3id.org/fep/7aa9#canFeature",
|
|
147
|
+
"@type": "@id"
|
|
148
|
+
},
|
|
149
|
+
"featureAuthorization": {
|
|
150
|
+
"@id": "https://w3id.org/fep/7aa9#featureAuthorization",
|
|
151
|
+
"@type": "@id"
|
|
152
|
+
}
|
|
153
|
+
} };
|
|
154
|
+
//#endregion
|
|
131
155
|
//#region src/contexts/fep-ef61.json
|
|
132
156
|
var fep_ef61_default = { "@context": {
|
|
133
157
|
"gateways": {
|
|
@@ -4403,6 +4427,7 @@ const preloadedContexts = {
|
|
|
4403
4427
|
} },
|
|
4404
4428
|
"https://www.w3.org/ns/cid/v1": cid_v1_default,
|
|
4405
4429
|
"https://w3id.org/fep/ef61": fep_ef61_default,
|
|
4430
|
+
"https://w3id.org/fep/7aa9": fep_7aa9_default,
|
|
4406
4431
|
"https://join-lemmy.org/context.json": join_lemmy_default,
|
|
4407
4432
|
"http://joinmastodon.org/ns": { "@context": {
|
|
4408
4433
|
"toot": "http://joinmastodon.org/ns#",
|
|
@@ -4435,7 +4460,7 @@ const preloadedContexts = {
|
|
|
4435
4460
|
//#endregion
|
|
4436
4461
|
//#region deno.json
|
|
4437
4462
|
var name = "@fedify/vocab-runtime";
|
|
4438
|
-
var version = "2.0.29-dev.
|
|
4463
|
+
var version = "2.0.29-dev.2055+5e21857f";
|
|
4439
4464
|
//#endregion
|
|
4440
4465
|
//#region src/request.ts
|
|
4441
4466
|
/**
|
|
@@ -5074,6 +5099,7 @@ async function getRemoteDocument(url, response, fetch) {
|
|
|
5074
5099
|
* - <https://www.w3.org/ns/cid/v1>
|
|
5075
5100
|
* - <https://w3id.org/security/multikey/v1>
|
|
5076
5101
|
* - <https://w3id.org/fep/ef61>
|
|
5102
|
+
* - <https://w3id.org/fep/7aa9>
|
|
5077
5103
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
5078
5104
|
* - <http://schema.org/>
|
|
5079
5105
|
* @param options Options for the document loader.
|
package/dist/mod.d.cts
CHANGED
|
@@ -180,6 +180,7 @@ interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
|
|
|
180
180
|
* - <https://www.w3.org/ns/cid/v1>
|
|
181
181
|
* - <https://w3id.org/security/multikey/v1>
|
|
182
182
|
* - <https://w3id.org/fep/ef61>
|
|
183
|
+
* - <https://w3id.org/fep/7aa9>
|
|
183
184
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
184
185
|
* - <http://schema.org/>
|
|
185
186
|
* @param options Options for the document loader.
|
package/dist/mod.d.ts
CHANGED
|
@@ -179,6 +179,7 @@ interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
|
|
|
179
179
|
* - <https://www.w3.org/ns/cid/v1>
|
|
180
180
|
* - <https://w3id.org/security/multikey/v1>
|
|
181
181
|
* - <https://w3id.org/fep/ef61>
|
|
182
|
+
* - <https://w3id.org/fep/7aa9>
|
|
182
183
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
183
184
|
* - <http://schema.org/>
|
|
184
185
|
* @param options Options for the document loader.
|
package/dist/mod.js
CHANGED
|
@@ -123,6 +123,30 @@ var cid_v1_default = { "@context": {
|
|
|
123
123
|
}
|
|
124
124
|
} };
|
|
125
125
|
//#endregion
|
|
126
|
+
//#region src/contexts/fep-7aa9.json
|
|
127
|
+
var fep_7aa9_default = { "@context": {
|
|
128
|
+
"FeaturedCollection": "https://w3id.org/fep/7aa9#FeaturedCollection",
|
|
129
|
+
"FeaturedItem": "https://w3id.org/fep/7aa9#FeaturedItem",
|
|
130
|
+
"FeatureRequest": "https://w3id.org/fep/7aa9#FeatureRequest",
|
|
131
|
+
"FeatureAuthorization": "https://w3id.org/fep/7aa9#FeatureAuthorization",
|
|
132
|
+
"topic": {
|
|
133
|
+
"@id": "https://w3id.org/fep/7aa9#topic",
|
|
134
|
+
"@type": "@id"
|
|
135
|
+
},
|
|
136
|
+
"featuredObject": {
|
|
137
|
+
"@id": "https://w3id.org/fep/7aa9#featuredObject",
|
|
138
|
+
"@type": "@id"
|
|
139
|
+
},
|
|
140
|
+
"canFeature": {
|
|
141
|
+
"@id": "https://w3id.org/fep/7aa9#canFeature",
|
|
142
|
+
"@type": "@id"
|
|
143
|
+
},
|
|
144
|
+
"featureAuthorization": {
|
|
145
|
+
"@id": "https://w3id.org/fep/7aa9#featureAuthorization",
|
|
146
|
+
"@type": "@id"
|
|
147
|
+
}
|
|
148
|
+
} };
|
|
149
|
+
//#endregion
|
|
126
150
|
//#region src/contexts/fep-ef61.json
|
|
127
151
|
var fep_ef61_default = { "@context": {
|
|
128
152
|
"gateways": {
|
|
@@ -4398,6 +4422,7 @@ const preloadedContexts = {
|
|
|
4398
4422
|
} },
|
|
4399
4423
|
"https://www.w3.org/ns/cid/v1": cid_v1_default,
|
|
4400
4424
|
"https://w3id.org/fep/ef61": fep_ef61_default,
|
|
4425
|
+
"https://w3id.org/fep/7aa9": fep_7aa9_default,
|
|
4401
4426
|
"https://join-lemmy.org/context.json": join_lemmy_default,
|
|
4402
4427
|
"http://joinmastodon.org/ns": { "@context": {
|
|
4403
4428
|
"toot": "http://joinmastodon.org/ns#",
|
|
@@ -4430,7 +4455,7 @@ const preloadedContexts = {
|
|
|
4430
4455
|
//#endregion
|
|
4431
4456
|
//#region deno.json
|
|
4432
4457
|
var name = "@fedify/vocab-runtime";
|
|
4433
|
-
var version = "2.0.29-dev.
|
|
4458
|
+
var version = "2.0.29-dev.2055+5e21857f";
|
|
4434
4459
|
//#endregion
|
|
4435
4460
|
//#region src/request.ts
|
|
4436
4461
|
/**
|
|
@@ -5069,6 +5094,7 @@ async function getRemoteDocument(url, response, fetch) {
|
|
|
5069
5094
|
* - <https://www.w3.org/ns/cid/v1>
|
|
5070
5095
|
* - <https://w3id.org/security/multikey/v1>
|
|
5071
5096
|
* - <https://w3id.org/fep/ef61>
|
|
5097
|
+
* - <https://w3id.org/fep/7aa9>
|
|
5072
5098
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
5073
5099
|
* - <http://schema.org/>
|
|
5074
5100
|
* @param options Options for the document loader.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./chunk-Do9eywBl.cjs");
|
|
2
|
-
const require_request = require("./request-
|
|
2
|
+
const require_request = require("./request-BSlaLiRK.cjs");
|
|
3
3
|
let _logtape_logtape = require("@logtape/logtape");
|
|
4
4
|
//#region src/body.ts
|
|
5
5
|
/** Decoded JSON body limit: 16 MiB. @internal */
|
package/dist/tests/body.test.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./chunk-Do9eywBl.cjs");
|
|
2
|
-
const require_body = require("./body-
|
|
2
|
+
const require_body = require("./body-CJdaMhaa.cjs");
|
|
3
3
|
let node_assert_strict = require("node:assert/strict");
|
|
4
4
|
let node_test = require("node:test");
|
|
5
5
|
let node_zlib = require("node:zlib");
|
package/dist/tests/body.test.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as readBoundedText, t as BodyTooLargeError } from "./body-
|
|
1
|
+
import { r as readBoundedText, t as BodyTooLargeError } from "./body-wszEomi_.mjs";
|
|
2
2
|
import { deepStrictEqual, ok, rejects } from "node:assert/strict";
|
|
3
3
|
import { test } from "node:test";
|
|
4
4
|
import { gunzipSync, gzipSync } from "node:zlib";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Do9eywBl.cjs");
|
|
2
|
-
const require_request = require("./request-
|
|
3
|
-
const require_body = require("./body-
|
|
2
|
+
const require_request = require("./request-BSlaLiRK.cjs");
|
|
3
|
+
const require_body = require("./body-CJdaMhaa.cjs");
|
|
4
4
|
const require_link = require("./link-FguCydMA.cjs");
|
|
5
5
|
const require_url = require("./url-Qk1svKZU.cjs");
|
|
6
6
|
let node_test = require("node:test");
|
|
@@ -1325,6 +1325,30 @@ var cid_v1_default = { "@context": {
|
|
|
1325
1325
|
}
|
|
1326
1326
|
} };
|
|
1327
1327
|
//#endregion
|
|
1328
|
+
//#region src/contexts/fep-7aa9.json
|
|
1329
|
+
var fep_7aa9_default = { "@context": {
|
|
1330
|
+
"FeaturedCollection": "https://w3id.org/fep/7aa9#FeaturedCollection",
|
|
1331
|
+
"FeaturedItem": "https://w3id.org/fep/7aa9#FeaturedItem",
|
|
1332
|
+
"FeatureRequest": "https://w3id.org/fep/7aa9#FeatureRequest",
|
|
1333
|
+
"FeatureAuthorization": "https://w3id.org/fep/7aa9#FeatureAuthorization",
|
|
1334
|
+
"topic": {
|
|
1335
|
+
"@id": "https://w3id.org/fep/7aa9#topic",
|
|
1336
|
+
"@type": "@id"
|
|
1337
|
+
},
|
|
1338
|
+
"featuredObject": {
|
|
1339
|
+
"@id": "https://w3id.org/fep/7aa9#featuredObject",
|
|
1340
|
+
"@type": "@id"
|
|
1341
|
+
},
|
|
1342
|
+
"canFeature": {
|
|
1343
|
+
"@id": "https://w3id.org/fep/7aa9#canFeature",
|
|
1344
|
+
"@type": "@id"
|
|
1345
|
+
},
|
|
1346
|
+
"featureAuthorization": {
|
|
1347
|
+
"@id": "https://w3id.org/fep/7aa9#featureAuthorization",
|
|
1348
|
+
"@type": "@id"
|
|
1349
|
+
}
|
|
1350
|
+
} };
|
|
1351
|
+
//#endregion
|
|
1328
1352
|
//#region src/contexts/fep-ef61.json
|
|
1329
1353
|
var fep_ef61_default = { "@context": {
|
|
1330
1354
|
"gateways": {
|
|
@@ -5600,6 +5624,7 @@ const preloadedContexts = {
|
|
|
5600
5624
|
} },
|
|
5601
5625
|
"https://www.w3.org/ns/cid/v1": cid_v1_default,
|
|
5602
5626
|
"https://w3id.org/fep/ef61": fep_ef61_default,
|
|
5627
|
+
"https://w3id.org/fep/7aa9": fep_7aa9_default,
|
|
5603
5628
|
"https://join-lemmy.org/context.json": join_lemmy_default,
|
|
5604
5629
|
"http://joinmastodon.org/ns": { "@context": {
|
|
5605
5630
|
"toot": "http://joinmastodon.org/ns#",
|
|
@@ -5738,6 +5763,7 @@ async function getRemoteDocument(url, response, fetch) {
|
|
|
5738
5763
|
* - <https://www.w3.org/ns/cid/v1>
|
|
5739
5764
|
* - <https://w3id.org/security/multikey/v1>
|
|
5740
5765
|
* - <https://w3id.org/fep/ef61>
|
|
5766
|
+
* - <https://w3id.org/fep/7aa9>
|
|
5741
5767
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
5742
5768
|
* - <http://schema.org/>
|
|
5743
5769
|
* @param options Options for the document loader.
|
|
@@ -6068,6 +6094,37 @@ function getDocumentLoader({ allowPrivateAddress, skipPreloadedContexts, userAge
|
|
|
6068
6094
|
} }
|
|
6069
6095
|
});
|
|
6070
6096
|
});
|
|
6097
|
+
esm_default.get("https://w3id.org/fep/7aa9", { status: 502 });
|
|
6098
|
+
await t.test("preloaded FEP-7aa9 context", async () => {
|
|
6099
|
+
const url = "https://w3id.org/fep/7aa9";
|
|
6100
|
+
(0, node_assert.deepStrictEqual)(await fetchDocumentLoader(url), {
|
|
6101
|
+
contextUrl: null,
|
|
6102
|
+
documentUrl: url,
|
|
6103
|
+
document: { "@context": {
|
|
6104
|
+
"FeaturedCollection": "https://w3id.org/fep/7aa9#FeaturedCollection",
|
|
6105
|
+
"FeaturedItem": "https://w3id.org/fep/7aa9#FeaturedItem",
|
|
6106
|
+
"FeatureRequest": "https://w3id.org/fep/7aa9#FeatureRequest",
|
|
6107
|
+
"FeatureAuthorization": "https://w3id.org/fep/7aa9#FeatureAuthorization",
|
|
6108
|
+
"topic": {
|
|
6109
|
+
"@id": "https://w3id.org/fep/7aa9#topic",
|
|
6110
|
+
"@type": "@id"
|
|
6111
|
+
},
|
|
6112
|
+
"featuredObject": {
|
|
6113
|
+
"@id": "https://w3id.org/fep/7aa9#featuredObject",
|
|
6114
|
+
"@type": "@id"
|
|
6115
|
+
},
|
|
6116
|
+
"canFeature": {
|
|
6117
|
+
"@id": "https://w3id.org/fep/7aa9#canFeature",
|
|
6118
|
+
"@type": "@id"
|
|
6119
|
+
},
|
|
6120
|
+
"featureAuthorization": {
|
|
6121
|
+
"@id": "https://w3id.org/fep/7aa9#featureAuthorization",
|
|
6122
|
+
"@type": "@id"
|
|
6123
|
+
}
|
|
6124
|
+
} }
|
|
6125
|
+
});
|
|
6126
|
+
(0, node_assert.deepStrictEqual)(esm_default.callHistory.calls(url).length, 0);
|
|
6127
|
+
});
|
|
6071
6128
|
await t.test("deny non-HTTP/HTTPS", async () => {
|
|
6072
6129
|
await (0, node_assert.rejects)(() => fetchDocumentLoader("ftp://localhost"), require_url.UrlError);
|
|
6073
6130
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as name, i as logRequest, n as createActivityPubRequest, o as version, t as FetchError } from "./request-
|
|
2
|
-
import { n as MAX_BODY_SIZE, r as readBoundedText } from "./body-
|
|
1
|
+
import { a as name, i as logRequest, n as createActivityPubRequest, o as version, t as FetchError } from "./request-PqU9N1x6.mjs";
|
|
2
|
+
import { n as MAX_BODY_SIZE, r as readBoundedText } from "./body-wszEomi_.mjs";
|
|
3
3
|
import { t as HttpHeaderLink } from "./link-NUUWCdnK.mjs";
|
|
4
4
|
import { o as validatePublicUrl, t as UrlError } from "./url-DzlMS01z.mjs";
|
|
5
5
|
import { test } from "node:test";
|
|
@@ -1343,6 +1343,30 @@ var cid_v1_default = { "@context": {
|
|
|
1343
1343
|
}
|
|
1344
1344
|
} };
|
|
1345
1345
|
//#endregion
|
|
1346
|
+
//#region src/contexts/fep-7aa9.json
|
|
1347
|
+
var fep_7aa9_default = { "@context": {
|
|
1348
|
+
"FeaturedCollection": "https://w3id.org/fep/7aa9#FeaturedCollection",
|
|
1349
|
+
"FeaturedItem": "https://w3id.org/fep/7aa9#FeaturedItem",
|
|
1350
|
+
"FeatureRequest": "https://w3id.org/fep/7aa9#FeatureRequest",
|
|
1351
|
+
"FeatureAuthorization": "https://w3id.org/fep/7aa9#FeatureAuthorization",
|
|
1352
|
+
"topic": {
|
|
1353
|
+
"@id": "https://w3id.org/fep/7aa9#topic",
|
|
1354
|
+
"@type": "@id"
|
|
1355
|
+
},
|
|
1356
|
+
"featuredObject": {
|
|
1357
|
+
"@id": "https://w3id.org/fep/7aa9#featuredObject",
|
|
1358
|
+
"@type": "@id"
|
|
1359
|
+
},
|
|
1360
|
+
"canFeature": {
|
|
1361
|
+
"@id": "https://w3id.org/fep/7aa9#canFeature",
|
|
1362
|
+
"@type": "@id"
|
|
1363
|
+
},
|
|
1364
|
+
"featureAuthorization": {
|
|
1365
|
+
"@id": "https://w3id.org/fep/7aa9#featureAuthorization",
|
|
1366
|
+
"@type": "@id"
|
|
1367
|
+
}
|
|
1368
|
+
} };
|
|
1369
|
+
//#endregion
|
|
1346
1370
|
//#region src/contexts/fep-ef61.json
|
|
1347
1371
|
var fep_ef61_default = { "@context": {
|
|
1348
1372
|
"gateways": {
|
|
@@ -5618,6 +5642,7 @@ const preloadedContexts = {
|
|
|
5618
5642
|
} },
|
|
5619
5643
|
"https://www.w3.org/ns/cid/v1": cid_v1_default,
|
|
5620
5644
|
"https://w3id.org/fep/ef61": fep_ef61_default,
|
|
5645
|
+
"https://w3id.org/fep/7aa9": fep_7aa9_default,
|
|
5621
5646
|
"https://join-lemmy.org/context.json": join_lemmy_default,
|
|
5622
5647
|
"http://joinmastodon.org/ns": { "@context": {
|
|
5623
5648
|
"toot": "http://joinmastodon.org/ns#",
|
|
@@ -5756,6 +5781,7 @@ async function getRemoteDocument(url, response, fetch) {
|
|
|
5756
5781
|
* - <https://www.w3.org/ns/cid/v1>
|
|
5757
5782
|
* - <https://w3id.org/security/multikey/v1>
|
|
5758
5783
|
* - <https://w3id.org/fep/ef61>
|
|
5784
|
+
* - <https://w3id.org/fep/7aa9>
|
|
5759
5785
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
5760
5786
|
* - <http://schema.org/>
|
|
5761
5787
|
* @param options Options for the document loader.
|
|
@@ -6086,6 +6112,37 @@ test("getDocumentLoader()", async (t) => {
|
|
|
6086
6112
|
} }
|
|
6087
6113
|
});
|
|
6088
6114
|
});
|
|
6115
|
+
esm_default.get("https://w3id.org/fep/7aa9", { status: 502 });
|
|
6116
|
+
await t.test("preloaded FEP-7aa9 context", async () => {
|
|
6117
|
+
const url = "https://w3id.org/fep/7aa9";
|
|
6118
|
+
deepStrictEqual(await fetchDocumentLoader(url), {
|
|
6119
|
+
contextUrl: null,
|
|
6120
|
+
documentUrl: url,
|
|
6121
|
+
document: { "@context": {
|
|
6122
|
+
"FeaturedCollection": "https://w3id.org/fep/7aa9#FeaturedCollection",
|
|
6123
|
+
"FeaturedItem": "https://w3id.org/fep/7aa9#FeaturedItem",
|
|
6124
|
+
"FeatureRequest": "https://w3id.org/fep/7aa9#FeatureRequest",
|
|
6125
|
+
"FeatureAuthorization": "https://w3id.org/fep/7aa9#FeatureAuthorization",
|
|
6126
|
+
"topic": {
|
|
6127
|
+
"@id": "https://w3id.org/fep/7aa9#topic",
|
|
6128
|
+
"@type": "@id"
|
|
6129
|
+
},
|
|
6130
|
+
"featuredObject": {
|
|
6131
|
+
"@id": "https://w3id.org/fep/7aa9#featuredObject",
|
|
6132
|
+
"@type": "@id"
|
|
6133
|
+
},
|
|
6134
|
+
"canFeature": {
|
|
6135
|
+
"@id": "https://w3id.org/fep/7aa9#canFeature",
|
|
6136
|
+
"@type": "@id"
|
|
6137
|
+
},
|
|
6138
|
+
"featureAuthorization": {
|
|
6139
|
+
"@id": "https://w3id.org/fep/7aa9#featureAuthorization",
|
|
6140
|
+
"@type": "@id"
|
|
6141
|
+
}
|
|
6142
|
+
} }
|
|
6143
|
+
});
|
|
6144
|
+
deepStrictEqual(esm_default.callHistory.calls(url).length, 0);
|
|
6145
|
+
});
|
|
6089
6146
|
await t.test("deny non-HTTP/HTTPS", async () => {
|
|
6090
6147
|
await rejects(() => fetchDocumentLoader("ftp://localhost"), UrlError);
|
|
6091
6148
|
});
|
|
@@ -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.0.29-dev.
|
|
6
|
+
var version = "2.0.29-dev.2055+5e21857f";
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/request.ts
|
|
9
9
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Do9eywBl.cjs");
|
|
2
|
-
const require_request = require("./request-
|
|
2
|
+
const require_request = require("./request-BSlaLiRK.cjs");
|
|
3
3
|
let node_test = require("node:test");
|
|
4
4
|
let node_process = require("node:process");
|
|
5
5
|
node_process = require_chunk.__toESM(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-PqU9N1x6.mjs";
|
|
2
2
|
import { test } from "node:test";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import { deepStrictEqual } from "node:assert";
|
package/package.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": {
|
|
3
|
+
"FeaturedCollection": "https://w3id.org/fep/7aa9#FeaturedCollection",
|
|
4
|
+
"FeaturedItem": "https://w3id.org/fep/7aa9#FeaturedItem",
|
|
5
|
+
"FeatureRequest": "https://w3id.org/fep/7aa9#FeatureRequest",
|
|
6
|
+
"FeatureAuthorization": "https://w3id.org/fep/7aa9#FeatureAuthorization",
|
|
7
|
+
"topic": {
|
|
8
|
+
"@id": "https://w3id.org/fep/7aa9#topic",
|
|
9
|
+
"@type": "@id"
|
|
10
|
+
},
|
|
11
|
+
"featuredObject": {
|
|
12
|
+
"@id": "https://w3id.org/fep/7aa9#featuredObject",
|
|
13
|
+
"@type": "@id"
|
|
14
|
+
},
|
|
15
|
+
"canFeature": {
|
|
16
|
+
"@id": "https://w3id.org/fep/7aa9#canFeature",
|
|
17
|
+
"@type": "@id"
|
|
18
|
+
},
|
|
19
|
+
"featureAuthorization": {
|
|
20
|
+
"@id": "https://w3id.org/fep/7aa9#featureAuthorization",
|
|
21
|
+
"@type": "@id"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
package/src/contexts.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// cSpell: disable
|
|
4
4
|
|
|
5
5
|
import cidV1Context from "./contexts/cid-v1.json" with { type: "json" };
|
|
6
|
+
import fep7aa9 from "./contexts/fep-7aa9.json" with { type: "json" };
|
|
6
7
|
import fepEf61 from "./contexts/fep-ef61.json" with { type: "json" };
|
|
7
8
|
import joinLemmyContext from "./contexts/join-lemmy.json" with { type: "json" };
|
|
8
9
|
import miscellany from "./contexts/miscellany.json" with { type: "json" };
|
|
@@ -4337,6 +4338,13 @@ const preloadedContexts: Record<string, unknown> = {
|
|
|
4337
4338
|
// https://github.com/fedify-dev/fedify/issues/982
|
|
4338
4339
|
"https://w3id.org/fep/ef61": fepEf61,
|
|
4339
4340
|
|
|
4341
|
+
// The FEP-7aa9 context is hosted on Codeberg Pages, whose outages can
|
|
4342
|
+
// prevent actor documents from being parsed. Resolve it locally so that
|
|
4343
|
+
// parsing does not depend on the remote context server's availability.
|
|
4344
|
+
// See: https://w3id.org/fep/7aa9
|
|
4345
|
+
// https://github.com/fedify-dev/fedify/issues/1078
|
|
4346
|
+
"https://w3id.org/fep/7aa9": fep7aa9,
|
|
4347
|
+
|
|
4340
4348
|
// Lemmy's context document is served as application/json without the JSON-LD
|
|
4341
4349
|
// context Link header. The default document loader treats that as a regular
|
|
4342
4350
|
// JSON response instead of a JSON-LD context, so every Lemmy activity that
|
package/src/docloader.test.ts
CHANGED
|
@@ -330,6 +330,43 @@ test("getDocumentLoader()", async (t) => {
|
|
|
330
330
|
});
|
|
331
331
|
});
|
|
332
332
|
|
|
333
|
+
// A Codeberg Pages outage must not prevent loading the FEP-7aa9 context.
|
|
334
|
+
// See: https://github.com/fedify-dev/fedify/issues/1078
|
|
335
|
+
fetchMock.get("https://w3id.org/fep/7aa9", { status: 502 });
|
|
336
|
+
await t.test("preloaded FEP-7aa9 context", async () => {
|
|
337
|
+
const url = "https://w3id.org/fep/7aa9";
|
|
338
|
+
deepStrictEqual(await fetchDocumentLoader(url), {
|
|
339
|
+
contextUrl: null,
|
|
340
|
+
documentUrl: url,
|
|
341
|
+
document: {
|
|
342
|
+
"@context": {
|
|
343
|
+
"FeaturedCollection": "https://w3id.org/fep/7aa9#FeaturedCollection",
|
|
344
|
+
"FeaturedItem": "https://w3id.org/fep/7aa9#FeaturedItem",
|
|
345
|
+
"FeatureRequest": "https://w3id.org/fep/7aa9#FeatureRequest",
|
|
346
|
+
"FeatureAuthorization":
|
|
347
|
+
"https://w3id.org/fep/7aa9#FeatureAuthorization",
|
|
348
|
+
"topic": {
|
|
349
|
+
"@id": "https://w3id.org/fep/7aa9#topic",
|
|
350
|
+
"@type": "@id",
|
|
351
|
+
},
|
|
352
|
+
"featuredObject": {
|
|
353
|
+
"@id": "https://w3id.org/fep/7aa9#featuredObject",
|
|
354
|
+
"@type": "@id",
|
|
355
|
+
},
|
|
356
|
+
"canFeature": {
|
|
357
|
+
"@id": "https://w3id.org/fep/7aa9#canFeature",
|
|
358
|
+
"@type": "@id",
|
|
359
|
+
},
|
|
360
|
+
"featureAuthorization": {
|
|
361
|
+
"@id": "https://w3id.org/fep/7aa9#featureAuthorization",
|
|
362
|
+
"@type": "@id",
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
});
|
|
367
|
+
deepStrictEqual(fetchMock.callHistory.calls(url).length, 0);
|
|
368
|
+
});
|
|
369
|
+
|
|
333
370
|
await t.test("deny non-HTTP/HTTPS", async () => {
|
|
334
371
|
await rejects(
|
|
335
372
|
() => fetchDocumentLoader("ftp://localhost"),
|
package/src/docloader.ts
CHANGED
|
@@ -277,6 +277,7 @@ export interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
|
|
|
277
277
|
* - <https://www.w3.org/ns/cid/v1>
|
|
278
278
|
* - <https://w3id.org/security/multikey/v1>
|
|
279
279
|
* - <https://w3id.org/fep/ef61>
|
|
280
|
+
* - <https://w3id.org/fep/7aa9>
|
|
280
281
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
281
282
|
* - <http://schema.org/>
|
|
282
283
|
* @param options Options for the document loader.
|