@fedify/vocab-runtime 2.0.26-dev.1875 → 2.0.26

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.0.26-dev.1875+623710b2",
3
+ "version": "2.0.26",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./src/mod.ts",
package/dist/mod.cjs CHANGED
@@ -14,6 +14,119 @@ let node_crypto = require("node:crypto");
14
14
  let pkijs = require("pkijs");
15
15
  let _multiformats_base_x = require("@multiformats/base-x");
16
16
  _multiformats_base_x = require_chunk.__toESM(_multiformats_base_x);
17
+ //#region src/contexts/cid-v1.json
18
+ var cid_v1_default = { "@context": {
19
+ "@protected": true,
20
+ "id": "@id",
21
+ "type": "@type",
22
+ "alsoKnownAs": {
23
+ "@id": "https://www.w3.org/ns/activitystreams#alsoKnownAs",
24
+ "@type": "@id"
25
+ },
26
+ "assertionMethod": {
27
+ "@id": "https://w3id.org/security#assertionMethod",
28
+ "@type": "@id",
29
+ "@container": "@set"
30
+ },
31
+ "authentication": {
32
+ "@id": "https://w3id.org/security#authenticationMethod",
33
+ "@type": "@id",
34
+ "@container": "@set"
35
+ },
36
+ "capabilityDelegation": {
37
+ "@id": "https://w3id.org/security#capabilityDelegationMethod",
38
+ "@type": "@id",
39
+ "@container": "@set"
40
+ },
41
+ "capabilityInvocation": {
42
+ "@id": "https://w3id.org/security#capabilityInvocationMethod",
43
+ "@type": "@id",
44
+ "@container": "@set"
45
+ },
46
+ "controller": {
47
+ "@id": "https://w3id.org/security#controller",
48
+ "@type": "@id"
49
+ },
50
+ "keyAgreement": {
51
+ "@id": "https://w3id.org/security#keyAgreementMethod",
52
+ "@type": "@id",
53
+ "@container": "@set"
54
+ },
55
+ "service": {
56
+ "@id": "https://www.w3.org/ns/did#service",
57
+ "@type": "@id",
58
+ "@context": {
59
+ "@protected": true,
60
+ "id": "@id",
61
+ "type": "@type",
62
+ "serviceEndpoint": {
63
+ "@id": "https://www.w3.org/ns/did#serviceEndpoint",
64
+ "@type": "@id"
65
+ }
66
+ }
67
+ },
68
+ "verificationMethod": {
69
+ "@id": "https://w3id.org/security#verificationMethod",
70
+ "@type": "@id"
71
+ },
72
+ "Multikey": {
73
+ "@id": "https://w3id.org/security#Multikey",
74
+ "@context": {
75
+ "@protected": true,
76
+ "id": "@id",
77
+ "type": "@type",
78
+ "controller": {
79
+ "@id": "https://w3id.org/security#controller",
80
+ "@type": "@id"
81
+ },
82
+ "revoked": {
83
+ "@id": "https://w3id.org/security#revoked",
84
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
85
+ },
86
+ "expires": {
87
+ "@id": "https://w3id.org/security#expiration",
88
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
89
+ },
90
+ "publicKeyMultibase": {
91
+ "@id": "https://w3id.org/security#publicKeyMultibase",
92
+ "@type": "https://w3id.org/security#multibase"
93
+ },
94
+ "secretKeyMultibase": {
95
+ "@id": "https://w3id.org/security#secretKeyMultibase",
96
+ "@type": "https://w3id.org/security#multibase"
97
+ }
98
+ }
99
+ },
100
+ "JsonWebKey": {
101
+ "@id": "https://w3id.org/security#JsonWebKey",
102
+ "@context": {
103
+ "@protected": true,
104
+ "id": "@id",
105
+ "type": "@type",
106
+ "controller": {
107
+ "@id": "https://w3id.org/security#controller",
108
+ "@type": "@id"
109
+ },
110
+ "revoked": {
111
+ "@id": "https://w3id.org/security#revoked",
112
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
113
+ },
114
+ "expires": {
115
+ "@id": "https://w3id.org/security#expiration",
116
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
117
+ },
118
+ "publicKeyJwk": {
119
+ "@id": "https://w3id.org/security#publicKeyJwk",
120
+ "@type": "@json"
121
+ },
122
+ "secretKeyJwk": {
123
+ "@id": "https://w3id.org/security#secretKeyJwk",
124
+ "@type": "@json"
125
+ }
126
+ }
127
+ }
128
+ } };
129
+ //#endregion
17
130
  //#region src/contexts/fep-ef61.json
18
131
  var fep_ef61_default = { "@context": {
19
132
  "gateways": {
@@ -4287,6 +4400,7 @@ const preloadedContexts = {
4287
4400
  "@type": "@id"
4288
4401
  }
4289
4402
  } },
4403
+ "https://www.w3.org/ns/cid/v1": cid_v1_default,
4290
4404
  "https://w3id.org/fep/ef61": fep_ef61_default,
4291
4405
  "https://join-lemmy.org/context.json": join_lemmy_default,
4292
4406
  "http://joinmastodon.org/ns": { "@context": {
@@ -4320,7 +4434,7 @@ const preloadedContexts = {
4320
4434
  //#endregion
4321
4435
  //#region deno.json
4322
4436
  var name = "@fedify/vocab-runtime";
4323
- var version = "2.0.26-dev.1875+623710b2";
4437
+ var version = "2.0.26";
4324
4438
  //#endregion
4325
4439
  //#region src/link.ts
4326
4440
  const parametersNeedLowerCase = ["rel", "type"];
@@ -4881,6 +4995,7 @@ async function getRemoteDocument(url, response, fetch) {
4881
4995
  * - <https://w3id.org/security/v1>
4882
4996
  * - <https://w3id.org/security/data-integrity/v1>
4883
4997
  * - <https://www.w3.org/ns/did/v1>
4998
+ * - <https://www.w3.org/ns/cid/v1>
4884
4999
  * - <https://w3id.org/security/multikey/v1>
4885
5000
  * - <https://w3id.org/fep/ef61>
4886
5001
  * - <https://purl.archive.org/socialweb/webfinger>
package/dist/mod.d.cts CHANGED
@@ -177,6 +177,7 @@ interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
177
177
  * - <https://w3id.org/security/v1>
178
178
  * - <https://w3id.org/security/data-integrity/v1>
179
179
  * - <https://www.w3.org/ns/did/v1>
180
+ * - <https://www.w3.org/ns/cid/v1>
180
181
  * - <https://w3id.org/security/multikey/v1>
181
182
  * - <https://w3id.org/fep/ef61>
182
183
  * - <https://purl.archive.org/socialweb/webfinger>
package/dist/mod.d.ts CHANGED
@@ -176,6 +176,7 @@ interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
176
176
  * - <https://w3id.org/security/v1>
177
177
  * - <https://w3id.org/security/data-integrity/v1>
178
178
  * - <https://www.w3.org/ns/did/v1>
179
+ * - <https://www.w3.org/ns/cid/v1>
179
180
  * - <https://w3id.org/security/multikey/v1>
180
181
  * - <https://w3id.org/fep/ef61>
181
182
  * - <https://purl.archive.org/socialweb/webfinger>
package/dist/mod.js CHANGED
@@ -10,6 +10,119 @@ import { decodeBase64Url } from "byte-encodings/base64url";
10
10
  import { createPublicKey } from "node:crypto";
11
11
  import { PublicKeyInfo } from "pkijs";
12
12
  import baseX from "@multiformats/base-x";
13
+ //#region src/contexts/cid-v1.json
14
+ var cid_v1_default = { "@context": {
15
+ "@protected": true,
16
+ "id": "@id",
17
+ "type": "@type",
18
+ "alsoKnownAs": {
19
+ "@id": "https://www.w3.org/ns/activitystreams#alsoKnownAs",
20
+ "@type": "@id"
21
+ },
22
+ "assertionMethod": {
23
+ "@id": "https://w3id.org/security#assertionMethod",
24
+ "@type": "@id",
25
+ "@container": "@set"
26
+ },
27
+ "authentication": {
28
+ "@id": "https://w3id.org/security#authenticationMethod",
29
+ "@type": "@id",
30
+ "@container": "@set"
31
+ },
32
+ "capabilityDelegation": {
33
+ "@id": "https://w3id.org/security#capabilityDelegationMethod",
34
+ "@type": "@id",
35
+ "@container": "@set"
36
+ },
37
+ "capabilityInvocation": {
38
+ "@id": "https://w3id.org/security#capabilityInvocationMethod",
39
+ "@type": "@id",
40
+ "@container": "@set"
41
+ },
42
+ "controller": {
43
+ "@id": "https://w3id.org/security#controller",
44
+ "@type": "@id"
45
+ },
46
+ "keyAgreement": {
47
+ "@id": "https://w3id.org/security#keyAgreementMethod",
48
+ "@type": "@id",
49
+ "@container": "@set"
50
+ },
51
+ "service": {
52
+ "@id": "https://www.w3.org/ns/did#service",
53
+ "@type": "@id",
54
+ "@context": {
55
+ "@protected": true,
56
+ "id": "@id",
57
+ "type": "@type",
58
+ "serviceEndpoint": {
59
+ "@id": "https://www.w3.org/ns/did#serviceEndpoint",
60
+ "@type": "@id"
61
+ }
62
+ }
63
+ },
64
+ "verificationMethod": {
65
+ "@id": "https://w3id.org/security#verificationMethod",
66
+ "@type": "@id"
67
+ },
68
+ "Multikey": {
69
+ "@id": "https://w3id.org/security#Multikey",
70
+ "@context": {
71
+ "@protected": true,
72
+ "id": "@id",
73
+ "type": "@type",
74
+ "controller": {
75
+ "@id": "https://w3id.org/security#controller",
76
+ "@type": "@id"
77
+ },
78
+ "revoked": {
79
+ "@id": "https://w3id.org/security#revoked",
80
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
81
+ },
82
+ "expires": {
83
+ "@id": "https://w3id.org/security#expiration",
84
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
85
+ },
86
+ "publicKeyMultibase": {
87
+ "@id": "https://w3id.org/security#publicKeyMultibase",
88
+ "@type": "https://w3id.org/security#multibase"
89
+ },
90
+ "secretKeyMultibase": {
91
+ "@id": "https://w3id.org/security#secretKeyMultibase",
92
+ "@type": "https://w3id.org/security#multibase"
93
+ }
94
+ }
95
+ },
96
+ "JsonWebKey": {
97
+ "@id": "https://w3id.org/security#JsonWebKey",
98
+ "@context": {
99
+ "@protected": true,
100
+ "id": "@id",
101
+ "type": "@type",
102
+ "controller": {
103
+ "@id": "https://w3id.org/security#controller",
104
+ "@type": "@id"
105
+ },
106
+ "revoked": {
107
+ "@id": "https://w3id.org/security#revoked",
108
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
109
+ },
110
+ "expires": {
111
+ "@id": "https://w3id.org/security#expiration",
112
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
113
+ },
114
+ "publicKeyJwk": {
115
+ "@id": "https://w3id.org/security#publicKeyJwk",
116
+ "@type": "@json"
117
+ },
118
+ "secretKeyJwk": {
119
+ "@id": "https://w3id.org/security#secretKeyJwk",
120
+ "@type": "@json"
121
+ }
122
+ }
123
+ }
124
+ } };
125
+ //#endregion
13
126
  //#region src/contexts/fep-ef61.json
14
127
  var fep_ef61_default = { "@context": {
15
128
  "gateways": {
@@ -4283,6 +4396,7 @@ const preloadedContexts = {
4283
4396
  "@type": "@id"
4284
4397
  }
4285
4398
  } },
4399
+ "https://www.w3.org/ns/cid/v1": cid_v1_default,
4286
4400
  "https://w3id.org/fep/ef61": fep_ef61_default,
4287
4401
  "https://join-lemmy.org/context.json": join_lemmy_default,
4288
4402
  "http://joinmastodon.org/ns": { "@context": {
@@ -4316,7 +4430,7 @@ const preloadedContexts = {
4316
4430
  //#endregion
4317
4431
  //#region deno.json
4318
4432
  var name = "@fedify/vocab-runtime";
4319
- var version = "2.0.26-dev.1875+623710b2";
4433
+ var version = "2.0.26";
4320
4434
  //#endregion
4321
4435
  //#region src/link.ts
4322
4436
  const parametersNeedLowerCase = ["rel", "type"];
@@ -4877,6 +4991,7 @@ async function getRemoteDocument(url, response, fetch) {
4877
4991
  * - <https://w3id.org/security/v1>
4878
4992
  * - <https://w3id.org/security/data-integrity/v1>
4879
4993
  * - <https://www.w3.org/ns/did/v1>
4994
+ * - <https://www.w3.org/ns/cid/v1>
4880
4995
  * - <https://w3id.org/security/multikey/v1>
4881
4996
  * - <https://w3id.org/fep/ef61>
4882
4997
  * - <https://purl.archive.org/socialweb/webfinger>
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Do9eywBl.cjs");
2
- const require_request = require("./request-DCwdGaFu.cjs");
2
+ const require_request = require("./request-9cirG9c4.cjs");
3
3
  const require_link = require("./link-B6ZWBZhf.cjs");
4
4
  const require_url = require("./url-CqwkmczT.cjs");
5
5
  let node_assert = require("node:assert");
@@ -1207,6 +1207,119 @@ var esm_default = new class FetchMock {
1207
1207
  }
1208
1208
  }({ ...defaultFetchMockConfig });
1209
1209
  //#endregion
1210
+ //#region src/contexts/cid-v1.json
1211
+ var cid_v1_default = { "@context": {
1212
+ "@protected": true,
1213
+ "id": "@id",
1214
+ "type": "@type",
1215
+ "alsoKnownAs": {
1216
+ "@id": "https://www.w3.org/ns/activitystreams#alsoKnownAs",
1217
+ "@type": "@id"
1218
+ },
1219
+ "assertionMethod": {
1220
+ "@id": "https://w3id.org/security#assertionMethod",
1221
+ "@type": "@id",
1222
+ "@container": "@set"
1223
+ },
1224
+ "authentication": {
1225
+ "@id": "https://w3id.org/security#authenticationMethod",
1226
+ "@type": "@id",
1227
+ "@container": "@set"
1228
+ },
1229
+ "capabilityDelegation": {
1230
+ "@id": "https://w3id.org/security#capabilityDelegationMethod",
1231
+ "@type": "@id",
1232
+ "@container": "@set"
1233
+ },
1234
+ "capabilityInvocation": {
1235
+ "@id": "https://w3id.org/security#capabilityInvocationMethod",
1236
+ "@type": "@id",
1237
+ "@container": "@set"
1238
+ },
1239
+ "controller": {
1240
+ "@id": "https://w3id.org/security#controller",
1241
+ "@type": "@id"
1242
+ },
1243
+ "keyAgreement": {
1244
+ "@id": "https://w3id.org/security#keyAgreementMethod",
1245
+ "@type": "@id",
1246
+ "@container": "@set"
1247
+ },
1248
+ "service": {
1249
+ "@id": "https://www.w3.org/ns/did#service",
1250
+ "@type": "@id",
1251
+ "@context": {
1252
+ "@protected": true,
1253
+ "id": "@id",
1254
+ "type": "@type",
1255
+ "serviceEndpoint": {
1256
+ "@id": "https://www.w3.org/ns/did#serviceEndpoint",
1257
+ "@type": "@id"
1258
+ }
1259
+ }
1260
+ },
1261
+ "verificationMethod": {
1262
+ "@id": "https://w3id.org/security#verificationMethod",
1263
+ "@type": "@id"
1264
+ },
1265
+ "Multikey": {
1266
+ "@id": "https://w3id.org/security#Multikey",
1267
+ "@context": {
1268
+ "@protected": true,
1269
+ "id": "@id",
1270
+ "type": "@type",
1271
+ "controller": {
1272
+ "@id": "https://w3id.org/security#controller",
1273
+ "@type": "@id"
1274
+ },
1275
+ "revoked": {
1276
+ "@id": "https://w3id.org/security#revoked",
1277
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
1278
+ },
1279
+ "expires": {
1280
+ "@id": "https://w3id.org/security#expiration",
1281
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
1282
+ },
1283
+ "publicKeyMultibase": {
1284
+ "@id": "https://w3id.org/security#publicKeyMultibase",
1285
+ "@type": "https://w3id.org/security#multibase"
1286
+ },
1287
+ "secretKeyMultibase": {
1288
+ "@id": "https://w3id.org/security#secretKeyMultibase",
1289
+ "@type": "https://w3id.org/security#multibase"
1290
+ }
1291
+ }
1292
+ },
1293
+ "JsonWebKey": {
1294
+ "@id": "https://w3id.org/security#JsonWebKey",
1295
+ "@context": {
1296
+ "@protected": true,
1297
+ "id": "@id",
1298
+ "type": "@type",
1299
+ "controller": {
1300
+ "@id": "https://w3id.org/security#controller",
1301
+ "@type": "@id"
1302
+ },
1303
+ "revoked": {
1304
+ "@id": "https://w3id.org/security#revoked",
1305
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
1306
+ },
1307
+ "expires": {
1308
+ "@id": "https://w3id.org/security#expiration",
1309
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
1310
+ },
1311
+ "publicKeyJwk": {
1312
+ "@id": "https://w3id.org/security#publicKeyJwk",
1313
+ "@type": "@json"
1314
+ },
1315
+ "secretKeyJwk": {
1316
+ "@id": "https://w3id.org/security#secretKeyJwk",
1317
+ "@type": "@json"
1318
+ }
1319
+ }
1320
+ }
1321
+ } };
1322
+ //#endregion
1210
1323
  //#region src/contexts/fep-ef61.json
1211
1324
  var fep_ef61_default = { "@context": {
1212
1325
  "gateways": {
@@ -5480,6 +5593,7 @@ const preloadedContexts = {
5480
5593
  "@type": "@id"
5481
5594
  }
5482
5595
  } },
5596
+ "https://www.w3.org/ns/cid/v1": cid_v1_default,
5483
5597
  "https://w3id.org/fep/ef61": fep_ef61_default,
5484
5598
  "https://join-lemmy.org/context.json": join_lemmy_default,
5485
5599
  "http://joinmastodon.org/ns": { "@context": {
@@ -5625,6 +5739,7 @@ async function getRemoteDocument(url, response, fetch) {
5625
5739
  * - <https://w3id.org/security/v1>
5626
5740
  * - <https://w3id.org/security/data-integrity/v1>
5627
5741
  * - <https://www.w3.org/ns/did/v1>
5742
+ * - <https://www.w3.org/ns/cid/v1>
5628
5743
  * - <https://w3id.org/security/multikey/v1>
5629
5744
  * - <https://w3id.org/fep/ef61>
5630
5745
  * - <https://purl.archive.org/socialweb/webfinger>
@@ -5928,6 +6043,15 @@ function getDocumentLoader({ allowPrivateAddress, skipPreloadedContexts, userAge
5928
6043
  document
5929
6044
  });
5930
6045
  });
6046
+ esm_default.get("https://www.w3.org/ns/cid/v1", { status: 503 });
6047
+ await t.test("preloaded CID v1 context", async () => {
6048
+ const url = "https://www.w3.org/ns/cid/v1";
6049
+ (0, node_assert.deepStrictEqual)(await fetchDocumentLoader(url), {
6050
+ contextUrl: null,
6051
+ documentUrl: url,
6052
+ document: cid_v1_default
6053
+ });
6054
+ });
5931
6055
  await t.test("preloaded FEP-ef61 context", async () => {
5932
6056
  const url = "https://w3id.org/fep/ef61";
5933
6057
  (0, node_assert.ok)(url in preloadedContexts);
@@ -1,4 +1,4 @@
1
- import { a as name, i as logRequest, n as createActivityPubRequest, o as version, t as FetchError } from "./request-ChLeka-J.mjs";
1
+ import { a as name, i as logRequest, n as createActivityPubRequest, o as version, t as FetchError } from "./request-BnYMxdBV.mjs";
2
2
  import { t as HttpHeaderLink } from "./link-B8JGXSS2.mjs";
3
3
  import { o as validatePublicUrl, t as UrlError } from "./url-BulORwtj.mjs";
4
4
  import { deepStrictEqual, ok, rejects } from "node:assert";
@@ -1226,6 +1226,119 @@ var esm_default = new class FetchMock {
1226
1226
  }
1227
1227
  }({ ...defaultFetchMockConfig });
1228
1228
  //#endregion
1229
+ //#region src/contexts/cid-v1.json
1230
+ var cid_v1_default = { "@context": {
1231
+ "@protected": true,
1232
+ "id": "@id",
1233
+ "type": "@type",
1234
+ "alsoKnownAs": {
1235
+ "@id": "https://www.w3.org/ns/activitystreams#alsoKnownAs",
1236
+ "@type": "@id"
1237
+ },
1238
+ "assertionMethod": {
1239
+ "@id": "https://w3id.org/security#assertionMethod",
1240
+ "@type": "@id",
1241
+ "@container": "@set"
1242
+ },
1243
+ "authentication": {
1244
+ "@id": "https://w3id.org/security#authenticationMethod",
1245
+ "@type": "@id",
1246
+ "@container": "@set"
1247
+ },
1248
+ "capabilityDelegation": {
1249
+ "@id": "https://w3id.org/security#capabilityDelegationMethod",
1250
+ "@type": "@id",
1251
+ "@container": "@set"
1252
+ },
1253
+ "capabilityInvocation": {
1254
+ "@id": "https://w3id.org/security#capabilityInvocationMethod",
1255
+ "@type": "@id",
1256
+ "@container": "@set"
1257
+ },
1258
+ "controller": {
1259
+ "@id": "https://w3id.org/security#controller",
1260
+ "@type": "@id"
1261
+ },
1262
+ "keyAgreement": {
1263
+ "@id": "https://w3id.org/security#keyAgreementMethod",
1264
+ "@type": "@id",
1265
+ "@container": "@set"
1266
+ },
1267
+ "service": {
1268
+ "@id": "https://www.w3.org/ns/did#service",
1269
+ "@type": "@id",
1270
+ "@context": {
1271
+ "@protected": true,
1272
+ "id": "@id",
1273
+ "type": "@type",
1274
+ "serviceEndpoint": {
1275
+ "@id": "https://www.w3.org/ns/did#serviceEndpoint",
1276
+ "@type": "@id"
1277
+ }
1278
+ }
1279
+ },
1280
+ "verificationMethod": {
1281
+ "@id": "https://w3id.org/security#verificationMethod",
1282
+ "@type": "@id"
1283
+ },
1284
+ "Multikey": {
1285
+ "@id": "https://w3id.org/security#Multikey",
1286
+ "@context": {
1287
+ "@protected": true,
1288
+ "id": "@id",
1289
+ "type": "@type",
1290
+ "controller": {
1291
+ "@id": "https://w3id.org/security#controller",
1292
+ "@type": "@id"
1293
+ },
1294
+ "revoked": {
1295
+ "@id": "https://w3id.org/security#revoked",
1296
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
1297
+ },
1298
+ "expires": {
1299
+ "@id": "https://w3id.org/security#expiration",
1300
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
1301
+ },
1302
+ "publicKeyMultibase": {
1303
+ "@id": "https://w3id.org/security#publicKeyMultibase",
1304
+ "@type": "https://w3id.org/security#multibase"
1305
+ },
1306
+ "secretKeyMultibase": {
1307
+ "@id": "https://w3id.org/security#secretKeyMultibase",
1308
+ "@type": "https://w3id.org/security#multibase"
1309
+ }
1310
+ }
1311
+ },
1312
+ "JsonWebKey": {
1313
+ "@id": "https://w3id.org/security#JsonWebKey",
1314
+ "@context": {
1315
+ "@protected": true,
1316
+ "id": "@id",
1317
+ "type": "@type",
1318
+ "controller": {
1319
+ "@id": "https://w3id.org/security#controller",
1320
+ "@type": "@id"
1321
+ },
1322
+ "revoked": {
1323
+ "@id": "https://w3id.org/security#revoked",
1324
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
1325
+ },
1326
+ "expires": {
1327
+ "@id": "https://w3id.org/security#expiration",
1328
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
1329
+ },
1330
+ "publicKeyJwk": {
1331
+ "@id": "https://w3id.org/security#publicKeyJwk",
1332
+ "@type": "@json"
1333
+ },
1334
+ "secretKeyJwk": {
1335
+ "@id": "https://w3id.org/security#secretKeyJwk",
1336
+ "@type": "@json"
1337
+ }
1338
+ }
1339
+ }
1340
+ } };
1341
+ //#endregion
1229
1342
  //#region src/contexts/fep-ef61.json
1230
1343
  var fep_ef61_default = { "@context": {
1231
1344
  "gateways": {
@@ -5499,6 +5612,7 @@ const preloadedContexts = {
5499
5612
  "@type": "@id"
5500
5613
  }
5501
5614
  } },
5615
+ "https://www.w3.org/ns/cid/v1": cid_v1_default,
5502
5616
  "https://w3id.org/fep/ef61": fep_ef61_default,
5503
5617
  "https://join-lemmy.org/context.json": join_lemmy_default,
5504
5618
  "http://joinmastodon.org/ns": { "@context": {
@@ -5644,6 +5758,7 @@ async function getRemoteDocument(url, response, fetch) {
5644
5758
  * - <https://w3id.org/security/v1>
5645
5759
  * - <https://w3id.org/security/data-integrity/v1>
5646
5760
  * - <https://www.w3.org/ns/did/v1>
5761
+ * - <https://www.w3.org/ns/cid/v1>
5647
5762
  * - <https://w3id.org/security/multikey/v1>
5648
5763
  * - <https://w3id.org/fep/ef61>
5649
5764
  * - <https://purl.archive.org/socialweb/webfinger>
@@ -5947,6 +6062,15 @@ test("getDocumentLoader()", async (t) => {
5947
6062
  document
5948
6063
  });
5949
6064
  });
6065
+ esm_default.get("https://www.w3.org/ns/cid/v1", { status: 503 });
6066
+ await t.test("preloaded CID v1 context", async () => {
6067
+ const url = "https://www.w3.org/ns/cid/v1";
6068
+ deepStrictEqual(await fetchDocumentLoader(url), {
6069
+ contextUrl: null,
6070
+ documentUrl: url,
6071
+ document: cid_v1_default
6072
+ });
6073
+ });
5950
6074
  await t.test("preloaded FEP-ef61 context", async () => {
5951
6075
  const url = "https://w3id.org/fep/ef61";
5952
6076
  ok(url in preloadedContexts);
@@ -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.26-dev.1875+623710b2";
6
+ var version = "2.0.26";
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.0.26-dev.1875+623710b2";
4
+ var version = "2.0.26";
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-DCwdGaFu.cjs");
2
+ const require_request = require("./request-9cirG9c4.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-ChLeka-J.mjs";
1
+ import { o as version, r as getUserAgent } from "./request-BnYMxdBV.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.0.26-dev.1875+623710b2",
3
+ "version": "2.0.26",
4
4
  "homepage": "https://fedify.dev/",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,114 @@
1
+ {
2
+ "@context": {
3
+ "@protected": true,
4
+ "id": "@id",
5
+ "type": "@type",
6
+
7
+ "alsoKnownAs": {
8
+ "@id": "https://www.w3.org/ns/activitystreams#alsoKnownAs",
9
+ "@type": "@id"
10
+ },
11
+ "assertionMethod": {
12
+ "@id": "https://w3id.org/security#assertionMethod",
13
+ "@type": "@id",
14
+ "@container": "@set"
15
+ },
16
+ "authentication": {
17
+ "@id": "https://w3id.org/security#authenticationMethod",
18
+ "@type": "@id",
19
+ "@container": "@set"
20
+ },
21
+ "capabilityDelegation": {
22
+ "@id": "https://w3id.org/security#capabilityDelegationMethod",
23
+ "@type": "@id",
24
+ "@container": "@set"
25
+ },
26
+ "capabilityInvocation": {
27
+ "@id": "https://w3id.org/security#capabilityInvocationMethod",
28
+ "@type": "@id",
29
+ "@container": "@set"
30
+ },
31
+ "controller": {
32
+ "@id": "https://w3id.org/security#controller",
33
+ "@type": "@id"
34
+ },
35
+ "keyAgreement": {
36
+ "@id": "https://w3id.org/security#keyAgreementMethod",
37
+ "@type": "@id",
38
+ "@container": "@set"
39
+ },
40
+ "service": {
41
+ "@id": "https://www.w3.org/ns/did#service",
42
+ "@type": "@id",
43
+ "@context": {
44
+ "@protected": true,
45
+ "id": "@id",
46
+ "type": "@type",
47
+ "serviceEndpoint": {
48
+ "@id": "https://www.w3.org/ns/did#serviceEndpoint",
49
+ "@type": "@id"
50
+ }
51
+ }
52
+ },
53
+ "verificationMethod": {
54
+ "@id": "https://w3id.org/security#verificationMethod",
55
+ "@type": "@id"
56
+ },
57
+ "Multikey": {
58
+ "@id": "https://w3id.org/security#Multikey",
59
+ "@context": {
60
+ "@protected": true,
61
+ "id": "@id",
62
+ "type": "@type",
63
+ "controller": {
64
+ "@id": "https://w3id.org/security#controller",
65
+ "@type": "@id"
66
+ },
67
+ "revoked": {
68
+ "@id": "https://w3id.org/security#revoked",
69
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
70
+ },
71
+ "expires": {
72
+ "@id": "https://w3id.org/security#expiration",
73
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
74
+ },
75
+ "publicKeyMultibase": {
76
+ "@id": "https://w3id.org/security#publicKeyMultibase",
77
+ "@type": "https://w3id.org/security#multibase"
78
+ },
79
+ "secretKeyMultibase": {
80
+ "@id": "https://w3id.org/security#secretKeyMultibase",
81
+ "@type": "https://w3id.org/security#multibase"
82
+ }
83
+ }
84
+ },
85
+ "JsonWebKey": {
86
+ "@id": "https://w3id.org/security#JsonWebKey",
87
+ "@context": {
88
+ "@protected": true,
89
+ "id": "@id",
90
+ "type": "@type",
91
+ "controller": {
92
+ "@id": "https://w3id.org/security#controller",
93
+ "@type": "@id"
94
+ },
95
+ "revoked": {
96
+ "@id": "https://w3id.org/security#revoked",
97
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
98
+ },
99
+ "expires": {
100
+ "@id": "https://w3id.org/security#expiration",
101
+ "@type": "http://www.w3.org/2001/XMLSchema#dateTime"
102
+ },
103
+ "publicKeyJwk": {
104
+ "@id": "https://w3id.org/security#publicKeyJwk",
105
+ "@type": "@json"
106
+ },
107
+ "secretKeyJwk": {
108
+ "@id": "https://w3id.org/security#secretKeyJwk",
109
+ "@type": "@json"
110
+ }
111
+ }
112
+ }
113
+ }
114
+ }
package/src/contexts.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  // https://github.com/fedify-dev/fedify/issues/74
3
3
  // cSpell: disable
4
4
 
5
+ import cidV1Context from "./contexts/cid-v1.json" with { type: "json" };
5
6
  import fepEf61 from "./contexts/fep-ef61.json" with { type: "json" };
6
7
  import joinLemmyContext from "./contexts/join-lemmy.json" with { type: "json" };
7
8
  import miscellany from "./contexts/miscellany.json" with { type: "json" };
@@ -4319,6 +4320,14 @@ const preloadedContexts: Record<string, unknown> = {
4319
4320
  },
4320
4321
  },
4321
4322
 
4323
+ // Controlled Identifiers v1.0 requires JSON-LD processors to treat this
4324
+ // context URL as already resolved. We ship the official W3C context so that
4325
+ // controlled identifier documents can be processed without depending on the
4326
+ // availability of the remote context server.
4327
+ // See: https://www.w3.org/TR/cid-1.0/#json-ld-context
4328
+ // https://github.com/fedify-dev/fedify/issues/932
4329
+ "https://www.w3.org/ns/cid/v1": cidV1Context,
4330
+
4322
4331
  // The FEP-ef61 context. The w3id.org URL redirects to Codeberg Pages, which
4323
4332
  // suffers recurring outages; while it is unreachable, every document
4324
4333
  // referencing this URL fails JSON-LD expansion before application handlers
@@ -2,6 +2,7 @@ import fetchMock from "fetch-mock";
2
2
  import { deepStrictEqual, ok, rejects } from "node:assert";
3
3
  import { test } from "node:test";
4
4
  import preloadedContexts from "./contexts.ts";
5
+ import cidV1Context from "./contexts/cid-v1.json" with { type: "json" };
5
6
  import { getDocumentLoader } from "./docloader.ts";
6
7
  import { FetchError } from "./request.ts";
7
8
  import { UrlError } from "./url.ts";
@@ -285,6 +286,21 @@ test("getDocumentLoader()", async (t) => {
285
286
  }
286
287
  });
287
288
 
289
+ // Controlled Identifiers v1.0 requires JSON-LD processors to treat this
290
+ // context URL as already resolved. A temporary W3C outage must not prevent
291
+ // an otherwise valid document from being processed.
292
+ // See: https://www.w3.org/TR/cid-1.0/#json-ld-context
293
+ // https://github.com/fedify-dev/fedify/issues/932
294
+ fetchMock.get("https://www.w3.org/ns/cid/v1", { status: 503 });
295
+ await t.test("preloaded CID v1 context", async () => {
296
+ const url = "https://www.w3.org/ns/cid/v1";
297
+ deepStrictEqual(await fetchDocumentLoader(url), {
298
+ contextUrl: null,
299
+ documentUrl: url,
300
+ document: cidV1Context,
301
+ });
302
+ });
303
+
288
304
  // The <https://w3id.org/fep/ef61> URL redirects to a Codeberg Pages host
289
305
  // which suffers recurring outages; while it is unreachable, expanding any
290
306
  // document referencing it fails before application handlers run. It has to
package/src/docloader.ts CHANGED
@@ -276,6 +276,7 @@ export interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
276
276
  * - <https://w3id.org/security/v1>
277
277
  * - <https://w3id.org/security/data-integrity/v1>
278
278
  * - <https://www.w3.org/ns/did/v1>
279
+ * - <https://www.w3.org/ns/cid/v1>
279
280
  * - <https://w3id.org/security/multikey/v1>
280
281
  * - <https://w3id.org/fep/ef61>
281
282
  * - <https://purl.archive.org/socialweb/webfinger>