@fedify/fedify 1.6.11 → 1.6.12

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.
Files changed (66) hide show
  1. package/dist/{actor-CxnKxfwH.js → actor-7vCpWIGd.js} +189 -189
  2. package/dist/{actor-KrOvzFz1.js → actor-BxaCJsn8.js} +3 -3
  3. package/dist/{authdocloader-CsnXlm3V.js → authdocloader-CVhMTbv4.js} +3 -3
  4. package/dist/{authdocloader-DsULyH5D.js → authdocloader-niAJMnCQ.js} +3 -3
  5. package/dist/{builder-BjJSVOvs.js → builder-DboGa9iv.js} +3 -3
  6. package/dist/{client-BlntqhE9.js → client-De_5-2EG.js} +1 -1
  7. package/dist/compat/transformers.test.js +17 -17
  8. package/dist/{context-CiyuTkCx.js → context-KOy1fHBn.js} +2 -2
  9. package/dist/{docloader-BYgIBZvh.js → docloader-CPBLJsVK.js} +1 -1
  10. package/dist/{docloader-DOrb0fRp.js → docloader-RFcxdgI8.js} +1 -1
  11. package/dist/federation/builder.test.js +4 -4
  12. package/dist/federation/handler.test.js +19 -19
  13. package/dist/federation/inbox.test.js +3 -3
  14. package/dist/federation/keycache.test.js +3 -3
  15. package/dist/federation/middleware.test.js +18 -18
  16. package/dist/federation/mod.js +10 -10
  17. package/dist/federation/send.test.js +9 -9
  18. package/dist/{http-LsE7i_Zq.js → http-B__WhFrv.js} +3 -3
  19. package/dist/{http-Dc8RIaDE.js → http-CnSGudcE.js} +3 -3
  20. package/dist/{inbox-BVwejjm8.js → inbox-L4MTtAQ4.js} +2 -2
  21. package/dist/{key-DxKqQgGm.js → key-BG_CTepE.js} +4 -4
  22. package/dist/{key-Bg_PKGpe.js → key-BQg3A7eo.js} +2 -2
  23. package/dist/{key-BP-Oky5H.js → key-CeY-eted.js} +5 -5
  24. package/dist/{key-BTcmhZp7.js → key-Dlbuqhbr.js} +3 -3
  25. package/dist/{keycache-BnCTs9sG.js → keycache-BEb0DSk7.js} +1 -1
  26. package/dist/{keys-pbGG00jU.js → keys-CqpeF-EG.js} +1 -1
  27. package/dist/{ld-n_kUCeXG.js → ld-45SsuOmB.js} +3 -3
  28. package/dist/{lookup-1pupHJbK.js → lookup-CWdbkwKD.js} +3 -3
  29. package/dist/{lookup-DrAS097Q.js → lookup-CdHTw-tQ.js} +1 -1
  30. package/dist/{lookup-Cutk-FXA.js → lookup-HY083HcK.js} +1 -1
  31. package/dist/middleware-BP-XbRGC.js +17 -0
  32. package/dist/{middleware-kjrPMCqA.js → middleware-Cg-eSyqX.js} +10 -10
  33. package/dist/{middleware-CMTirIyg.js → middleware-D2HU0DhQ.js} +15 -15
  34. package/dist/middleware-JoLpCiMC.js +33 -0
  35. package/dist/mod.js +10 -10
  36. package/dist/nodeinfo/client.test.js +2 -2
  37. package/dist/nodeinfo/handler.test.js +18 -18
  38. package/dist/nodeinfo/mod.js +2 -2
  39. package/dist/{owner-c-Zzpacz.js → owner-BYxqeMiw.js} +3 -3
  40. package/dist/{proof-CTOU2zFF.js → proof-BjHA4H_1.js} +3 -3
  41. package/dist/{proof-BTx3Maj-.js → proof-DVYup76O.js} +3 -3
  42. package/dist/runtime/authdocloader.test.js +8 -8
  43. package/dist/runtime/docloader.test.js +1 -1
  44. package/dist/runtime/key.test.js +5 -5
  45. package/dist/runtime/mod.js +6 -6
  46. package/dist/{send-SniNSIKd.js → send-BQA1p7vs.js} +2 -2
  47. package/dist/sig/http.test.js +7 -7
  48. package/dist/sig/key.test.js +6 -6
  49. package/dist/sig/ld.test.js +7 -7
  50. package/dist/sig/mod.js +6 -6
  51. package/dist/sig/owner.test.js +8 -8
  52. package/dist/sig/proof.test.js +7 -7
  53. package/dist/{types-DG1qZLU9.js → types-D7_MRRa4.js} +1 -1
  54. package/dist/vocab/actor.test.js +4 -4
  55. package/dist/vocab/lookup.test.js +4 -4
  56. package/dist/vocab/mod.js +4 -4
  57. package/dist/vocab/type.test.js +2 -2
  58. package/dist/vocab/vocab.test.js +28 -5
  59. package/dist/{vocab-lzEJg2bH.js → vocab-DVEzP_bQ.js} +188 -188
  60. package/dist/{vocab-oKloyO0F.js → vocab-aaGb1Tji.js} +3 -3
  61. package/dist/webfinger/handler.test.js +18 -18
  62. package/dist/webfinger/lookup.test.js +2 -2
  63. package/dist/webfinger/mod.js +2 -2
  64. package/package.json +1 -1
  65. package/dist/middleware-CDYmpOKW.js +0 -33
  66. package/dist/middleware-CXZvlTVn.js +0 -17
package/dist/vocab/mod.js CHANGED
@@ -2,9 +2,9 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import "../docloader-DOrb0fRp.js";
6
- import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, normalizeActorHandle } from "../actor-CxnKxfwH.js";
7
- import "../lookup-DrAS097Q.js";
8
- import { PUBLIC_COLLECTION, lookupObject, traverseCollection } from "../vocab-oKloyO0F.js";
5
+ import "../docloader-RFcxdgI8.js";
6
+ import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, normalizeActorHandle } from "../actor-7vCpWIGd.js";
7
+ import "../lookup-CdHTw-tQ.js";
8
+ import { PUBLIC_COLLECTION, lookupObject, traverseCollection } from "../vocab-aaGb1Tji.js";
9
9
 
10
10
  export { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object$1 as Object, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, lookupObject, normalizeActorHandle, traverseCollection };
@@ -4,10 +4,10 @@
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
6
  import { assertEquals } from "../assert_equals-B44MxcIj.js";
7
- import "../docloader-BYgIBZvh.js";
7
+ import "../docloader-CPBLJsVK.js";
8
8
  import "../url-C2xuoQD1.js";
9
9
  import "../multibase-CnLHszip.js";
10
- import { Person } from "../vocab-lzEJg2bH.js";
10
+ import { Person } from "../vocab-DVEzP_bQ.js";
11
11
  import "../langstr-DbWheeIS.js";
12
12
  import { getTypeId } from "../type-CFuiGLz9.js";
13
13
  import { test } from "../testing-DLyvtiiW.js";
@@ -6,10 +6,10 @@
6
6
  import { assertEquals, isWindows } from "../assert_equals-B44MxcIj.js";
7
7
  import { assert } from "../assert-LOEeCUK5.js";
8
8
  import { assertInstanceOf } from "../assert_instance_of-XtuFevV_.js";
9
- import "../docloader-BYgIBZvh.js";
9
+ import "../docloader-CPBLJsVK.js";
10
10
  import "../url-C2xuoQD1.js";
11
11
  import { decode } from "../multibase-CnLHszip.js";
12
- import { Activity, Announce, Create, CryptographicKey, Follow, Hashtag, Link, Note, Object as Object$1, OrderedCollectionPage, Person, Place, Question, Source, vocab_exports } from "../vocab-lzEJg2bH.js";
12
+ import { Activity, Announce, Create, CryptographicKey, Follow, Hashtag, Link, Note, Object as Object$1, OrderedCollectionPage, Person, Place, Question, Source, vocab_exports } from "../vocab-DVEzP_bQ.js";
13
13
  import { LanguageString } from "../langstr-DbWheeIS.js";
14
14
  import { test } from "../testing-DLyvtiiW.js";
15
15
  import "../std__assert-o_r9vqm1.js";
@@ -18,7 +18,7 @@ import "../assert_is_error-BTlryvT0.js";
18
18
  import { assertNotEquals } from "../assert_not_equals-C685gKx6.js";
19
19
  import { assertThrows } from "../assert_throws-YetpVSc-.js";
20
20
  import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
21
- import { ed25519PublicKey, rsaPublicKey1 } from "../keys-pbGG00jU.js";
21
+ import { ed25519PublicKey, rsaPublicKey1 } from "../keys-CqpeF-EG.js";
22
22
  import { pascalCase } from "@es-toolkit/es-toolkit";
23
23
  import { parseLanguageTag } from "@phensley/language-tag";
24
24
  import { Validator } from "@cfworker/json-schema";
@@ -2196,8 +2196,19 @@ const scalarTypes = {
2196
2196
  && ${v}["@id"] !== "" && ${v}["@id"] !== "/"`;
2197
2197
  },
2198
2198
  decoder(v) {
2199
- return `${v}["@id"].startsWith("at://did:plc:")
2200
- ? new URL("at://did%3Aplc%3A" + ${v}["@id"].slice(13))
2199
+ return `${v}["@id"].startsWith("at://")
2200
+ ? new URL("at://" +
2201
+ encodeURIComponent(
2202
+ ${v}["@id"].includes("/", 5)
2203
+ ? ${v}["@id"].slice(5, ${v}["@id"].indexOf("/", 5))
2204
+ : ${v}["@id"].slice(5)
2205
+ ) +
2206
+ (
2207
+ ${v}["@id"].includes("/", 5)
2208
+ ? ${v}["@id"].slice(${v}["@id"].indexOf("/", 5))
2209
+ : ""
2210
+ )
2211
+ )
2201
2212
  : new URL(${v}["@id"])`;
2202
2213
  }
2203
2214
  },
@@ -2997,6 +3008,18 @@ test("Link.fromJsonLd()", async () => {
2997
3008
  });
2998
3009
  assertEquals(link.rel, "canonical");
2999
3010
  assertEquals(link.href, new URL("at://did%3Aplc%3Aia76kvnndjutgedggx2ibrem/app.bsky.feed.post/3lyxjjs27jkqg"));
3011
+ const link2 = await Link.fromJsonLd({
3012
+ "@context": "https://www.w3.org/ns/activitystreams",
3013
+ "type": "Link",
3014
+ "href": "at://bnewbold.bsky.team/app.bsky.feed.post/3jwdwj2ctlk26"
3015
+ });
3016
+ assertEquals(link2.href, new URL("at://bnewbold.bsky.team/app.bsky.feed.post/3jwdwj2ctlk26"));
3017
+ const link3 = await Link.fromJsonLd({
3018
+ "@context": "https://www.w3.org/ns/activitystreams",
3019
+ "type": "Link",
3020
+ "href": "at://did:plc:ia76kvnndjutgedggx2ibrem"
3021
+ });
3022
+ assertEquals(link3.href, new URL("at://did%3Aplc%3Aia76kvnndjutgedggx2ibrem"));
3000
3023
  });
3001
3024
  function getAllProperties(type, types$1) {
3002
3025
  const props = type.properties;