@fedify/vocab-runtime 2.2.11-dev.1874 → 2.2.11
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 +116 -1
- package/dist/mod.d.cts +1 -0
- package/dist/mod.d.ts +1 -0
- package/dist/mod.js +116 -1
- package/dist/tests/decimal.test.cjs +1 -1
- package/dist/tests/decimal.test.mjs +1 -1
- package/dist/tests/{docloader-DsI-oYxK.mjs → docloader-Nug7_hIl.mjs} +117 -2
- package/dist/tests/{docloader-CrcEtsh6.cjs → docloader-ekzTbc9R.cjs} +122 -1
- package/dist/tests/docloader.test.cjs +11 -2
- package/dist/tests/docloader.test.mjs +11 -2
- package/dist/tests/{request-hq9B172s.mjs → request-CMtb-99N.mjs} +1 -1
- package/dist/tests/{request-Gb4epphX.cjs → request-HcA2nRAs.cjs} +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/cid-v1.json +114 -0
- package/src/contexts.ts +9 -0
- package/src/docloader.test.ts +16 -0
- package/src/docloader.ts +1 -0
package/deno.json
CHANGED
package/dist/mod.cjs
CHANGED
|
@@ -393,6 +393,119 @@ var activitystreams_default = { "@context": {
|
|
|
393
393
|
}
|
|
394
394
|
} };
|
|
395
395
|
//#endregion
|
|
396
|
+
//#region src/contexts/cid-v1.json
|
|
397
|
+
var cid_v1_default = { "@context": {
|
|
398
|
+
"@protected": true,
|
|
399
|
+
"id": "@id",
|
|
400
|
+
"type": "@type",
|
|
401
|
+
"alsoKnownAs": {
|
|
402
|
+
"@id": "https://www.w3.org/ns/activitystreams#alsoKnownAs",
|
|
403
|
+
"@type": "@id"
|
|
404
|
+
},
|
|
405
|
+
"assertionMethod": {
|
|
406
|
+
"@id": "https://w3id.org/security#assertionMethod",
|
|
407
|
+
"@type": "@id",
|
|
408
|
+
"@container": "@set"
|
|
409
|
+
},
|
|
410
|
+
"authentication": {
|
|
411
|
+
"@id": "https://w3id.org/security#authenticationMethod",
|
|
412
|
+
"@type": "@id",
|
|
413
|
+
"@container": "@set"
|
|
414
|
+
},
|
|
415
|
+
"capabilityDelegation": {
|
|
416
|
+
"@id": "https://w3id.org/security#capabilityDelegationMethod",
|
|
417
|
+
"@type": "@id",
|
|
418
|
+
"@container": "@set"
|
|
419
|
+
},
|
|
420
|
+
"capabilityInvocation": {
|
|
421
|
+
"@id": "https://w3id.org/security#capabilityInvocationMethod",
|
|
422
|
+
"@type": "@id",
|
|
423
|
+
"@container": "@set"
|
|
424
|
+
},
|
|
425
|
+
"controller": {
|
|
426
|
+
"@id": "https://w3id.org/security#controller",
|
|
427
|
+
"@type": "@id"
|
|
428
|
+
},
|
|
429
|
+
"keyAgreement": {
|
|
430
|
+
"@id": "https://w3id.org/security#keyAgreementMethod",
|
|
431
|
+
"@type": "@id",
|
|
432
|
+
"@container": "@set"
|
|
433
|
+
},
|
|
434
|
+
"service": {
|
|
435
|
+
"@id": "https://www.w3.org/ns/did#service",
|
|
436
|
+
"@type": "@id",
|
|
437
|
+
"@context": {
|
|
438
|
+
"@protected": true,
|
|
439
|
+
"id": "@id",
|
|
440
|
+
"type": "@type",
|
|
441
|
+
"serviceEndpoint": {
|
|
442
|
+
"@id": "https://www.w3.org/ns/did#serviceEndpoint",
|
|
443
|
+
"@type": "@id"
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
"verificationMethod": {
|
|
448
|
+
"@id": "https://w3id.org/security#verificationMethod",
|
|
449
|
+
"@type": "@id"
|
|
450
|
+
},
|
|
451
|
+
"Multikey": {
|
|
452
|
+
"@id": "https://w3id.org/security#Multikey",
|
|
453
|
+
"@context": {
|
|
454
|
+
"@protected": true,
|
|
455
|
+
"id": "@id",
|
|
456
|
+
"type": "@type",
|
|
457
|
+
"controller": {
|
|
458
|
+
"@id": "https://w3id.org/security#controller",
|
|
459
|
+
"@type": "@id"
|
|
460
|
+
},
|
|
461
|
+
"revoked": {
|
|
462
|
+
"@id": "https://w3id.org/security#revoked",
|
|
463
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
464
|
+
},
|
|
465
|
+
"expires": {
|
|
466
|
+
"@id": "https://w3id.org/security#expiration",
|
|
467
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
468
|
+
},
|
|
469
|
+
"publicKeyMultibase": {
|
|
470
|
+
"@id": "https://w3id.org/security#publicKeyMultibase",
|
|
471
|
+
"@type": "https://w3id.org/security#multibase"
|
|
472
|
+
},
|
|
473
|
+
"secretKeyMultibase": {
|
|
474
|
+
"@id": "https://w3id.org/security#secretKeyMultibase",
|
|
475
|
+
"@type": "https://w3id.org/security#multibase"
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
},
|
|
479
|
+
"JsonWebKey": {
|
|
480
|
+
"@id": "https://w3id.org/security#JsonWebKey",
|
|
481
|
+
"@context": {
|
|
482
|
+
"@protected": true,
|
|
483
|
+
"id": "@id",
|
|
484
|
+
"type": "@type",
|
|
485
|
+
"controller": {
|
|
486
|
+
"@id": "https://w3id.org/security#controller",
|
|
487
|
+
"@type": "@id"
|
|
488
|
+
},
|
|
489
|
+
"revoked": {
|
|
490
|
+
"@id": "https://w3id.org/security#revoked",
|
|
491
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
492
|
+
},
|
|
493
|
+
"expires": {
|
|
494
|
+
"@id": "https://w3id.org/security#expiration",
|
|
495
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
496
|
+
},
|
|
497
|
+
"publicKeyJwk": {
|
|
498
|
+
"@id": "https://w3id.org/security#publicKeyJwk",
|
|
499
|
+
"@type": "@json"
|
|
500
|
+
},
|
|
501
|
+
"secretKeyJwk": {
|
|
502
|
+
"@id": "https://w3id.org/security#secretKeyJwk",
|
|
503
|
+
"@type": "@json"
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
} };
|
|
508
|
+
//#endregion
|
|
396
509
|
//#region src/contexts/did-v1.json
|
|
397
510
|
var did_v1_default = { "@context": {
|
|
398
511
|
"@protected": true,
|
|
@@ -4401,6 +4514,7 @@ const preloadedContexts = {
|
|
|
4401
4514
|
"http://schema.org/": schemaorg_default,
|
|
4402
4515
|
"https://gotosocial.org/ns": gotosocial_default,
|
|
4403
4516
|
"https://w3id.org/fep/5711": fep_5711_default,
|
|
4517
|
+
"https://www.w3.org/ns/cid/v1": cid_v1_default,
|
|
4404
4518
|
"https://w3id.org/fep/ef61": fep_ef61_default,
|
|
4405
4519
|
"https://join-lemmy.org/context.json": join_lemmy_default,
|
|
4406
4520
|
"http://joinmastodon.org/ns": joinmastodon_default,
|
|
@@ -4409,7 +4523,7 @@ const preloadedContexts = {
|
|
|
4409
4523
|
//#endregion
|
|
4410
4524
|
//#region deno.json
|
|
4411
4525
|
var name = "@fedify/vocab-runtime";
|
|
4412
|
-
var version = "2.2.11
|
|
4526
|
+
var version = "2.2.11";
|
|
4413
4527
|
//#endregion
|
|
4414
4528
|
//#region src/link.ts
|
|
4415
4529
|
const parametersNeedLowerCase = ["rel", "type"];
|
|
@@ -4976,6 +5090,7 @@ async function getRemoteDocument(url, response, fetch) {
|
|
|
4976
5090
|
* - <https://w3id.org/security/v1>
|
|
4977
5091
|
* - <https://w3id.org/security/data-integrity/v1>
|
|
4978
5092
|
* - <https://www.w3.org/ns/did/v1>
|
|
5093
|
+
* - <https://www.w3.org/ns/cid/v1>
|
|
4979
5094
|
* - <https://w3id.org/security/multikey/v1>
|
|
4980
5095
|
* - <https://w3id.org/fep/ef61>
|
|
4981
5096
|
* - <https://purl.archive.org/socialweb/webfinger>
|
package/dist/mod.d.cts
CHANGED
|
@@ -188,6 +188,7 @@ interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
|
|
|
188
188
|
* - <https://w3id.org/security/v1>
|
|
189
189
|
* - <https://w3id.org/security/data-integrity/v1>
|
|
190
190
|
* - <https://www.w3.org/ns/did/v1>
|
|
191
|
+
* - <https://www.w3.org/ns/cid/v1>
|
|
191
192
|
* - <https://w3id.org/security/multikey/v1>
|
|
192
193
|
* - <https://w3id.org/fep/ef61>
|
|
193
194
|
* - <https://purl.archive.org/socialweb/webfinger>
|
package/dist/mod.d.ts
CHANGED
|
@@ -187,6 +187,7 @@ interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
|
|
|
187
187
|
* - <https://w3id.org/security/v1>
|
|
188
188
|
* - <https://w3id.org/security/data-integrity/v1>
|
|
189
189
|
* - <https://www.w3.org/ns/did/v1>
|
|
190
|
+
* - <https://www.w3.org/ns/cid/v1>
|
|
190
191
|
* - <https://w3id.org/security/multikey/v1>
|
|
191
192
|
* - <https://w3id.org/fep/ef61>
|
|
192
193
|
* - <https://purl.archive.org/socialweb/webfinger>
|
package/dist/mod.js
CHANGED
|
@@ -389,6 +389,119 @@ var activitystreams_default = { "@context": {
|
|
|
389
389
|
}
|
|
390
390
|
} };
|
|
391
391
|
//#endregion
|
|
392
|
+
//#region src/contexts/cid-v1.json
|
|
393
|
+
var cid_v1_default = { "@context": {
|
|
394
|
+
"@protected": true,
|
|
395
|
+
"id": "@id",
|
|
396
|
+
"type": "@type",
|
|
397
|
+
"alsoKnownAs": {
|
|
398
|
+
"@id": "https://www.w3.org/ns/activitystreams#alsoKnownAs",
|
|
399
|
+
"@type": "@id"
|
|
400
|
+
},
|
|
401
|
+
"assertionMethod": {
|
|
402
|
+
"@id": "https://w3id.org/security#assertionMethod",
|
|
403
|
+
"@type": "@id",
|
|
404
|
+
"@container": "@set"
|
|
405
|
+
},
|
|
406
|
+
"authentication": {
|
|
407
|
+
"@id": "https://w3id.org/security#authenticationMethod",
|
|
408
|
+
"@type": "@id",
|
|
409
|
+
"@container": "@set"
|
|
410
|
+
},
|
|
411
|
+
"capabilityDelegation": {
|
|
412
|
+
"@id": "https://w3id.org/security#capabilityDelegationMethod",
|
|
413
|
+
"@type": "@id",
|
|
414
|
+
"@container": "@set"
|
|
415
|
+
},
|
|
416
|
+
"capabilityInvocation": {
|
|
417
|
+
"@id": "https://w3id.org/security#capabilityInvocationMethod",
|
|
418
|
+
"@type": "@id",
|
|
419
|
+
"@container": "@set"
|
|
420
|
+
},
|
|
421
|
+
"controller": {
|
|
422
|
+
"@id": "https://w3id.org/security#controller",
|
|
423
|
+
"@type": "@id"
|
|
424
|
+
},
|
|
425
|
+
"keyAgreement": {
|
|
426
|
+
"@id": "https://w3id.org/security#keyAgreementMethod",
|
|
427
|
+
"@type": "@id",
|
|
428
|
+
"@container": "@set"
|
|
429
|
+
},
|
|
430
|
+
"service": {
|
|
431
|
+
"@id": "https://www.w3.org/ns/did#service",
|
|
432
|
+
"@type": "@id",
|
|
433
|
+
"@context": {
|
|
434
|
+
"@protected": true,
|
|
435
|
+
"id": "@id",
|
|
436
|
+
"type": "@type",
|
|
437
|
+
"serviceEndpoint": {
|
|
438
|
+
"@id": "https://www.w3.org/ns/did#serviceEndpoint",
|
|
439
|
+
"@type": "@id"
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
"verificationMethod": {
|
|
444
|
+
"@id": "https://w3id.org/security#verificationMethod",
|
|
445
|
+
"@type": "@id"
|
|
446
|
+
},
|
|
447
|
+
"Multikey": {
|
|
448
|
+
"@id": "https://w3id.org/security#Multikey",
|
|
449
|
+
"@context": {
|
|
450
|
+
"@protected": true,
|
|
451
|
+
"id": "@id",
|
|
452
|
+
"type": "@type",
|
|
453
|
+
"controller": {
|
|
454
|
+
"@id": "https://w3id.org/security#controller",
|
|
455
|
+
"@type": "@id"
|
|
456
|
+
},
|
|
457
|
+
"revoked": {
|
|
458
|
+
"@id": "https://w3id.org/security#revoked",
|
|
459
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
460
|
+
},
|
|
461
|
+
"expires": {
|
|
462
|
+
"@id": "https://w3id.org/security#expiration",
|
|
463
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
464
|
+
},
|
|
465
|
+
"publicKeyMultibase": {
|
|
466
|
+
"@id": "https://w3id.org/security#publicKeyMultibase",
|
|
467
|
+
"@type": "https://w3id.org/security#multibase"
|
|
468
|
+
},
|
|
469
|
+
"secretKeyMultibase": {
|
|
470
|
+
"@id": "https://w3id.org/security#secretKeyMultibase",
|
|
471
|
+
"@type": "https://w3id.org/security#multibase"
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
},
|
|
475
|
+
"JsonWebKey": {
|
|
476
|
+
"@id": "https://w3id.org/security#JsonWebKey",
|
|
477
|
+
"@context": {
|
|
478
|
+
"@protected": true,
|
|
479
|
+
"id": "@id",
|
|
480
|
+
"type": "@type",
|
|
481
|
+
"controller": {
|
|
482
|
+
"@id": "https://w3id.org/security#controller",
|
|
483
|
+
"@type": "@id"
|
|
484
|
+
},
|
|
485
|
+
"revoked": {
|
|
486
|
+
"@id": "https://w3id.org/security#revoked",
|
|
487
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
488
|
+
},
|
|
489
|
+
"expires": {
|
|
490
|
+
"@id": "https://w3id.org/security#expiration",
|
|
491
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
492
|
+
},
|
|
493
|
+
"publicKeyJwk": {
|
|
494
|
+
"@id": "https://w3id.org/security#publicKeyJwk",
|
|
495
|
+
"@type": "@json"
|
|
496
|
+
},
|
|
497
|
+
"secretKeyJwk": {
|
|
498
|
+
"@id": "https://w3id.org/security#secretKeyJwk",
|
|
499
|
+
"@type": "@json"
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
} };
|
|
504
|
+
//#endregion
|
|
392
505
|
//#region src/contexts/did-v1.json
|
|
393
506
|
var did_v1_default = { "@context": {
|
|
394
507
|
"@protected": true,
|
|
@@ -4397,6 +4510,7 @@ const preloadedContexts = {
|
|
|
4397
4510
|
"http://schema.org/": schemaorg_default,
|
|
4398
4511
|
"https://gotosocial.org/ns": gotosocial_default,
|
|
4399
4512
|
"https://w3id.org/fep/5711": fep_5711_default,
|
|
4513
|
+
"https://www.w3.org/ns/cid/v1": cid_v1_default,
|
|
4400
4514
|
"https://w3id.org/fep/ef61": fep_ef61_default,
|
|
4401
4515
|
"https://join-lemmy.org/context.json": join_lemmy_default,
|
|
4402
4516
|
"http://joinmastodon.org/ns": joinmastodon_default,
|
|
@@ -4405,7 +4519,7 @@ const preloadedContexts = {
|
|
|
4405
4519
|
//#endregion
|
|
4406
4520
|
//#region deno.json
|
|
4407
4521
|
var name = "@fedify/vocab-runtime";
|
|
4408
|
-
var version = "2.2.11
|
|
4522
|
+
var version = "2.2.11";
|
|
4409
4523
|
//#endregion
|
|
4410
4524
|
//#region src/link.ts
|
|
4411
4525
|
const parametersNeedLowerCase = ["rel", "type"];
|
|
@@ -4972,6 +5086,7 @@ async function getRemoteDocument(url, response, fetch) {
|
|
|
4972
5086
|
* - <https://w3id.org/security/v1>
|
|
4973
5087
|
* - <https://w3id.org/security/data-integrity/v1>
|
|
4974
5088
|
* - <https://www.w3.org/ns/did/v1>
|
|
5089
|
+
* - <https://www.w3.org/ns/cid/v1>
|
|
4975
5090
|
* - <https://w3id.org/security/multikey/v1>
|
|
4976
5091
|
* - <https://w3id.org/fep/ef61>
|
|
4977
5092
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
@@ -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-CMtb-99N.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";
|
|
@@ -382,6 +382,119 @@ var activitystreams_default = { "@context": {
|
|
|
382
382
|
}
|
|
383
383
|
} };
|
|
384
384
|
//#endregion
|
|
385
|
+
//#region src/contexts/cid-v1.json
|
|
386
|
+
var cid_v1_default = { "@context": {
|
|
387
|
+
"@protected": true,
|
|
388
|
+
"id": "@id",
|
|
389
|
+
"type": "@type",
|
|
390
|
+
"alsoKnownAs": {
|
|
391
|
+
"@id": "https://www.w3.org/ns/activitystreams#alsoKnownAs",
|
|
392
|
+
"@type": "@id"
|
|
393
|
+
},
|
|
394
|
+
"assertionMethod": {
|
|
395
|
+
"@id": "https://w3id.org/security#assertionMethod",
|
|
396
|
+
"@type": "@id",
|
|
397
|
+
"@container": "@set"
|
|
398
|
+
},
|
|
399
|
+
"authentication": {
|
|
400
|
+
"@id": "https://w3id.org/security#authenticationMethod",
|
|
401
|
+
"@type": "@id",
|
|
402
|
+
"@container": "@set"
|
|
403
|
+
},
|
|
404
|
+
"capabilityDelegation": {
|
|
405
|
+
"@id": "https://w3id.org/security#capabilityDelegationMethod",
|
|
406
|
+
"@type": "@id",
|
|
407
|
+
"@container": "@set"
|
|
408
|
+
},
|
|
409
|
+
"capabilityInvocation": {
|
|
410
|
+
"@id": "https://w3id.org/security#capabilityInvocationMethod",
|
|
411
|
+
"@type": "@id",
|
|
412
|
+
"@container": "@set"
|
|
413
|
+
},
|
|
414
|
+
"controller": {
|
|
415
|
+
"@id": "https://w3id.org/security#controller",
|
|
416
|
+
"@type": "@id"
|
|
417
|
+
},
|
|
418
|
+
"keyAgreement": {
|
|
419
|
+
"@id": "https://w3id.org/security#keyAgreementMethod",
|
|
420
|
+
"@type": "@id",
|
|
421
|
+
"@container": "@set"
|
|
422
|
+
},
|
|
423
|
+
"service": {
|
|
424
|
+
"@id": "https://www.w3.org/ns/did#service",
|
|
425
|
+
"@type": "@id",
|
|
426
|
+
"@context": {
|
|
427
|
+
"@protected": true,
|
|
428
|
+
"id": "@id",
|
|
429
|
+
"type": "@type",
|
|
430
|
+
"serviceEndpoint": {
|
|
431
|
+
"@id": "https://www.w3.org/ns/did#serviceEndpoint",
|
|
432
|
+
"@type": "@id"
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"verificationMethod": {
|
|
437
|
+
"@id": "https://w3id.org/security#verificationMethod",
|
|
438
|
+
"@type": "@id"
|
|
439
|
+
},
|
|
440
|
+
"Multikey": {
|
|
441
|
+
"@id": "https://w3id.org/security#Multikey",
|
|
442
|
+
"@context": {
|
|
443
|
+
"@protected": true,
|
|
444
|
+
"id": "@id",
|
|
445
|
+
"type": "@type",
|
|
446
|
+
"controller": {
|
|
447
|
+
"@id": "https://w3id.org/security#controller",
|
|
448
|
+
"@type": "@id"
|
|
449
|
+
},
|
|
450
|
+
"revoked": {
|
|
451
|
+
"@id": "https://w3id.org/security#revoked",
|
|
452
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
453
|
+
},
|
|
454
|
+
"expires": {
|
|
455
|
+
"@id": "https://w3id.org/security#expiration",
|
|
456
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
457
|
+
},
|
|
458
|
+
"publicKeyMultibase": {
|
|
459
|
+
"@id": "https://w3id.org/security#publicKeyMultibase",
|
|
460
|
+
"@type": "https://w3id.org/security#multibase"
|
|
461
|
+
},
|
|
462
|
+
"secretKeyMultibase": {
|
|
463
|
+
"@id": "https://w3id.org/security#secretKeyMultibase",
|
|
464
|
+
"@type": "https://w3id.org/security#multibase"
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
"JsonWebKey": {
|
|
469
|
+
"@id": "https://w3id.org/security#JsonWebKey",
|
|
470
|
+
"@context": {
|
|
471
|
+
"@protected": true,
|
|
472
|
+
"id": "@id",
|
|
473
|
+
"type": "@type",
|
|
474
|
+
"controller": {
|
|
475
|
+
"@id": "https://w3id.org/security#controller",
|
|
476
|
+
"@type": "@id"
|
|
477
|
+
},
|
|
478
|
+
"revoked": {
|
|
479
|
+
"@id": "https://w3id.org/security#revoked",
|
|
480
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
481
|
+
},
|
|
482
|
+
"expires": {
|
|
483
|
+
"@id": "https://w3id.org/security#expiration",
|
|
484
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
485
|
+
},
|
|
486
|
+
"publicKeyJwk": {
|
|
487
|
+
"@id": "https://w3id.org/security#publicKeyJwk",
|
|
488
|
+
"@type": "@json"
|
|
489
|
+
},
|
|
490
|
+
"secretKeyJwk": {
|
|
491
|
+
"@id": "https://w3id.org/security#secretKeyJwk",
|
|
492
|
+
"@type": "@json"
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
} };
|
|
497
|
+
//#endregion
|
|
385
498
|
//#region src/contexts/did-v1.json
|
|
386
499
|
var did_v1_default = { "@context": {
|
|
387
500
|
"@protected": true,
|
|
@@ -4390,6 +4503,7 @@ const preloadedContexts = {
|
|
|
4390
4503
|
"http://schema.org/": schemaorg_default,
|
|
4391
4504
|
"https://gotosocial.org/ns": gotosocial_default,
|
|
4392
4505
|
"https://w3id.org/fep/5711": fep_5711_default,
|
|
4506
|
+
"https://www.w3.org/ns/cid/v1": cid_v1_default,
|
|
4393
4507
|
"https://w3id.org/fep/ef61": fep_ef61_default,
|
|
4394
4508
|
"https://join-lemmy.org/context.json": join_lemmy_default,
|
|
4395
4509
|
"http://joinmastodon.org/ns": joinmastodon_default,
|
|
@@ -4510,6 +4624,7 @@ async function getRemoteDocument(url, response, fetch) {
|
|
|
4510
4624
|
* - <https://w3id.org/security/v1>
|
|
4511
4625
|
* - <https://w3id.org/security/data-integrity/v1>
|
|
4512
4626
|
* - <https://www.w3.org/ns/did/v1>
|
|
4627
|
+
* - <https://www.w3.org/ns/cid/v1>
|
|
4513
4628
|
* - <https://w3id.org/security/multikey/v1>
|
|
4514
4629
|
* - <https://w3id.org/fep/ef61>
|
|
4515
4630
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
@@ -4592,4 +4707,4 @@ function getDocumentLoader({ allowPrivateAddress, maxRedirection, skipPreloadedC
|
|
|
4592
4707
|
return load;
|
|
4593
4708
|
}
|
|
4594
4709
|
//#endregion
|
|
4595
|
-
export { preloadedContexts as n, getDocumentLoader as t };
|
|
4710
|
+
export { preloadedContexts as n, cid_v1_default as r, getDocumentLoader as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./chunk-Do9eywBl.cjs");
|
|
2
|
-
const require_request = require("./request-
|
|
2
|
+
const require_request = require("./request-HcA2nRAs.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");
|
|
@@ -383,6 +383,119 @@ var activitystreams_default = { "@context": {
|
|
|
383
383
|
}
|
|
384
384
|
} };
|
|
385
385
|
//#endregion
|
|
386
|
+
//#region src/contexts/cid-v1.json
|
|
387
|
+
var cid_v1_default = { "@context": {
|
|
388
|
+
"@protected": true,
|
|
389
|
+
"id": "@id",
|
|
390
|
+
"type": "@type",
|
|
391
|
+
"alsoKnownAs": {
|
|
392
|
+
"@id": "https://www.w3.org/ns/activitystreams#alsoKnownAs",
|
|
393
|
+
"@type": "@id"
|
|
394
|
+
},
|
|
395
|
+
"assertionMethod": {
|
|
396
|
+
"@id": "https://w3id.org/security#assertionMethod",
|
|
397
|
+
"@type": "@id",
|
|
398
|
+
"@container": "@set"
|
|
399
|
+
},
|
|
400
|
+
"authentication": {
|
|
401
|
+
"@id": "https://w3id.org/security#authenticationMethod",
|
|
402
|
+
"@type": "@id",
|
|
403
|
+
"@container": "@set"
|
|
404
|
+
},
|
|
405
|
+
"capabilityDelegation": {
|
|
406
|
+
"@id": "https://w3id.org/security#capabilityDelegationMethod",
|
|
407
|
+
"@type": "@id",
|
|
408
|
+
"@container": "@set"
|
|
409
|
+
},
|
|
410
|
+
"capabilityInvocation": {
|
|
411
|
+
"@id": "https://w3id.org/security#capabilityInvocationMethod",
|
|
412
|
+
"@type": "@id",
|
|
413
|
+
"@container": "@set"
|
|
414
|
+
},
|
|
415
|
+
"controller": {
|
|
416
|
+
"@id": "https://w3id.org/security#controller",
|
|
417
|
+
"@type": "@id"
|
|
418
|
+
},
|
|
419
|
+
"keyAgreement": {
|
|
420
|
+
"@id": "https://w3id.org/security#keyAgreementMethod",
|
|
421
|
+
"@type": "@id",
|
|
422
|
+
"@container": "@set"
|
|
423
|
+
},
|
|
424
|
+
"service": {
|
|
425
|
+
"@id": "https://www.w3.org/ns/did#service",
|
|
426
|
+
"@type": "@id",
|
|
427
|
+
"@context": {
|
|
428
|
+
"@protected": true,
|
|
429
|
+
"id": "@id",
|
|
430
|
+
"type": "@type",
|
|
431
|
+
"serviceEndpoint": {
|
|
432
|
+
"@id": "https://www.w3.org/ns/did#serviceEndpoint",
|
|
433
|
+
"@type": "@id"
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
"verificationMethod": {
|
|
438
|
+
"@id": "https://w3id.org/security#verificationMethod",
|
|
439
|
+
"@type": "@id"
|
|
440
|
+
},
|
|
441
|
+
"Multikey": {
|
|
442
|
+
"@id": "https://w3id.org/security#Multikey",
|
|
443
|
+
"@context": {
|
|
444
|
+
"@protected": true,
|
|
445
|
+
"id": "@id",
|
|
446
|
+
"type": "@type",
|
|
447
|
+
"controller": {
|
|
448
|
+
"@id": "https://w3id.org/security#controller",
|
|
449
|
+
"@type": "@id"
|
|
450
|
+
},
|
|
451
|
+
"revoked": {
|
|
452
|
+
"@id": "https://w3id.org/security#revoked",
|
|
453
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
454
|
+
},
|
|
455
|
+
"expires": {
|
|
456
|
+
"@id": "https://w3id.org/security#expiration",
|
|
457
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
458
|
+
},
|
|
459
|
+
"publicKeyMultibase": {
|
|
460
|
+
"@id": "https://w3id.org/security#publicKeyMultibase",
|
|
461
|
+
"@type": "https://w3id.org/security#multibase"
|
|
462
|
+
},
|
|
463
|
+
"secretKeyMultibase": {
|
|
464
|
+
"@id": "https://w3id.org/security#secretKeyMultibase",
|
|
465
|
+
"@type": "https://w3id.org/security#multibase"
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
"JsonWebKey": {
|
|
470
|
+
"@id": "https://w3id.org/security#JsonWebKey",
|
|
471
|
+
"@context": {
|
|
472
|
+
"@protected": true,
|
|
473
|
+
"id": "@id",
|
|
474
|
+
"type": "@type",
|
|
475
|
+
"controller": {
|
|
476
|
+
"@id": "https://w3id.org/security#controller",
|
|
477
|
+
"@type": "@id"
|
|
478
|
+
},
|
|
479
|
+
"revoked": {
|
|
480
|
+
"@id": "https://w3id.org/security#revoked",
|
|
481
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
482
|
+
},
|
|
483
|
+
"expires": {
|
|
484
|
+
"@id": "https://w3id.org/security#expiration",
|
|
485
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
486
|
+
},
|
|
487
|
+
"publicKeyJwk": {
|
|
488
|
+
"@id": "https://w3id.org/security#publicKeyJwk",
|
|
489
|
+
"@type": "@json"
|
|
490
|
+
},
|
|
491
|
+
"secretKeyJwk": {
|
|
492
|
+
"@id": "https://w3id.org/security#secretKeyJwk",
|
|
493
|
+
"@type": "@json"
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
} };
|
|
498
|
+
//#endregion
|
|
386
499
|
//#region src/contexts/did-v1.json
|
|
387
500
|
var did_v1_default = { "@context": {
|
|
388
501
|
"@protected": true,
|
|
@@ -4391,6 +4504,7 @@ const preloadedContexts = {
|
|
|
4391
4504
|
"http://schema.org/": schemaorg_default,
|
|
4392
4505
|
"https://gotosocial.org/ns": gotosocial_default,
|
|
4393
4506
|
"https://w3id.org/fep/5711": fep_5711_default,
|
|
4507
|
+
"https://www.w3.org/ns/cid/v1": cid_v1_default,
|
|
4394
4508
|
"https://w3id.org/fep/ef61": fep_ef61_default,
|
|
4395
4509
|
"https://join-lemmy.org/context.json": join_lemmy_default,
|
|
4396
4510
|
"http://joinmastodon.org/ns": joinmastodon_default,
|
|
@@ -4511,6 +4625,7 @@ async function getRemoteDocument(url, response, fetch) {
|
|
|
4511
4625
|
* - <https://w3id.org/security/v1>
|
|
4512
4626
|
* - <https://w3id.org/security/data-integrity/v1>
|
|
4513
4627
|
* - <https://www.w3.org/ns/did/v1>
|
|
4628
|
+
* - <https://www.w3.org/ns/cid/v1>
|
|
4514
4629
|
* - <https://w3id.org/security/multikey/v1>
|
|
4515
4630
|
* - <https://w3id.org/fep/ef61>
|
|
4516
4631
|
* - <https://purl.archive.org/socialweb/webfinger>
|
|
@@ -4593,6 +4708,12 @@ function getDocumentLoader({ allowPrivateAddress, maxRedirection, skipPreloadedC
|
|
|
4593
4708
|
return load;
|
|
4594
4709
|
}
|
|
4595
4710
|
//#endregion
|
|
4711
|
+
Object.defineProperty(exports, "cid_v1_default", {
|
|
4712
|
+
enumerable: true,
|
|
4713
|
+
get: function() {
|
|
4714
|
+
return cid_v1_default;
|
|
4715
|
+
}
|
|
4716
|
+
});
|
|
4596
4717
|
Object.defineProperty(exports, "getDocumentLoader", {
|
|
4597
4718
|
enumerable: true,
|
|
4598
4719
|
get: function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Do9eywBl.cjs");
|
|
2
|
-
const require_docloader = require("./docloader-
|
|
3
|
-
const require_request = require("./request-
|
|
2
|
+
const require_docloader = require("./docloader-ekzTbc9R.cjs");
|
|
3
|
+
const require_request = require("./request-HcA2nRAs.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,15 @@ var esm_default = new class FetchMock {
|
|
|
1431
1431
|
document
|
|
1432
1432
|
});
|
|
1433
1433
|
});
|
|
1434
|
+
esm_default.get("https://www.w3.org/ns/cid/v1", { status: 503 });
|
|
1435
|
+
await t.test("preloaded CID v1 context", async () => {
|
|
1436
|
+
const url = "https://www.w3.org/ns/cid/v1";
|
|
1437
|
+
(0, node_assert.deepStrictEqual)(await fetchDocumentLoader(url), {
|
|
1438
|
+
contextUrl: null,
|
|
1439
|
+
documentUrl: url,
|
|
1440
|
+
document: require_docloader.cid_v1_default
|
|
1441
|
+
});
|
|
1442
|
+
});
|
|
1434
1443
|
await t.test("preloaded FEP-ef61 context", async () => {
|
|
1435
1444
|
const url = "https://w3id.org/fep/ef61";
|
|
1436
1445
|
(0, node_assert.ok)(url in require_docloader.preloadedContexts);
|
|
@@ -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, r as cid_v1_default, t as getDocumentLoader } from "./docloader-Nug7_hIl.mjs";
|
|
2
|
+
import { t as FetchError } from "./request-CMtb-99N.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,15 @@ test("getDocumentLoader()", async (t) => {
|
|
|
1450
1450
|
document
|
|
1451
1451
|
});
|
|
1452
1452
|
});
|
|
1453
|
+
esm_default.get("https://www.w3.org/ns/cid/v1", { status: 503 });
|
|
1454
|
+
await t.test("preloaded CID v1 context", async () => {
|
|
1455
|
+
const url = "https://www.w3.org/ns/cid/v1";
|
|
1456
|
+
deepStrictEqual(await fetchDocumentLoader(url), {
|
|
1457
|
+
contextUrl: null,
|
|
1458
|
+
documentUrl: url,
|
|
1459
|
+
document: cid_v1_default
|
|
1460
|
+
});
|
|
1461
|
+
});
|
|
1453
1462
|
await t.test("preloaded FEP-ef61 context", async () => {
|
|
1454
1463
|
const url = "https://w3id.org/fep/ef61";
|
|
1455
1464
|
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.2.11
|
|
6
|
+
var version = "2.2.11";
|
|
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-HcA2nRAs.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-CMtb-99N.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
|
@@ -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
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import activitystreams from "./contexts/activitystreams.json" with {
|
|
6
6
|
type: "json",
|
|
7
7
|
};
|
|
8
|
+
import cidV1Context from "./contexts/cid-v1.json" with { type: "json" };
|
|
8
9
|
import didV1 from "./contexts/did-v1.json" with { type: "json" };
|
|
9
10
|
import fep5711 from "./contexts/fep-5711.json" with { type: "json" };
|
|
10
11
|
import fepEf61 from "./contexts/fep-ef61.json" with { type: "json" };
|
|
@@ -38,6 +39,14 @@ const preloadedContexts: Record<string, unknown> = {
|
|
|
38
39
|
"https://gotosocial.org/ns": gotosocial,
|
|
39
40
|
"https://w3id.org/fep/5711": fep5711,
|
|
40
41
|
|
|
42
|
+
// Controlled Identifiers v1.0 requires JSON-LD processors to treat this
|
|
43
|
+
// context URL as already resolved. We ship the official W3C context so that
|
|
44
|
+
// controlled identifier documents can be processed without depending on the
|
|
45
|
+
// availability of the remote context server.
|
|
46
|
+
// See: https://www.w3.org/TR/cid-1.0/#json-ld-context
|
|
47
|
+
// https://github.com/fedify-dev/fedify/issues/932
|
|
48
|
+
"https://www.w3.org/ns/cid/v1": cidV1Context,
|
|
49
|
+
|
|
41
50
|
// The FEP-ef61 context. The w3id.org URL redirects to Codeberg Pages, which
|
|
42
51
|
// suffers recurring outages; while it is unreachable, every document
|
|
43
52
|
// referencing this URL fails JSON-LD expansion before application handlers
|
package/src/docloader.test.ts
CHANGED
|
@@ -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";
|
|
@@ -293,6 +294,21 @@ test("getDocumentLoader()", async (t) => {
|
|
|
293
294
|
}
|
|
294
295
|
});
|
|
295
296
|
|
|
297
|
+
// Controlled Identifiers v1.0 requires JSON-LD processors to treat this
|
|
298
|
+
// context URL as already resolved. A temporary W3C outage must not prevent
|
|
299
|
+
// an otherwise valid document from being processed.
|
|
300
|
+
// See: https://www.w3.org/TR/cid-1.0/#json-ld-context
|
|
301
|
+
// https://github.com/fedify-dev/fedify/issues/932
|
|
302
|
+
fetchMock.get("https://www.w3.org/ns/cid/v1", { status: 503 });
|
|
303
|
+
await t.test("preloaded CID v1 context", async () => {
|
|
304
|
+
const url = "https://www.w3.org/ns/cid/v1";
|
|
305
|
+
deepStrictEqual(await fetchDocumentLoader(url), {
|
|
306
|
+
contextUrl: null,
|
|
307
|
+
documentUrl: url,
|
|
308
|
+
document: cidV1Context,
|
|
309
|
+
});
|
|
310
|
+
});
|
|
311
|
+
|
|
296
312
|
// The <https://w3id.org/fep/ef61> URL redirects to a Codeberg Pages host
|
|
297
313
|
// which suffers recurring outages; while it is unreachable, expanding any
|
|
298
314
|
// document referencing it fails before application handlers run. It has to
|
package/src/docloader.ts
CHANGED
|
@@ -284,6 +284,7 @@ export interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
|
|
|
284
284
|
* - <https://w3id.org/security/v1>
|
|
285
285
|
* - <https://w3id.org/security/data-integrity/v1>
|
|
286
286
|
* - <https://www.w3.org/ns/did/v1>
|
|
287
|
+
* - <https://www.w3.org/ns/cid/v1>
|
|
287
288
|
* - <https://w3id.org/security/multikey/v1>
|
|
288
289
|
* - <https://w3id.org/fep/ef61>
|
|
289
290
|
* - <https://purl.archive.org/socialweb/webfinger>
|