@fedify/fedify 1.7.12 → 1.7.14

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 (182) hide show
  1. package/dist/{actor-CPpvuBKU.d.ts → actor-Dx5YX74F.d.ts} +3 -3
  2. package/dist/{actor-GZRoTRqg.js → actor-OYVgkiZG.js} +329 -465
  3. package/dist/{actor-TYqJGdVq.js → actor-y7shp0CR.js} +6 -6
  4. package/dist/{assert-LOEeCUK5.js → assert-C-mZuSQl.js} +2 -2
  5. package/dist/{assert_equals-B44MxcIj.js → assert_equals-Dy0MG_Zw.js} +16 -16
  6. package/dist/{assert_instance_of-XtuFevV_.js → assert_instance_of-lS0Jr2iu.js} +2 -2
  7. package/dist/{assert_is_error-BTlryvT0.js → assert_is_error-CIYFACrT.js} +2 -2
  8. package/dist/{assert_not_equals-C685gKx6.js → assert_not_equals-C1azCAB0.js} +3 -6
  9. package/dist/{assert_rejects-DWQ4jaf9.js → assert_rejects-Bkh5lA1a.js} +3 -3
  10. package/dist/{assert_throws-YetpVSc-.js → assert_throws-CmpfkWEM.js} +3 -3
  11. package/dist/{authdocloader-hiFSyM7V.js → authdocloader-C0JcfxUs.js} +7 -9
  12. package/dist/{authdocloader-BopfyipD.js → authdocloader-C2krvRo1.js} +6 -8
  13. package/dist/{builder-mi6RdzNE.js → builder-DaECqbbT.js} +7 -7
  14. package/dist/{chunk-Cx8LTkjm.js → chunk-DvTpRkcT.js} +22 -15
  15. package/dist/{client-DuUKk4pk.js → client-dfu57WLy.js} +3 -3
  16. package/dist/{client-DvtwXO7t.d.ts → client-wKLuY12i.d.ts} +2 -2
  17. package/dist/{collection-Dfb0TPno.js → collection-XNLQhehO.js} +2 -3
  18. package/dist/{mod-DFncUgcE.d.ts → compat/mod-Bwqav33K.d.ts} +3 -3
  19. package/dist/compat/mod.js +1 -2
  20. package/dist/compat/transformers.test.js +34 -38
  21. package/dist/{context-OBWjptjU.d.ts → context-CW_8R4BH.d.ts} +11 -11
  22. package/dist/{context-RMU32mk4.js → context-nxDPfAiA.js} +5 -5
  23. package/dist/{docloader-09nVWLAZ.js → docloader-BDSHZfTJ.js} +1 -1
  24. package/dist/{docloader-DJxET2fN.js → docloader-BU25UQLB.js} +31 -151
  25. package/dist/{docloader-Q42SMRIB.d.ts → docloader-D_MGP37Q.d.ts} +2 -2
  26. package/dist/{docloader-bgBm1Hd1.js → docloader-sGz4vcrK.js} +32 -152
  27. package/dist/{esm-DO9PrujO.js → esm-BRXvTSrx.js} +36 -22
  28. package/dist/federation/builder.test.js +20 -26
  29. package/dist/federation/collection.test.js +11 -16
  30. package/dist/federation/handler.test.js +41 -48
  31. package/dist/federation/inbox.test.js +11 -11
  32. package/dist/federation/keycache.test.js +12 -11
  33. package/dist/federation/kv.test.js +8 -10
  34. package/dist/federation/middleware.test.js +105 -134
  35. package/dist/federation/mod-DvlLc8Ru.d.ts +6 -0
  36. package/dist/federation/mod.js +206 -12
  37. package/dist/federation/mq.test.js +12 -17
  38. package/dist/federation/retry.test.js +5 -4
  39. package/dist/federation/router.test.js +9 -10
  40. package/dist/federation/send.test.js +23 -24
  41. package/dist/{http-D2DkwsjA.js → http-BhES0Sg9.js} +23 -30
  42. package/dist/{http-DMTrO3Ye.d.ts → http-DFZRNfDP.d.ts} +3 -3
  43. package/dist/{http-vqMAvOVs.js → http-DRePVWfE.js} +23 -30
  44. package/dist/{inbox-DAAZZl2k.js → inbox-Z_QlSGYN.js} +5 -5
  45. package/dist/key-CJuc1GE1.js +10 -0
  46. package/dist/{key-DmqJj57e.js → key-D2HZrCxh.js} +4 -4
  47. package/dist/{key-KVhaUM92.js → key-bMrDyA2T.js} +5 -5
  48. package/dist/key-eP5Yk7hl.js +16 -0
  49. package/dist/{keycache-C1pEuRyQ.js → keycache-B5Rr8Lbc.js} +2 -2
  50. package/dist/{keys-C4XQHW5_.js → keys-DK4k1R8e.js} +2 -2
  51. package/dist/{kv-DRaeSXco.d.ts → kv-CKqSUxHd.d.ts} +1 -1
  52. package/dist/{kv-BMY6Qf_A.js → kv-QeuZ51go.js} +1 -1
  53. package/dist/{langstr-DbWheeIS.js → langstr-pFHBDU4y.js} +1 -1
  54. package/dist/{ld-DzlJ_IpT.js → ld--auFISy7.js} +9 -12
  55. package/dist/{lookup-CSngxuWm.js → lookup-4uc2jh52.js} +3 -3
  56. package/dist/{lookup-DL62q3Xh.js → lookup-Bq8vhIG4.js} +4 -4
  57. package/dist/{lookup-Bf-K85bV.d.ts → lookup-CqI9jhXo.d.ts} +2 -2
  58. package/dist/{lookup-D0je8AqR.js → lookup-cHV4n1IB.js} +6 -6
  59. package/dist/middleware-72Tuh6Iw.js +17 -0
  60. package/dist/{middleware-3wVT6S9E.js → middleware-B7p-onxQ.js} +35 -39
  61. package/dist/middleware-DB3BUysJ.js +32 -0
  62. package/dist/{middleware-DlDXugwZ.js → middleware-QJjRfjjc.js} +38 -43
  63. package/dist/{mod-CCL2cvnI.d.ts → mod-BEZy4WHZ.d.ts} +4 -4
  64. package/dist/mod-DMn4Bxyg.d.ts +20 -0
  65. package/dist/{mod-CDzlVCUF.d.ts → mod-DjGYGrBd.d.ts} +3 -3
  66. package/dist/mod.js +17 -17
  67. package/dist/{mq-DYKDDJmp.d.ts → mq-Cgfbl44M.d.ts} +1 -1
  68. package/dist/{multibase-CnLHszip.js → multibase-DBcKTV2a.js} +1 -1
  69. package/dist/nodeinfo/client.test.js +19 -28
  70. package/dist/nodeinfo/handler.test.js +37 -44
  71. package/dist/nodeinfo/mod--upgPcaX.d.ts +4 -0
  72. package/dist/nodeinfo/mod.js +2 -3
  73. package/dist/nodeinfo/semver.test.js +13 -21
  74. package/dist/nodeinfo/types.test.js +9 -11
  75. package/dist/{owner-D0cOz8R5.d.ts → owner-CewLNqWO.d.ts} +4 -4
  76. package/dist/{owner-81ey_76X.js → owner-DkTRLQAV.js} +4 -4
  77. package/dist/{proof-DlI7QNdn.js → proof-D4HXHDPz.js} +14 -19
  78. package/dist/{proof-BlULDH4H.js → proof-DT_xxRPF.js} +11 -13
  79. package/dist/{retry-BiIhZWgD.js → retry-BQet39_l.js} +1 -1
  80. package/dist/{router-D_aVZZUc.js → router-BuDkN4RQ.js} +1 -1
  81. package/dist/runtime/authdocloader.test.js +22 -26
  82. package/dist/runtime/docloader.test.js +56 -56
  83. package/dist/runtime/key.test.js +31 -53
  84. package/dist/runtime/langstr.test.js +8 -10
  85. package/dist/{mod-qFMzZ3iF.d.ts → runtime/mod-BaH1vtHp.d.ts} +4 -3
  86. package/dist/runtime/mod.js +6 -7
  87. package/dist/runtime/multibase/multibase.test.js +12 -18
  88. package/dist/runtime/url.test.js +7 -6
  89. package/dist/{semver-BNrOOAs9.js → semver-D9d-VO-_.js} +7 -17
  90. package/dist/{send-DdxfTHo6.js → send-axIyQX2p.js} +4 -4
  91. package/dist/sig/http.test.js +104 -168
  92. package/dist/sig/key.test.js +17 -20
  93. package/dist/sig/ld.test.js +28 -35
  94. package/dist/sig/mod-BmJQTnPT.d.ts +6 -0
  95. package/dist/sig/mod.js +6 -7
  96. package/dist/sig/owner.test.js +24 -30
  97. package/dist/sig/proof.test.js +24 -29
  98. package/dist/{std__assert-o_r9vqm1.js → std__assert-BdP_WkD-.js} +7 -13
  99. package/dist/testing/docloader.test.js +9 -12
  100. package/dist/testing/mod.js +2 -1
  101. package/dist/{testing-DLyvtiiW.js → testing-qaAD4B0t.js} +2 -2
  102. package/dist/{transformers-ghwJuzGY.js → transformers-CFSWUhNi.js} +1 -1
  103. package/dist/{type-CFuiGLz9.js → type-DFsmi-p1.js} +1 -1
  104. package/dist/{types-CmVV9LT1.js → types-Bk4b1bGc.js} +8 -18
  105. package/dist/{types-CJHS5pXl.js → types-CB_2uuCA.js} +2 -2
  106. package/dist/{url-C2xuoQD1.js → url-BdNvnK9P.js} +1 -1
  107. package/dist/vocab/actor.test.js +76 -128
  108. package/dist/vocab/lookup.test.js +19 -23
  109. package/dist/vocab/mod-BkXGAYkx.d.ts +6 -0
  110. package/dist/vocab/mod.js +4 -4
  111. package/dist/vocab/type.test.js +10 -10
  112. package/dist/vocab/vocab.test.js +109 -105
  113. package/dist/{vocab-DFlq4Wa6.js → vocab-DCHRuBGF.js} +328 -464
  114. package/dist/{vocab-CzEfWQk2.d.ts → vocab-DoBcp8ow.d.ts} +2 -2
  115. package/dist/{vocab-BebR0kAy.js → vocab-sMuiKIWm.js} +5 -5
  116. package/dist/webfinger/handler.test.js +40 -48
  117. package/dist/webfinger/lookup.test.js +12 -15
  118. package/dist/webfinger/mod-B1UhCvlL.d.ts +4 -0
  119. package/dist/webfinger/mod.js +2 -3
  120. package/dist/x/{cfworkers.d.ts → cfworkers-BIcR64Sf.d.ts} +2 -2
  121. package/dist/x/cfworkers.test.js +7 -9
  122. package/dist/x/{hono.d.ts → hono-DmQmp8wi.d.ts} +2 -11
  123. package/dist/x/{sveltekit.d.ts → sveltekit-Cvh0XnN4.d.ts} +2 -11
  124. package/package.json +1 -1
  125. package/dist/compat/mod.d.ts +0 -15
  126. package/dist/compat-Bb5myD13.js +0 -4
  127. package/dist/federation/mod.d.ts +0 -15
  128. package/dist/federation-B0aljx0V.js +0 -203
  129. package/dist/key-5ssHQ67E.js +0 -16
  130. package/dist/key-DSJGnD10.js +0 -10
  131. package/dist/middleware-CxFoFBD8.js +0 -33
  132. package/dist/middleware-w7_U3fFi.js +0 -17
  133. package/dist/mod-1pDWKvUL.d.ts +0 -2
  134. package/dist/mod-GIh5OYxW.d.ts +0 -2
  135. package/dist/mod-g0xFzAP9.d.ts +0 -2
  136. package/dist/mod.d.ts +0 -20
  137. package/dist/nodeinfo/mod.d.ts +0 -7
  138. package/dist/nodeinfo-CyEbLjHs.js +0 -4
  139. package/dist/runtime/mod.d.ts +0 -8
  140. package/dist/runtime-BSkOVUWM.js +0 -4
  141. package/dist/sig/mod.d.ts +0 -10
  142. package/dist/sig-BXJO--F9.js +0 -4
  143. package/dist/vocab/mod.d.ts +0 -8
  144. package/dist/webfinger/mod.d.ts +0 -7
  145. package/dist/webfinger-C3GIyXIg.js +0 -4
  146. /package/dist/compat/{transformers.test.d.ts → transformers.test-DnJbd34u.d.ts} +0 -0
  147. /package/dist/{denokv-CvROlGYX.js → denokv-NcJeZ6rP.js} +0 -0
  148. /package/dist/federation/{builder.test.d.ts → builder.test-Bpt6NOZ6.d.ts} +0 -0
  149. /package/dist/federation/{collection.test.d.ts → collection.test-DKJ6JOZz.d.ts} +0 -0
  150. /package/dist/federation/{handler.test.d.ts → handler.test-BMT7uLC0.d.ts} +0 -0
  151. /package/dist/federation/{inbox.test.d.ts → inbox.test-Do6i02Qp.d.ts} +0 -0
  152. /package/dist/federation/{keycache.test.d.ts → keycache.test-BT83IPZY.d.ts} +0 -0
  153. /package/dist/federation/{kv.test.d.ts → kv.test-kFzzF2VN.d.ts} +0 -0
  154. /package/dist/federation/{middleware.test.d.ts → middleware.test-B1R4_e3-.d.ts} +0 -0
  155. /package/dist/federation/{mq.test.d.ts → mq.test-l79EQQOe.d.ts} +0 -0
  156. /package/dist/federation/{retry.test.d.ts → retry.test-BqS50VCX.d.ts} +0 -0
  157. /package/dist/federation/{router.test.d.ts → router.test-CYQl4po-.d.ts} +0 -0
  158. /package/dist/federation/{send.test.d.ts → send.test-COUnNUzv.d.ts} +0 -0
  159. /package/dist/nodeinfo/{client.test.d.ts → client.test-CZLe79hL.d.ts} +0 -0
  160. /package/dist/nodeinfo/{handler.test.d.ts → handler.test-B-EDZ_hK.d.ts} +0 -0
  161. /package/dist/nodeinfo/{semver.test.d.ts → semver.test-BEuuQSEM.d.ts} +0 -0
  162. /package/dist/nodeinfo/{types.test.d.ts → types.test-B5AT89WV.d.ts} +0 -0
  163. /package/dist/runtime/{authdocloader.test.d.ts → authdocloader.test-hCRKzn9v.d.ts} +0 -0
  164. /package/dist/runtime/{docloader.test.d.ts → docloader.test-CVd7i_5h.d.ts} +0 -0
  165. /package/dist/runtime/{key.test.d.ts → key.test-DBsILYSD.d.ts} +0 -0
  166. /package/dist/runtime/{langstr.test.d.ts → langstr.test-CiKxuuRY.d.ts} +0 -0
  167. /package/dist/runtime/multibase/{multibase.test.d.ts → multibase.test-Brh6gPBP.d.ts} +0 -0
  168. /package/dist/runtime/{url.test.d.ts → url.test-DlRqkU2j.d.ts} +0 -0
  169. /package/dist/sig/{http.test.d.ts → http.test-BpXNAWNI.d.ts} +0 -0
  170. /package/dist/sig/{key.test.d.ts → key.test-B2iLIugy.d.ts} +0 -0
  171. /package/dist/sig/{ld.test.d.ts → ld.test-D-cI70Gw.d.ts} +0 -0
  172. /package/dist/sig/{owner.test.d.ts → owner.test-B_YRjMPj.d.ts} +0 -0
  173. /package/dist/sig/{proof.test.d.ts → proof.test-BagEM_-4.d.ts} +0 -0
  174. /package/dist/testing/{docloader.test.d.ts → docloader.test-lrzf6sDZ.d.ts} +0 -0
  175. /package/dist/testing/{mod.d.ts → mod-3uM8ZvS7.d.ts} +0 -0
  176. /package/dist/vocab/{actor.test.d.ts → actor.test-ClC-iVWk.d.ts} +0 -0
  177. /package/dist/vocab/{lookup.test.d.ts → lookup.test-Cq1I-27w.d.ts} +0 -0
  178. /package/dist/vocab/{type.test.d.ts → type.test-bfFiYGcs.d.ts} +0 -0
  179. /package/dist/vocab/{vocab.test.d.ts → vocab.test-h-ZTisfu.d.ts} +0 -0
  180. /package/dist/webfinger/{handler.test.d.ts → handler.test-DiUeEDDD.d.ts} +0 -0
  181. /package/dist/webfinger/{lookup.test.d.ts → lookup.test-D9onm3U3.d.ts} +0 -0
  182. /package/dist/x/{cfworkers.test.d.ts → cfworkers.test-KXHlJ29z.d.ts} +0 -0
@@ -3,35 +3,36 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { assertEquals, isWindows } from "../assert_equals-B44MxcIj.js";
7
- import { assert } from "../assert-LOEeCUK5.js";
8
- import { assertInstanceOf } from "../assert_instance_of-XtuFevV_.js";
9
- import "../docloader-bgBm1Hd1.js";
10
- import "../url-C2xuoQD1.js";
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-DFlq4Wa6.js";
13
- import { LanguageString } from "../langstr-DbWheeIS.js";
14
- import { test } from "../testing-DLyvtiiW.js";
15
- import "../std__assert-o_r9vqm1.js";
16
- import { assertFalse, assertRejects } from "../assert_rejects-DWQ4jaf9.js";
17
- import "../assert_is_error-BTlryvT0.js";
18
- import { assertNotEquals } from "../assert_not_equals-C685gKx6.js";
19
- import { assertThrows } from "../assert_throws-YetpVSc-.js";
20
- import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
21
- import { ed25519PublicKey, rsaPublicKey1 } from "../keys-C4XQHW5_.js";
6
+ import "../chunk-DvTpRkcT.js";
7
+ import { n as isWindows, t as assertEquals } from "../assert_equals-Dy0MG_Zw.js";
8
+ import { t as assert } from "../assert-C-mZuSQl.js";
9
+ import { t as assertInstanceOf } from "../assert_instance_of-lS0Jr2iu.js";
10
+ import "../docloader-sGz4vcrK.js";
11
+ import "../url-BdNvnK9P.js";
12
+ import { t as decode } from "../multibase-DBcKTV2a.js";
13
+ import { C as Place, E as Source, O as vocab_exports, S as Person, _ as Object$1, a as Create, b as OrderedCollectionPage, d as Hashtag, g as Note, l as Follow, m as Link, n as Announce, o as CryptographicKey, t as Activity, w as Question } from "../vocab-DCHRuBGF.js";
14
+ import { t as LanguageString } from "../langstr-pFHBDU4y.js";
15
+ import { t as test } from "../testing-qaAD4B0t.js";
16
+ import "../std__assert-BdP_WkD-.js";
17
+ import { n as assertFalse, t as assertRejects } from "../assert_rejects-Bkh5lA1a.js";
18
+ import "../assert_is_error-CIYFACrT.js";
19
+ import { t as assertNotEquals } from "../assert_not_equals-C1azCAB0.js";
20
+ import { t as assertThrows } from "../assert_throws-CmpfkWEM.js";
21
+ import { t as mockDocumentLoader } from "../docloader-BDSHZfTJ.js";
22
+ import { o as rsaPublicKey1, r as ed25519PublicKey } from "../keys-DK4k1R8e.js";
22
23
  import { pascalCase } from "@es-toolkit/es-toolkit";
23
24
  import { parseLanguageTag } from "@phensley/language-tag";
24
25
  import { Validator } from "@cfworker/json-schema";
25
26
  import { readFile, readdir } from "node:fs/promises";
26
27
  import { join } from "node:path";
27
28
 
28
- //#region node_modules/.pnpm/@jsr+std__path@1.1.2/node_modules/@jsr/std__path/_common/assert_path.js
29
+ //#region node_modules/.pnpm/@jsr+std__path@1.1.3/node_modules/@jsr/std__path/_common/assert_path.js
29
30
  function assertPath(path) {
30
31
  if (typeof path !== "string") throw new TypeError(`Path must be a string, received "${JSON.stringify(path)}"`);
31
32
  }
32
33
 
33
34
  //#endregion
34
- //#region node_modules/.pnpm/@jsr+std__path@1.1.2/node_modules/@jsr/std__path/_common/from_file_url.js
35
+ //#region node_modules/.pnpm/@jsr+std__path@1.1.3/node_modules/@jsr/std__path/_common/from_file_url.js
35
36
  function assertArg$2(url) {
36
37
  url = url instanceof URL ? url : new URL(url);
37
38
  if (url.protocol !== "file:") throw new TypeError(`URL must be a file URL: received "${url.protocol}"`);
@@ -39,7 +40,7 @@ function assertArg$2(url) {
39
40
  }
40
41
 
41
42
  //#endregion
42
- //#region node_modules/.pnpm/@jsr+std__path@1.1.2/node_modules/@jsr/std__path/posix/from_file_url.js
43
+ //#region node_modules/.pnpm/@jsr+std__path@1.1.3/node_modules/@jsr/std__path/posix/from_file_url.js
43
44
  /**
44
45
  * Converts a file URL to a path string.
45
46
  *
@@ -53,13 +54,13 @@ function assertArg$2(url) {
53
54
  *
54
55
  * @param url The file URL to convert.
55
56
  * @returns The path string.
56
- */ function fromFileUrl$1(url) {
57
+ */ function fromFileUrl$2(url) {
57
58
  url = assertArg$2(url);
58
59
  return decodeURIComponent(url.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"));
59
60
  }
60
61
 
61
62
  //#endregion
62
- //#region node_modules/.pnpm/@jsr+std__path@1.1.2/node_modules/@jsr/std__path/_common/strip_trailing_separators.js
63
+ //#region node_modules/.pnpm/@jsr+std__path@1.1.3/node_modules/@jsr/std__path/_common/strip_trailing_separators.js
63
64
  function stripTrailingSeparators(segment, isSep) {
64
65
  if (segment.length <= 1) return segment;
65
66
  let end = segment.length;
@@ -69,18 +70,18 @@ function stripTrailingSeparators(segment, isSep) {
69
70
  }
70
71
 
71
72
  //#endregion
72
- //#region node_modules/.pnpm/@jsr+std__path@1.1.2/node_modules/@jsr/std__path/_common/constants.js
73
+ //#region node_modules/.pnpm/@jsr+std__path@1.1.3/node_modules/@jsr/std__path/_common/constants.js
73
74
  const CHAR_DOT = 46;
74
75
  const CHAR_FORWARD_SLASH = 47;
75
76
 
76
77
  //#endregion
77
- //#region node_modules/.pnpm/@jsr+std__path@1.1.2/node_modules/@jsr/std__path/posix/_util.js
78
+ //#region node_modules/.pnpm/@jsr+std__path@1.1.3/node_modules/@jsr/std__path/posix/_util.js
78
79
  function isPosixPathSeparator(code) {
79
80
  return code === CHAR_FORWARD_SLASH;
80
81
  }
81
82
 
82
83
  //#endregion
83
- //#region node_modules/.pnpm/@jsr+std__path@1.1.2/node_modules/@jsr/std__path/windows/from_file_url.js
84
+ //#region node_modules/.pnpm/@jsr+std__path@1.1.3/node_modules/@jsr/std__path/windows/from_file_url.js
84
85
  /**
85
86
  * Converts a file URL to a path string.
86
87
  *
@@ -96,7 +97,7 @@ function isPosixPathSeparator(code) {
96
97
  *
97
98
  * @param url The file URL to convert.
98
99
  * @returns The path string.
99
- */ function fromFileUrl$2(url) {
100
+ */ function fromFileUrl$1(url) {
100
101
  url = assertArg$2(url);
101
102
  let path = decodeURIComponent(url.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\");
102
103
  if (url.hostname !== "") path = `\\\\${url.hostname}${path}`;
@@ -104,14 +105,14 @@ function isPosixPathSeparator(code) {
104
105
  }
105
106
 
106
107
  //#endregion
107
- //#region node_modules/.pnpm/@jsr+std__path@1.1.2/node_modules/@jsr/std__path/_common/dirname.js
108
+ //#region node_modules/.pnpm/@jsr+std__path@1.1.3/node_modules/@jsr/std__path/_common/dirname.js
108
109
  function assertArg$1(path) {
109
110
  assertPath(path);
110
111
  if (path.length === 0) return ".";
111
112
  }
112
113
 
113
114
  //#endregion
114
- //#region node_modules/.pnpm/@jsr+std__path@1.1.2/node_modules/@jsr/std__path/posix/dirname.js
115
+ //#region node_modules/.pnpm/@jsr+std__path@1.1.3/node_modules/@jsr/std__path/posix/dirname.js
115
116
  /**
116
117
  * Return the directory path of a `path`.
117
118
  *
@@ -139,8 +140,8 @@ function assertArg$1(path) {
139
140
  *
140
141
  * @param path The path to get the directory from.
141
142
  * @returns The directory path.
142
- */ function dirname(path) {
143
- if (path instanceof URL) path = fromFileUrl$1(path);
143
+ */ function dirname$1(path) {
144
+ if (path instanceof URL) path = fromFileUrl$2(path);
144
145
  assertArg$1(path);
145
146
  let end = -1;
146
147
  let matchedNonSeparator = false;
@@ -155,7 +156,7 @@ function assertArg$1(path) {
155
156
  }
156
157
 
157
158
  //#endregion
158
- //#region node_modules/.pnpm/@jsr+std__path@1.1.2/node_modules/@jsr/std__path/from_file_url.js
159
+ //#region node_modules/.pnpm/@jsr+std__path@1.1.3/node_modules/@jsr/std__path/from_file_url.js
159
160
  /**
160
161
  * Converts a file URL to a path string.
161
162
  *
@@ -176,18 +177,18 @@ function assertArg$1(path) {
176
177
  * @param url The file URL to convert to a path.
177
178
  * @returns The path string.
178
179
  */ function fromFileUrl(url) {
179
- return isWindows ? fromFileUrl$2(url) : fromFileUrl$1(url);
180
+ return isWindows ? fromFileUrl$1(url) : fromFileUrl$2(url);
180
181
  }
181
182
 
182
183
  //#endregion
183
- //#region node_modules/.pnpm/@jsr+std__path@1.1.2/node_modules/@jsr/std__path/_common/normalize.js
184
+ //#region node_modules/.pnpm/@jsr+std__path@1.1.3/node_modules/@jsr/std__path/_common/normalize.js
184
185
  function assertArg(path) {
185
186
  assertPath(path);
186
187
  if (path.length === 0) return ".";
187
188
  }
188
189
 
189
190
  //#endregion
190
- //#region node_modules/.pnpm/@jsr+std__path@1.1.2/node_modules/@jsr/std__path/_common/normalize_string.js
191
+ //#region node_modules/.pnpm/@jsr+std__path@1.1.3/node_modules/@jsr/std__path/_common/normalize_string.js
191
192
  function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
192
193
  let res = "";
193
194
  let lastSegmentLength = 0;
@@ -240,7 +241,7 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
240
241
  }
241
242
 
242
243
  //#endregion
243
- //#region node_modules/.pnpm/@jsr+std__path@1.1.2/node_modules/@jsr/std__path/posix/normalize.js
244
+ //#region node_modules/.pnpm/@jsr+std__path@1.1.3/node_modules/@jsr/std__path/posix/normalize.js
244
245
  /**
245
246
  * Normalize the `path`, resolving `'..'` and `'.'` segments.
246
247
  * Note that resolving these segments does not necessarily mean that all will be eliminated.
@@ -276,7 +277,7 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
276
277
  * @param path The path to normalize.
277
278
  * @returns The normalized path.
278
279
  */ function normalize(path) {
279
- if (path instanceof URL) path = fromFileUrl$1(path);
280
+ if (path instanceof URL) path = fromFileUrl$2(path);
280
281
  assertArg(path);
281
282
  const isAbsolute = isPosixPathSeparator(path.charCodeAt(0));
282
283
  const trailingSeparator = isPosixPathSeparator(path.charCodeAt(path.length - 1));
@@ -288,7 +289,7 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
288
289
  }
289
290
 
290
291
  //#endregion
291
- //#region node_modules/.pnpm/@jsr+std__path@1.1.2/node_modules/@jsr/std__path/posix/join.js
292
+ //#region node_modules/.pnpm/@jsr+std__path@1.1.3/node_modules/@jsr/std__path/posix/join.js
292
293
  /**
293
294
  * Join all given a sequence of `paths`,then normalizes the resulting path.
294
295
  *
@@ -317,9 +318,9 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
317
318
  * @param path The path to join. This can be string or file URL.
318
319
  * @param paths The paths to join.
319
320
  * @returns The joined path.
320
- */ function join$1(path, ...paths) {
321
+ */ function join$2(path, ...paths) {
321
322
  if (path === void 0) return ".";
322
- if (path instanceof URL) path = fromFileUrl$1(path);
323
+ if (path instanceof URL) path = fromFileUrl$2(path);
323
324
  paths = path ? [path, ...paths] : paths;
324
325
  paths.forEach((path$1) => assertPath(path$1));
325
326
  const joined = paths.filter((path$1) => path$1.length > 0).join("/");
@@ -361,10 +362,10 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
361
362
  * @deprecated Use
362
363
  * {@linkcode https://jsr.io/@std/path/doc/posix/~/dirname | @std/path/posix/dirname}
363
364
  * instead (examples included). `@std/url` will be removed in the future.
364
- */ function dirname$1(url) {
365
+ */ function dirname(url) {
365
366
  url = new URL(url);
366
367
  strip(url);
367
- url.pathname = dirname(url.pathname);
368
+ url.pathname = dirname$1(url.pathname);
368
369
  return url;
369
370
  }
370
371
 
@@ -391,14 +392,14 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
391
392
  * @deprecated Use
392
393
  * {@linkcode https://jsr.io/@std/path/doc/posix/~/join | @std/path/posix/join}
393
394
  * instead (examples included). `@std/url` will be removed in the future.
394
- */ function join$2(url, ...paths) {
395
+ */ function join$1(url, ...paths) {
395
396
  url = new URL(url);
396
- url.pathname = join$1(url.pathname, ...paths);
397
+ url.pathname = join$2(url.pathname, ...paths);
397
398
  return url;
398
399
  }
399
400
 
400
401
  //#endregion
401
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/_chars.js
402
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/_chars.js
402
403
  const TAB = 9;
403
404
  const LINE_FEED = 10;
404
405
  const CARRIAGE_RETURN = 13;
@@ -440,7 +441,7 @@ function isFlowIndicator(c) {
440
441
  }
441
442
 
442
443
  //#endregion
443
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/_type/binary.js
444
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/_type/binary.js
444
445
  const BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
445
446
  function resolveYamlBinary(data) {
446
447
  if (data === null) return false;
@@ -527,7 +528,7 @@ const binary = {
527
528
  };
528
529
 
529
530
  //#endregion
530
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/_type/bool.js
531
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/_type/bool.js
531
532
  const YAML_TRUE_BOOLEANS = [
532
533
  "true",
533
534
  "True",
@@ -560,7 +561,7 @@ const bool = {
560
561
  };
561
562
 
562
563
  //#endregion
563
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/_utils.js
564
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/_utils.js
564
565
  function isObject(value) {
565
566
  return value !== null && typeof value === "object";
566
567
  }
@@ -572,7 +573,7 @@ function isPlainObject(object) {
572
573
  }
573
574
 
574
575
  //#endregion
575
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/_type/float.js
576
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/_type/float.js
576
577
  const YAML_FLOAT_PATTERN = /* @__PURE__ */ new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
577
578
  function resolveYamlFloat(data) {
578
579
  if (!YAML_FLOAT_PATTERN.test(data) || data[data.length - 1] === "_") return false;
@@ -623,7 +624,7 @@ const float = {
623
624
  };
624
625
 
625
626
  //#endregion
626
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/_type/int.js
627
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/_type/int.js
627
628
  function isCharCodeInRange(c, lower, upper) {
628
629
  return lower <= c && c <= upper;
629
630
  }
@@ -733,7 +734,7 @@ const int = {
733
734
  };
734
735
 
735
736
  //#endregion
736
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/_type/map.js
737
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/_type/map.js
737
738
  const map = {
738
739
  tag: "tag:yaml.org,2002:map",
739
740
  resolve() {
@@ -746,7 +747,7 @@ const map = {
746
747
  };
747
748
 
748
749
  //#endregion
749
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/_type/merge.js
750
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/_type/merge.js
750
751
  const merge = {
751
752
  tag: "tag:yaml.org,2002:merge",
752
753
  kind: "scalar",
@@ -755,7 +756,7 @@ const merge = {
755
756
  };
756
757
 
757
758
  //#endregion
758
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/_type/nil.js
759
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/_type/nil.js
759
760
  const nil = {
760
761
  tag: "tag:yaml.org,2002:null",
761
762
  kind: "scalar",
@@ -773,7 +774,7 @@ const nil = {
773
774
  };
774
775
 
775
776
  //#endregion
776
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/_type/omap.js
777
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/_type/omap.js
777
778
  function resolveYamlOmap(data) {
778
779
  const objectKeys = /* @__PURE__ */ new Set();
779
780
  for (const object of data) {
@@ -797,7 +798,7 @@ const omap = {
797
798
  };
798
799
 
799
800
  //#endregion
800
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/_type/pairs.js
801
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/_type/pairs.js
801
802
  function resolveYamlPairs(data) {
802
803
  if (data === null) return true;
803
804
  return data.every((it) => isPlainObject(it) && Object.keys(it).length === 1);
@@ -812,7 +813,7 @@ const pairs = {
812
813
  };
813
814
 
814
815
  //#endregion
815
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/_type/regexp.js
816
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/_type/regexp.js
816
817
  const REGEXP = /^\/(?<regexp>[\s\S]+)\/(?<modifiers>[gismuy]*)$/;
817
818
  const regexp = {
818
819
  tag: "tag:yaml.org,2002:js/regexp",
@@ -836,7 +837,7 @@ const regexp = {
836
837
  };
837
838
 
838
839
  //#endregion
839
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/_type/seq.js
840
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/_type/seq.js
840
841
  const seq = {
841
842
  tag: "tag:yaml.org,2002:seq",
842
843
  kind: "sequence",
@@ -845,7 +846,7 @@ const seq = {
845
846
  };
846
847
 
847
848
  //#endregion
848
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/_type/set.js
849
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/_type/set.js
849
850
  const set = {
850
851
  tag: "tag:yaml.org,2002:set",
851
852
  kind: "mapping",
@@ -857,7 +858,7 @@ const set = {
857
858
  };
858
859
 
859
860
  //#endregion
860
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/_type/str.js
861
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/_type/str.js
861
862
  const str = {
862
863
  tag: "tag:yaml.org,2002:str",
863
864
  kind: "scalar",
@@ -866,7 +867,7 @@ const str = {
866
867
  };
867
868
 
868
869
  //#endregion
869
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/_type/timestamp.js
870
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/_type/timestamp.js
870
871
  const YAML_DATE_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$");
871
872
  const YAML_TIMESTAMP_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
872
873
  function resolveYamlTimestamp(data) {
@@ -918,7 +919,7 @@ const timestamp = {
918
919
  };
919
920
 
920
921
  //#endregion
921
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/_type/undefined.js
922
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/_type/undefined.js
922
923
  const undefinedType = {
923
924
  tag: "tag:yaml.org,2002:js/undefined",
924
925
  kind: "scalar",
@@ -935,7 +936,7 @@ const undefinedType = {
935
936
  };
936
937
 
937
938
  //#endregion
938
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/_schema.js
939
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/_schema.js
939
940
  function createTypeMap(implicitTypes, explicitTypes) {
940
941
  const result = {
941
942
  fallback: /* @__PURE__ */ new Map(),
@@ -955,11 +956,10 @@ function createSchema({ explicitTypes = [], implicitTypes = [], include }) {
955
956
  implicitTypes.push(...include.implicitTypes);
956
957
  explicitTypes.push(...include.explicitTypes);
957
958
  }
958
- const typeMap = createTypeMap(implicitTypes, explicitTypes);
959
959
  return {
960
960
  implicitTypes,
961
961
  explicitTypes,
962
- typeMap
962
+ typeMap: createTypeMap(implicitTypes, explicitTypes)
963
963
  };
964
964
  }
965
965
  /**
@@ -1033,7 +1033,7 @@ const SCHEMA_MAP = new Map([
1033
1033
  ]);
1034
1034
 
1035
1035
  //#endregion
1036
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/_loader_state.js
1036
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/_loader_state.js
1037
1037
  const CONTEXT_FLOW_IN = 1;
1038
1038
  const CONTEXT_FLOW_OUT = 2;
1039
1039
  const CONTEXT_BLOCK_IN = 3;
@@ -1226,8 +1226,7 @@ var LoaderState = class {
1226
1226
  let ch = this.peek();
1227
1227
  while (ch !== 0) {
1228
1228
  if (ch !== MINUS) break;
1229
- const following = this.peek(1);
1230
- if (!isWhiteSpaceOrEOL(following)) break;
1229
+ if (!isWhiteSpaceOrEOL(this.peek(1))) break;
1231
1230
  detected = true;
1232
1231
  this.position++;
1233
1232
  if (this.skipSeparationSpace(true, -1)) {
@@ -1365,8 +1364,7 @@ var LoaderState = class {
1365
1364
  following = this.peek(1);
1366
1365
  if (isWhiteSpaceOrEOL(following) || withinFlowCollection && isFlowIndicator(following)) break;
1367
1366
  } else if (ch === SHARP) {
1368
- const preceding = this.peek(-1);
1369
- if (isWhiteSpaceOrEOL(preceding)) break;
1367
+ if (isWhiteSpaceOrEOL(this.peek(-1))) break;
1370
1368
  } else if (this.position === this.lineStart && this.testDocumentSeparator() || withinFlowCollection && isFlowIndicator(ch)) break;
1371
1369
  else if (isEOL(ch)) {
1372
1370
  line = this.line;
@@ -1938,7 +1936,7 @@ var LoaderState = class {
1938
1936
  };
1939
1937
 
1940
1938
  //#endregion
1941
- //#region node_modules/.pnpm/@jsr+std__yaml@1.0.9/node_modules/@jsr/std__yaml/parse.js
1939
+ //#region node_modules/.pnpm/@jsr+std__yaml@1.0.10/node_modules/@jsr/std__yaml/parse.js
1942
1940
  function sanitizeInput(input) {
1943
1941
  input = String(input);
1944
1942
  if (input.length > 0) {
@@ -2018,17 +2016,15 @@ var SchemaError = class extends Error {
2018
2016
  };
2019
2017
  async function loadSchemaValidator() {
2020
2018
  const thisFile = new URL(import.meta.url);
2021
- const schemaFile = join$2(dirname$1(thisFile), "schema.yaml");
2019
+ const schemaFile = join$1(dirname(thisFile), "schema.yaml");
2022
2020
  let content;
2023
2021
  if (schemaFile.protocol !== "file:") content = await (await fetch(schemaFile)).text();
2024
2022
  else content = await readFile(fromFileUrl(schemaFile), { encoding: "utf-8" });
2025
- const schemaObject = parse(content);
2026
- return new Validator(schemaObject);
2023
+ return new Validator(parse(content));
2027
2024
  }
2028
2025
  let schemaValidator = void 0;
2029
2026
  async function loadSchema(path) {
2030
- const content = await readFile(path, { encoding: "utf-8" });
2031
- const schema = parse(content);
2027
+ const schema = parse(await readFile(path, { encoding: "utf-8" }));
2032
2028
  if (schemaValidator == null) schemaValidator = await loadSchemaValidator();
2033
2029
  const result = schemaValidator.validate(schema);
2034
2030
  const errors = [];
@@ -2196,8 +2192,19 @@ const scalarTypes = {
2196
2192
  && ${v}["@id"] !== "" && ${v}["@id"] !== "/"`;
2197
2193
  },
2198
2194
  decoder(v) {
2199
- return `${v}["@id"].startsWith("at://did:plc:")
2200
- ? new URL("at://did%3Aplc%3A" + ${v}["@id"].slice(13))
2195
+ return `${v}["@id"].startsWith("at://")
2196
+ ? new URL("at://" +
2197
+ encodeURIComponent(
2198
+ ${v}["@id"].includes("/", 5)
2199
+ ? ${v}["@id"].slice(5, ${v}["@id"].indexOf("/", 5))
2200
+ : ${v}["@id"].slice(5)
2201
+ ) +
2202
+ (
2203
+ ${v}["@id"].includes("/", 5)
2204
+ ? ${v}["@id"].slice(${v}["@id"].indexOf("/", 5))
2205
+ : ""
2206
+ )
2207
+ )
2201
2208
  : new URL(${v}["@id"])`;
2202
2209
  }
2203
2210
  },
@@ -2551,8 +2558,7 @@ test("Object.fromJsonLd()", async () => {
2551
2558
  const note = await create.getObject();
2552
2559
  assertInstanceOf(note, Note);
2553
2560
  assertEquals(note.content, "Content");
2554
- const empty = await Object$1.fromJsonLd({});
2555
- assertInstanceOf(empty, Object$1);
2561
+ assertInstanceOf(await Object$1.fromJsonLd({}), Object$1);
2556
2562
  await assertRejects(() => Object$1.fromJsonLd(null), TypeError, "Invalid JSON-LD: null.");
2557
2563
  await assertRejects(() => Object$1.fromJsonLd(void 0), TypeError, "Invalid JSON-LD: undefined.");
2558
2564
  });
@@ -2691,8 +2697,7 @@ test("Activity.getObject()", async () => {
2691
2697
  assertInstanceOf(object, Object$1);
2692
2698
  assertEquals(object.id, new URL("https://example.com/object"));
2693
2699
  assertEquals(object.name, "Fetched object");
2694
- const jsonLd = await activity.toJsonLd();
2695
- assertEquals(jsonLd, {
2700
+ assertEquals(await activity.toJsonLd(), {
2696
2701
  "@context": [
2697
2702
  "https://w3id.org/identity/v1",
2698
2703
  "https://www.w3.org/ns/activitystreams",
@@ -2710,8 +2715,7 @@ test("Activity.getObject()", async () => {
2710
2715
  }
2711
2716
  }
2712
2717
  });
2713
- const activity2 = new Activity({ object: new URL("https://example.com/not-found") });
2714
- assertEquals(await activity2.getObject({ suppressError: true }), null);
2718
+ assertEquals(await new Activity({ object: new URL("https://example.com/not-found") }).getObject({ suppressError: true }), null);
2715
2719
  const object3 = await (await Activity.fromJsonLd({
2716
2720
  "@context": "https://www.w3.org/ns/activitystreams",
2717
2721
  type: "Create",
@@ -2809,19 +2813,17 @@ test("Person.fromJsonLd()", async () => {
2809
2813
  const publicKey = await person.getPublicKey({ documentLoader: mockDocumentLoader });
2810
2814
  assertInstanceOf(publicKey, CryptographicKey);
2811
2815
  assertEquals(publicKey?.ownerId, new URL("https://todon.eu/users/hongminhee"));
2812
- const person2 = await Person.fromJsonLd({
2816
+ assertEquals((await Person.fromJsonLd({
2813
2817
  "@context": ["https://www.w3.org/ns/activitystreams", { alsoKnownAs: {
2814
2818
  "@id": "as:alsoKnownAs",
2815
2819
  "@type": "@id"
2816
2820
  } }],
2817
2821
  "type": "Person",
2818
2822
  "alsoKnownAs": "at://did:plc:x7xdowahlhm5xulzqw4ehv6q"
2819
- });
2820
- assertEquals(person2.aliasId, new URL("at://did%3Aplc%3Ax7xdowahlhm5xulzqw4ehv6q"));
2823
+ })).aliasId, new URL("at://did%3Aplc%3Ax7xdowahlhm5xulzqw4ehv6q"));
2821
2824
  });
2822
2825
  test("Person.toJsonLd()", async () => {
2823
- const person = new Person({ aliases: [new URL("https://example.com/alias")] });
2824
- assertEquals(await person.toJsonLd(), {
2826
+ assertEquals(await new Person({ aliases: [new URL("https://example.com/alias")] }).toJsonLd(), {
2825
2827
  "@context": [
2826
2828
  "https://www.w3.org/ns/activitystreams",
2827
2829
  "https://w3id.org/security/v1",
@@ -2906,14 +2908,11 @@ test("Note.quoteUrl", async () => {
2906
2908
  _misskey_quote: "https://example.com/object2",
2907
2909
  quoteUri: "https://example.com/object3"
2908
2910
  };
2909
- const loaded = await Note.fromJsonLd(jsonLd);
2910
- assertEquals(loaded.quoteUrl, new URL("https://example.com/object"));
2911
+ assertEquals((await Note.fromJsonLd(jsonLd)).quoteUrl, new URL("https://example.com/object"));
2911
2912
  delete jsonLd.quoteUrl;
2912
- const loaded2 = await Note.fromJsonLd(jsonLd);
2913
- assertEquals(loaded2.quoteUrl, new URL("https://example.com/object2"));
2913
+ assertEquals((await Note.fromJsonLd(jsonLd)).quoteUrl, new URL("https://example.com/object2"));
2914
2914
  delete jsonLd._misskey_quote;
2915
- const loaded3 = await Note.fromJsonLd(jsonLd);
2916
- assertEquals(loaded3.quoteUrl, new URL("https://example.com/object3"));
2915
+ assertEquals((await Note.fromJsonLd(jsonLd)).quoteUrl, new URL("https://example.com/object3"));
2917
2916
  });
2918
2917
  test("Key.publicKey", async () => {
2919
2918
  const jwk = {
@@ -2997,6 +2996,16 @@ test("Link.fromJsonLd()", async () => {
2997
2996
  });
2998
2997
  assertEquals(link.rel, "canonical");
2999
2998
  assertEquals(link.href, new URL("at://did%3Aplc%3Aia76kvnndjutgedggx2ibrem/app.bsky.feed.post/3lyxjjs27jkqg"));
2999
+ assertEquals((await Link.fromJsonLd({
3000
+ "@context": "https://www.w3.org/ns/activitystreams",
3001
+ "type": "Link",
3002
+ "href": "at://bnewbold.bsky.team/app.bsky.feed.post/3jwdwj2ctlk26"
3003
+ })).href, new URL("at://bnewbold.bsky.team/app.bsky.feed.post/3jwdwj2ctlk26"));
3004
+ assertEquals((await Link.fromJsonLd({
3005
+ "@context": "https://www.w3.org/ns/activitystreams",
3006
+ "type": "Link",
3007
+ "href": "at://did:plc:ia76kvnndjutgedggx2ibrem"
3008
+ })).href, new URL("at://did%3Aplc%3Aia76kvnndjutgedggx2ibrem"));
3000
3009
  });
3001
3010
  function getAllProperties(type, types$1) {
3002
3011
  const props = type.properties;
@@ -3089,8 +3098,7 @@ const sampleValues = {
3089
3098
  };
3090
3099
  const types = navigator?.userAgent === "Cloudflare-Workers" ? {} : await loadSchemaFiles(import.meta.dirname);
3091
3100
  for (const typeUri in types) {
3092
- const type = types[typeUri];
3093
- const cls = vocab_exports[type.name];
3101
+ const cls = vocab_exports[types[typeUri].name];
3094
3102
  sampleValues[typeUri] = new cls({
3095
3103
  "@id": "https://example.com/",
3096
3104
  "@type": typeUri
@@ -3179,8 +3187,7 @@ for (const typeUri in types) {
3179
3187
  };
3180
3188
  if (property.functional || property.singularAccessor) test(`${type.name}.get${pascalCase(property.singularName)}() [auto]`, async () => {
3181
3189
  const instance = new cls({ [property.singularName]: new URL("https://example.com/test") });
3182
- const value = await instance[`get${pascalCase(property.singularName)}`].call(instance, { documentLoader: docLoader });
3183
- assertEquals(value, sampleValues[property.range[0]]);
3190
+ assertEquals(await instance[`get${pascalCase(property.singularName)}`].call(instance, { documentLoader: docLoader }), sampleValues[property.range[0]]);
3184
3191
  if (property.untyped) return;
3185
3192
  const wrongRef = new cls({ [property.singularName]: new URL("https://example.com/wrong-type") });
3186
3193
  await assertRejects(() => wrongRef[`get${pascalCase(property.singularName)}`].call(wrongRef, { documentLoader: mockDocumentLoader }), TypeError);
@@ -3244,31 +3251,28 @@ for (const typeUri in types) {
3244
3251
  });
3245
3252
  assertEquals(jsonLd2["@context"], "https://www.w3.org/ns/activitystreams");
3246
3253
  assertEquals(jsonLd2.id, "https://example.com/");
3247
- const restored2 = await cls.fromJsonLd(jsonLd2, {
3254
+ assertEquals(await cls.fromJsonLd(jsonLd2, {
3248
3255
  documentLoader: mockDocumentLoader,
3249
3256
  contextLoader: mockDocumentLoader
3250
- });
3251
- assertEquals(restored2, instance);
3257
+ }), instance);
3252
3258
  const expanded = await instance.toJsonLd({
3253
3259
  contextLoader: mockDocumentLoader,
3254
3260
  format: "expand"
3255
3261
  });
3256
- const restored3 = await cls.fromJsonLd(expanded, {
3262
+ assertEquals(await cls.fromJsonLd(expanded, {
3257
3263
  documentLoader: mockDocumentLoader,
3258
3264
  contextLoader: mockDocumentLoader
3259
- });
3260
- assertEquals(restored3, instance);
3265
+ }), instance);
3261
3266
  const instance2 = new cls({
3262
3267
  id: new URL("https://example.com/"),
3263
3268
  ...initValues,
3264
3269
  ...globalThis.Object.fromEntries(allProperties.filter((p) => !areAllScalarTypes(p.range, types)).map((p) => p.functional ? [p.singularName, new URL("https://example.com/test")] : [p.pluralName, [new URL("https://example.com/test")]]))
3265
3270
  });
3266
3271
  const jsonLd3 = await instance2.toJsonLd({ contextLoader: mockDocumentLoader });
3267
- const restored4 = await cls.fromJsonLd(jsonLd3, {
3272
+ assertEquals(await cls.fromJsonLd(jsonLd3, {
3268
3273
  documentLoader: mockDocumentLoader,
3269
3274
  contextLoader: mockDocumentLoader
3270
- });
3271
- assertEquals(restored4, instance2);
3275
+ }), instance2);
3272
3276
  assertRejects(() => instance.toJsonLd({ context: "https://www.w3.org/ns/activitystreams" }), TypeError);
3273
3277
  assertRejects(() => instance.toJsonLd({
3274
3278
  format: "expand",