@fedify/fedify 1.10.5 → 1.10.7

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 (281) hide show
  1. package/dist/{actor-CjkHF7Cj.cjs → actor-BGIAXtRd.cjs} +3112 -4674
  2. package/dist/{actor-Ch9BTg3N.js → actor-C-_2S5Mn.mjs} +8 -15
  3. package/dist/{actor-CQdxP8N-.js → actor-Cujbx4Zv.js} +1205 -2768
  4. package/dist/{actor-eeONG_sv.d.ts → actor-DXwwgFeR.d.ts} +3 -3
  5. package/dist/{actor-D190nbTD.d.cts → actor-DxvGbmjm.d.cts} +3 -3
  6. package/dist/{assert-MZs1qjMx.js → assert-DikXweDx.mjs} +5 -9
  7. package/dist/{assert_equals-DSbWqCm3.js → assert_equals-Ew3jOFa3.mjs} +55 -69
  8. package/dist/{assert_instance_of-DHz7EHNU.js → assert_instance_of-C4Ri6VuN.mjs} +5 -9
  9. package/dist/{assert_is_error-BPGph1Jx.js → assert_is_error-C50x8tnw.mjs} +5 -9
  10. package/dist/{assert_not_equals-f3m3epl3.js → assert_not_equals--wG9hV7u.mjs} +6 -13
  11. package/dist/{assert_rejects-DiIiJbZn.js → assert_rejects-CJC9ThS-.mjs} +6 -11
  12. package/dist/{assert_throws-BOO88avQ.js → assert_throws-BIL7gChy.mjs} +6 -10
  13. package/dist/{authdocloader-fR-Fqcpa.js → authdocloader-1Sk2bqFx.mjs} +9 -14
  14. package/dist/{authdocloader-COFZT9Wh.js → authdocloader-D4Y6iyTF.js} +8 -15
  15. package/dist/{authdocloader-zc5ibOmU.cjs → authdocloader-DQfruCir.cjs} +14 -22
  16. package/dist/{builder-YD0q32nG.js → builder-CZbrDRl7.mjs} +31 -40
  17. package/dist/{client-B3mQJNO7.d.ts → client-D7t26_op.d.ts} +2 -2
  18. package/dist/{client-BgCucCG7.js → client-Dyb8MI3u.mjs} +11 -15
  19. package/dist/{client-n6L4GtQL.d.cts → client-yc0Z0P6Y.d.cts} +2 -2
  20. package/dist/{collection-CSzG2j1P.js → collection-BD6-SZ6O.mjs} +7 -12
  21. package/dist/compat/mod.cjs +5 -8
  22. package/dist/compat/mod.d.cts +78 -12
  23. package/dist/compat/mod.d.ts +78 -12
  24. package/dist/compat/mod.js +4 -8
  25. package/dist/compat/transformers.test.mjs +62 -0
  26. package/dist/{context-Cr5DIxq_.d.ts → context-C6n2yrj0.d.ts} +33 -26
  27. package/dist/{context-WJoO0SQs.d.cts → context-PfghnHYj.d.cts} +33 -26
  28. package/dist/{denokv-D0nfNQ1x.js → denokv-NJPMXyK0.mjs} +22 -11
  29. package/dist/{docloader-BucCRHZI.d.ts → docloader-D7k5A9JP.d.ts} +2 -7
  30. package/dist/{docloader-ChxNLZAA.d.cts → docloader-DbM94pGY.d.cts} +2 -7
  31. package/dist/{docloader-BETPdM09.js → docloader-Dtaju6oI.js} +18 -156
  32. package/dist/{docloader-irBWMSOZ.cjs → docloader-Q3DfzuUi.cjs} +116 -220
  33. package/dist/{esm-iGH0sRsE.js → esm-DOJg552-.mjs} +49 -85
  34. package/dist/federation/{builder.test.js → builder.test.mjs} +22 -41
  35. package/dist/federation/collection.test.d.mts +2 -0
  36. package/dist/federation/collection.test.mjs +21 -0
  37. package/dist/federation/handler.test.d.mts +2 -0
  38. package/dist/federation/{handler.test.js → handler.test.mjs} +29 -58
  39. package/dist/federation/idempotency.test.d.mts +2 -0
  40. package/dist/federation/{idempotency.test.js → idempotency.test.mjs} +29 -59
  41. package/dist/federation/inbox.test.d.mts +2 -0
  42. package/dist/federation/{inbox.test.js → inbox.test.mjs} +10 -15
  43. package/dist/federation/keycache.test.d.mts +2 -0
  44. package/dist/federation/{keycache.test.js → keycache.test.mjs} +13 -18
  45. package/dist/federation/kv.test.d.mts +2 -0
  46. package/dist/federation/{kv.test.js → kv.test.mjs} +12 -26
  47. package/dist/federation/middleware.test.d.mts +2 -0
  48. package/dist/federation/{middleware.test.js → middleware.test.mjs} +182 -197
  49. package/dist/federation/mod.cjs +245 -21
  50. package/dist/federation/mod.d.cts +4 -13
  51. package/dist/federation/mod.d.ts +4 -13
  52. package/dist/federation/mod.js +240 -18
  53. package/dist/federation/mq.test.d.mts +2 -0
  54. package/dist/federation/{mq.test.js → mq.test.mjs} +23 -38
  55. package/dist/federation/retry.test.d.mts +2 -0
  56. package/dist/federation/{retry.test.js → retry.test.mjs} +9 -14
  57. package/dist/federation/router.test.d.mts +2 -0
  58. package/dist/federation/{router.test.js → router.test.mjs} +12 -19
  59. package/dist/federation/send.test.d.mts +2 -0
  60. package/dist/federation/{send.test.js → send.test.mjs} +24 -34
  61. package/dist/{http-PgdBoDIj.js → http-BRwSVBn1.mjs} +16 -32
  62. package/dist/{http-DS9z_HzB.d.ts → http-BYXQvoZQ.d.ts} +5 -9
  63. package/dist/{http-C_1RU1U_.d.cts → http-CMzg-A9P.d.cts} +5 -9
  64. package/dist/{http-CQAqR_vx.cjs → http-DCrun8ql.cjs} +51 -68
  65. package/dist/{http-CxiIW4rD.js → http-DRnRwr3i.js} +17 -33
  66. package/dist/{inbox-DcDIqTbR.js → inbox-pD1nbb_5.mjs} +17 -25
  67. package/dist/key-Cmbps6xt.cjs +4 -0
  68. package/dist/{key-dNFkodH5.cjs → key-DEYIxAFs.cjs} +42 -50
  69. package/dist/key-DMO0TgTa.mjs +5 -0
  70. package/dist/{key-I-ibyaZH.js → key-DdL5Oc59.mjs} +12 -18
  71. package/dist/{key-Cg0kO4dA.js → key-vIzWPiil.js} +19 -19
  72. package/dist/{keycache-hSs_XFSb.js → keycache-BVR9f06Y.mjs} +6 -10
  73. package/dist/{keys-CElJez9H.js → keys-Co-0pK8a.mjs} +6 -10
  74. package/dist/{kv-DipCBaw2.d.ts → kv-C6UC8M9S.d.ts} +1 -1
  75. package/dist/{kv-BqEOXcZv.d.cts → kv-ClC9WJh5.d.cts} +1 -1
  76. package/dist/{kv-QzKcOQgP.js → kv-OuT2IU64.mjs} +6 -10
  77. package/dist/{ld-b16r91YS.js → ld-BFaDk5gX.mjs} +17 -31
  78. package/dist/{lookup-CySNcNcC.js → lookup-CMYXdjVH.mjs} +8 -17
  79. package/dist/{lookup-Bfq9Jpm0.cjs → lookup-CZGJqSjm.cjs} +16 -23
  80. package/dist/{lookup-CiSAeWJl.js → lookup-jlmCTRsO.js} +5 -11
  81. package/dist/middleware-BWlZ-wms.cjs +4 -0
  82. package/dist/{middleware-C5emnCh-.js → middleware-BXD5WJbj.mjs} +276 -321
  83. package/dist/{middleware-Dxo56yae.cjs → middleware-BhMQrJXH.cjs} +494 -547
  84. package/dist/{middleware-Bs4xDuXR.js → middleware-CmA2E9Bu.js} +349 -393
  85. package/dist/middleware-H3Ce7yn3.mjs +5 -0
  86. package/dist/{mod-D5rfgGFE.d.cts → mod-BQ3lrlXU.d.cts} +3 -3
  87. package/dist/{mod-Dz5Y15Uy.d.cts → mod-C72agZIN.d.cts} +4 -4
  88. package/dist/{mod-CxMBb_dd.d.cts → mod-CDbqB60V.d.cts} +2 -2
  89. package/dist/{mod-DS4kJskR.d.ts → mod-Lj0W1nnG.d.ts} +3 -3
  90. package/dist/{mod-BZfdiPBo.d.ts → mod-_HNKaczF.d.ts} +4 -4
  91. package/dist/{mod-ChbckRnC.d.ts → mod-lHd-Zdd_.d.ts} +2 -2
  92. package/dist/mod.cjs +31 -33
  93. package/dist/mod.d.cts +15 -17
  94. package/dist/mod.d.ts +15 -17
  95. package/dist/mod.js +20 -23
  96. package/dist/{mq-B7R1Q-M5.d.cts → mq-CrItclRD.d.cts} +1 -1
  97. package/dist/{mq-CRGm1e_F.d.ts → mq-D_ZZRdby.d.ts} +1 -1
  98. package/dist/nodeinfo/client.test.d.mts +2 -0
  99. package/dist/nodeinfo/{client.test.js → client.test.mjs} +23 -45
  100. package/dist/nodeinfo/handler.test.d.mts +2 -0
  101. package/dist/nodeinfo/{handler.test.js → handler.test.mjs} +14 -43
  102. package/dist/nodeinfo/mod.cjs +5 -9
  103. package/dist/nodeinfo/mod.d.cts +2 -5
  104. package/dist/nodeinfo/mod.d.ts +2 -5
  105. package/dist/nodeinfo/mod.js +4 -9
  106. package/dist/nodeinfo/semver.test.d.mts +2 -0
  107. package/dist/nodeinfo/{semver.test.js → semver.test.mjs} +28 -51
  108. package/dist/nodeinfo/types.test.d.mts +2 -0
  109. package/dist/nodeinfo/{types.test.js → types.test.mjs} +10 -21
  110. package/dist/otel/exporter.test.d.mts +2 -0
  111. package/dist/otel/{exporter.test.js → exporter.test.mjs} +122 -180
  112. package/dist/otel/mod.cjs +16 -22
  113. package/dist/otel/mod.d.cts +2 -2
  114. package/dist/otel/mod.d.ts +2 -2
  115. package/dist/otel/mod.js +9 -16
  116. package/dist/{otel-Chy5T2Xh.js → otel-0v4Zy01l.mjs} +5 -10
  117. package/dist/{owner-AcrG3Xz1.d.cts → owner-0yNTyGMb.d.cts} +4 -4
  118. package/dist/{owner-Bs-sPbHX.js → owner-CNdS8zxf.mjs} +11 -16
  119. package/dist/{owner-8NMhXwJd.d.ts → owner-CPEbNpnZ.d.ts} +4 -4
  120. package/dist/{proof-SgRikE_Y.js → proof-Co7YmDpv.mjs} +20 -32
  121. package/dist/{proof-flD2DeA-.js → proof-DHPbi_Mx.js} +34 -60
  122. package/dist/{proof-BvQS195q.cjs → proof-DcPdtve2.cjs} +115 -140
  123. package/dist/{retry-D4GJ670a.js → retry-Ddbq3AcK.mjs} +4 -7
  124. package/dist/rolldown-runtime-C7fyD9f2.js +15 -0
  125. package/dist/runtime/authdocloader.test.d.mts +2 -0
  126. package/dist/runtime/{authdocloader.test.js → authdocloader.test.mjs} +16 -28
  127. package/dist/runtime/docloader.test.d.mts +2 -0
  128. package/dist/runtime/{docloader.test.js → docloader.test.mjs} +55 -77
  129. package/dist/runtime/key.test.d.mts +2 -0
  130. package/dist/runtime/{key.test.js → key.test.mjs} +27 -57
  131. package/dist/runtime/langstr.test.d.mts +2 -0
  132. package/dist/runtime/{langstr.test.js → langstr.test.mjs} +9 -19
  133. package/dist/runtime/link.test.d.mts +2 -0
  134. package/dist/runtime/{link.test.js → link.test.mjs} +7 -11
  135. package/dist/runtime/mod.cjs +7 -13
  136. package/dist/runtime/mod.d.cts +103 -6
  137. package/dist/runtime/mod.d.ts +103 -6
  138. package/dist/runtime/mod.js +6 -13
  139. package/dist/runtime/multibase/multibase.test.d.mts +2 -0
  140. package/dist/runtime/multibase/{multibase.test.js → multibase.test.mjs} +16 -33
  141. package/dist/runtime/url.test.d.mts +2 -0
  142. package/dist/runtime/{url.test.js → url.test.mjs} +10 -15
  143. package/dist/{semver-dArNLkR9.js → semver-CgD82xxg.mjs} +13 -28
  144. package/dist/{send-C0gFHa2i.js → send-BRCWNcMa.mjs} +7 -12
  145. package/dist/sig/http.test.d.mts +2 -0
  146. package/dist/sig/{http.test.js → http.test.mjs} +119 -203
  147. package/dist/sig/key.test.d.mts +2 -0
  148. package/dist/sig/{key.test.js → key.test.mjs} +13 -22
  149. package/dist/sig/ld.test.d.mts +2 -0
  150. package/dist/sig/{ld.test.js → ld.test.mjs} +24 -39
  151. package/dist/sig/mod.cjs +7 -13
  152. package/dist/sig/mod.d.cts +3 -7
  153. package/dist/sig/mod.d.ts +3 -7
  154. package/dist/sig/mod.js +6 -13
  155. package/dist/sig/owner.test.d.mts +2 -0
  156. package/dist/sig/{owner.test.js → owner.test.mjs} +23 -39
  157. package/dist/sig/proof.test.d.mts +2 -0
  158. package/dist/sig/{proof.test.js → proof.test.mjs} +18 -31
  159. package/dist/{std__assert-X-_kMxKM.js → std__assert-2v7gYiZp.mjs} +13 -24
  160. package/dist/testing/docloader.test.d.mts +2 -0
  161. package/dist/testing/docloader.test.mjs +12 -0
  162. package/dist/testing/{mod.d.ts → mod.d.mts} +371 -541
  163. package/dist/testing/mod.mjs +5 -0
  164. package/dist/{testing-C1GIraJh.js → testing-BLIh1cXz.mjs} +27 -35
  165. package/dist/{transformers-BFT6d7J5.js → transformers-BV4OeK9o.js} +3 -7
  166. package/dist/{transformers-CoBS-oFG.cjs → transformers-CLtJ5H8o.cjs} +20 -25
  167. package/dist/{types-BgUCCngg.cjs → types-B34v-m2N.cjs} +45 -64
  168. package/dist/{types-BIgY6c-l.js → types-CAnkAQGM.mjs} +5 -9
  169. package/dist/{types-Bu-epI-z.js → types-CXZk86AG.js} +18 -36
  170. package/dist/vocab/actor.test.d.mts +2 -0
  171. package/dist/vocab/{actor.test.js → actor.test.mjs} +308 -550
  172. package/dist/vocab/cjs.test.d.mts +2 -0
  173. package/dist/vocab/cjs.test.mjs +14 -0
  174. package/dist/vocab/lookup.test.d.mts +2 -0
  175. package/dist/vocab/{lookup.test.js → lookup.test.mjs} +34 -51
  176. package/dist/vocab/mod.cjs +256 -16
  177. package/dist/vocab/mod.d.cts +3 -5
  178. package/dist/vocab/mod.d.ts +3 -5
  179. package/dist/vocab/mod.js +249 -10
  180. package/dist/vocab/type.test.d.mts +2 -0
  181. package/dist/vocab/type.test.mjs +16 -0
  182. package/dist/vocab/vocab.test.d.mts +2 -0
  183. package/dist/vocab/{vocab.test.js → vocab.test.mjs} +178 -311
  184. package/dist/{vocab-BASuuzcJ.d.ts → vocab-DaT4UsJF.d.ts} +2 -2
  185. package/dist/{vocab-DPMmFPJ1.d.cts → vocab-DnlmNyXi.d.cts} +2 -2
  186. package/dist/{type-DUhon7qK.js → vocab-rT_94Pke.mjs} +1178 -2876
  187. package/dist/webfinger/handler.test.d.mts +2 -0
  188. package/dist/webfinger/{handler.test.js → handler.test.mjs} +23 -56
  189. package/dist/webfinger/lookup.test.d.mts +2 -0
  190. package/dist/webfinger/{lookup.test.js → lookup.test.mjs} +13 -27
  191. package/dist/webfinger/mod.cjs +5 -9
  192. package/dist/webfinger/mod.d.cts +1 -3
  193. package/dist/webfinger/mod.d.ts +1 -3
  194. package/dist/webfinger/mod.js +4 -9
  195. package/dist/x/cfworkers.cjs +25 -14
  196. package/dist/x/cfworkers.d.cts +33 -6
  197. package/dist/x/cfworkers.d.ts +33 -6
  198. package/dist/x/cfworkers.js +22 -12
  199. package/dist/x/cfworkers.test.d.mts +2 -0
  200. package/dist/x/{cfworkers.test.js → cfworkers.test.mjs} +28 -26
  201. package/dist/x/hono.cjs +25 -14
  202. package/dist/x/hono.d.cts +1 -11
  203. package/dist/x/hono.d.ts +1 -11
  204. package/dist/x/hono.js +22 -12
  205. package/dist/x/sveltekit.cjs +23 -12
  206. package/dist/x/sveltekit.d.cts +1 -11
  207. package/dist/x/sveltekit.d.ts +1 -11
  208. package/dist/x/sveltekit.js +20 -10
  209. package/package.json +2 -2
  210. package/dist/chunk-DqRYRqnO.cjs +0 -34
  211. package/dist/compat/transformers.test.d.ts +0 -3
  212. package/dist/compat/transformers.test.js +0 -86
  213. package/dist/compat-DmDDELst.cjs +0 -4
  214. package/dist/compat-nxUqe4Z-.js +0 -4
  215. package/dist/federation/builder.test.d.ts +0 -3
  216. package/dist/federation/collection.test.d.ts +0 -3
  217. package/dist/federation/collection.test.js +0 -35
  218. package/dist/federation/handler.test.d.ts +0 -3
  219. package/dist/federation/idempotency.test.d.ts +0 -3
  220. package/dist/federation/inbox.test.d.ts +0 -3
  221. package/dist/federation/keycache.test.d.ts +0 -3
  222. package/dist/federation/kv.test.d.ts +0 -3
  223. package/dist/federation/middleware.test.d.ts +0 -3
  224. package/dist/federation/mq.test.d.ts +0 -3
  225. package/dist/federation/retry.test.d.ts +0 -3
  226. package/dist/federation/router.test.d.ts +0 -3
  227. package/dist/federation/send.test.d.ts +0 -3
  228. package/dist/federation-C15gGOh1.cjs +0 -266
  229. package/dist/federation-K-xsO03l.js +0 -248
  230. package/dist/key-Bnod5wJl.js +0 -10
  231. package/dist/key-C6swTX71.js +0 -10
  232. package/dist/key-_Uq8gkmM.cjs +0 -10
  233. package/dist/middleware-BWsOtDIF.cjs +0 -17
  234. package/dist/middleware-Bm4bJzjg.js +0 -26
  235. package/dist/middleware-BvODpE_U.js +0 -17
  236. package/dist/mod-C2tOeRkN.d.cts +0 -1
  237. package/dist/mod-CD7gfdq3.d.ts +0 -104
  238. package/dist/mod-CnULG6Aa.d.ts +0 -82
  239. package/dist/mod-FZd39qVq.d.cts +0 -1
  240. package/dist/mod-JUhOKMHj.d.cts +0 -102
  241. package/dist/mod-OQfb33eH.d.cts +0 -80
  242. package/dist/nodeinfo/client.test.d.ts +0 -3
  243. package/dist/nodeinfo/handler.test.d.ts +0 -3
  244. package/dist/nodeinfo/semver.test.d.ts +0 -3
  245. package/dist/nodeinfo/types.test.d.ts +0 -3
  246. package/dist/nodeinfo-Co9lJrWl.cjs +0 -4
  247. package/dist/nodeinfo-DfycQ8Wf.js +0 -4
  248. package/dist/otel/exporter.test.d.ts +0 -3
  249. package/dist/runtime/authdocloader.test.d.ts +0 -3
  250. package/dist/runtime/docloader.test.d.ts +0 -3
  251. package/dist/runtime/key.test.d.ts +0 -3
  252. package/dist/runtime/langstr.test.d.ts +0 -3
  253. package/dist/runtime/link.test.d.ts +0 -3
  254. package/dist/runtime/multibase/multibase.test.d.ts +0 -3
  255. package/dist/runtime/url.test.d.ts +0 -3
  256. package/dist/runtime-C58AJWSv.cjs +0 -4
  257. package/dist/runtime-DPYEDf-o.js +0 -4
  258. package/dist/sig/http.test.d.ts +0 -3
  259. package/dist/sig/key.test.d.ts +0 -3
  260. package/dist/sig/ld.test.d.ts +0 -3
  261. package/dist/sig/owner.test.d.ts +0 -3
  262. package/dist/sig/proof.test.d.ts +0 -3
  263. package/dist/sig-ByHXzqUi.cjs +0 -4
  264. package/dist/sig-Cj3tk-ig.js +0 -4
  265. package/dist/testing/docloader.test.d.ts +0 -3
  266. package/dist/testing/docloader.test.js +0 -24
  267. package/dist/testing/mod.js +0 -10
  268. package/dist/vocab/actor.test.d.ts +0 -3
  269. package/dist/vocab/lookup.test.d.ts +0 -3
  270. package/dist/vocab/type.test.d.ts +0 -3
  271. package/dist/vocab/type.test.js +0 -25
  272. package/dist/vocab/vocab.test.d.ts +0 -3
  273. package/dist/vocab-5i6DEIi6.cjs +0 -294
  274. package/dist/vocab-CBavAdew.js +0 -258
  275. package/dist/webfinger/handler.test.d.ts +0 -3
  276. package/dist/webfinger/lookup.test.d.ts +0 -3
  277. package/dist/webfinger-BjOEdFPs.cjs +0 -4
  278. package/dist/webfinger-De_bU0iE.js +0 -4
  279. package/dist/x/cfworkers.test.d.ts +0 -3
  280. /package/dist/{mod-1pDWKvUL.d.ts → compat/transformers.test.d.mts} +0 -0
  281. /package/dist/{mod-g0xFzAP9.d.ts → federation/builder.test.d.mts} +0 -0
@@ -1,35 +1,28 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
- import { URLPattern } from "urlpattern-polyfill";
4
- globalThis.addEventListener = () => {};
5
-
6
- import { Activity, Announce, Collection, Create, CryptographicKey, Follow, Hashtag, LanguageString, Link, Note, Object as Object$1, OrderedCollectionPage, Person, Place, Question, Source, decode, vocab_exports } from "../type-DUhon7qK.js";
7
- import { assertEquals } from "../assert_equals-DSbWqCm3.js";
8
- import { assert } from "../assert-MZs1qjMx.js";
9
- import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
10
- import "../lookup-CySNcNcC.js";
11
- import { mockDocumentLoader, test } from "../testing-C1GIraJh.js";
12
- import "../std__assert-X-_kMxKM.js";
13
- import { assertFalse, assertRejects } from "../assert_rejects-DiIiJbZn.js";
14
- import "../assert_is_error-BPGph1Jx.js";
15
- import { assertNotEquals } from "../assert_not_equals-f3m3epl3.js";
16
- import { assertThrows } from "../assert_throws-BOO88avQ.js";
17
- import { ed25519PublicKey, rsaPublicKey1 } from "../keys-CElJez9H.js";
1
+ import { Temporal } from "@js-temporal/polyfill";
2
+ import "urlpattern-polyfill";
3
+ globalThis.addEventListener = () => {};
4
+ import { A as LanguageString, C as Person, D as Source, L as decode, T as Question, _ as Note, f as Hashtag, h as Link, i as Collection, k as vocab_exports, n as Announce, o as Create, s as CryptographicKey, t as Activity, u as Follow, v as Object$1, w as Place, x as OrderedCollectionPage } from "../vocab-rT_94Pke.mjs";
5
+ import { a as mockDocumentLoader, t as test } from "../testing-BLIh1cXz.mjs";
6
+ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
7
+ import "../std__assert-2v7gYiZp.mjs";
8
+ import { n as assertFalse, t as assertRejects } from "../assert_rejects-CJC9ThS-.mjs";
9
+ import { t as assertInstanceOf } from "../assert_instance_of-C4Ri6VuN.mjs";
10
+ import { t as assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
11
+ import { t as assertThrows } from "../assert_throws-BIL7gChy.mjs";
12
+ import { t as assert } from "../assert-DikXweDx.mjs";
13
+ import { o as rsaPublicKey1, r as ed25519PublicKey } from "../keys-Co-0pK8a.mjs";
18
14
  import { pascalCase } from "es-toolkit";
19
15
  import { parseLanguageTag } from "@phensley/language-tag";
20
16
  import { Validator } from "@cfworker/json-schema";
21
17
  import { readFile, readdir } from "node:fs/promises";
22
18
  import { join } from "node:path";
23
-
24
19
  //#region ../../node_modules/.pnpm/@jsr+std__path@1.1.0/node_modules/@jsr/std__path/_os.js
25
20
  const isWindows = globalThis.Deno?.build.os === "windows" || globalThis.navigator?.platform?.startsWith("Win") || globalThis.process?.platform?.startsWith("win") || false;
26
-
27
21
  //#endregion
28
22
  //#region ../../node_modules/.pnpm/@jsr+std__path@1.1.0/node_modules/@jsr/std__path/_common/assert_path.js
29
23
  function assertPath(path) {
30
24
  if (typeof path !== "string") throw new TypeError(`Path must be a string, received "${JSON.stringify(path)}"`);
31
25
  }
32
-
33
26
  //#endregion
34
27
  //#region ../../node_modules/.pnpm/@jsr+std__path@1.1.0/node_modules/@jsr/std__path/_common/from_file_url.js
35
28
  function assertArg$2(url) {
@@ -37,7 +30,6 @@ function assertArg$2(url) {
37
30
  if (url.protocol !== "file:") throw new TypeError(`URL must be a file URL: received "${url.protocol}"`);
38
31
  return url;
39
32
  }
40
-
41
33
  //#endregion
42
34
  //#region ../../node_modules/.pnpm/@jsr+std__path@1.1.0/node_modules/@jsr/std__path/posix/from_file_url.js
43
35
  /**
@@ -53,11 +45,10 @@ function assertArg$2(url) {
53
45
  *
54
46
  * @param url The file URL to convert.
55
47
  * @returns The path string.
56
- */ function fromFileUrl$1(url) {
48
+ */ function fromFileUrl$2(url) {
57
49
  url = assertArg$2(url);
58
50
  return decodeURIComponent(url.pathname.replace(/%(?![0-9A-Fa-f]{2})/g, "%25"));
59
51
  }
60
-
61
52
  //#endregion
62
53
  //#region ../../node_modules/.pnpm/@jsr+std__path@1.1.0/node_modules/@jsr/std__path/_common/strip_trailing_separators.js
63
54
  function stripTrailingSeparators(segment, isSep) {
@@ -67,18 +58,11 @@ function stripTrailingSeparators(segment, isSep) {
67
58
  else break;
68
59
  return segment.slice(0, end);
69
60
  }
70
-
71
- //#endregion
72
- //#region ../../node_modules/.pnpm/@jsr+std__path@1.1.0/node_modules/@jsr/std__path/_common/constants.js
73
- const CHAR_DOT = 46;
74
- const CHAR_FORWARD_SLASH = 47;
75
-
76
61
  //#endregion
77
62
  //#region ../../node_modules/.pnpm/@jsr+std__path@1.1.0/node_modules/@jsr/std__path/posix/_util.js
78
63
  function isPosixPathSeparator(code) {
79
- return code === CHAR_FORWARD_SLASH;
64
+ return code === 47;
80
65
  }
81
-
82
66
  //#endregion
83
67
  //#region ../../node_modules/.pnpm/@jsr+std__path@1.1.0/node_modules/@jsr/std__path/windows/from_file_url.js
84
68
  /**
@@ -96,20 +80,18 @@ function isPosixPathSeparator(code) {
96
80
  *
97
81
  * @param url The file URL to convert.
98
82
  * @returns The path string.
99
- */ function fromFileUrl$2(url) {
83
+ */ function fromFileUrl$1(url) {
100
84
  url = assertArg$2(url);
101
85
  let path = decodeURIComponent(url.pathname.replace(/\//g, "\\").replace(/%(?![0-9A-Fa-f]{2})/g, "%25")).replace(/^\\*([A-Za-z]:)(\\|$)/, "$1\\");
102
86
  if (url.hostname !== "") path = `\\\\${url.hostname}${path}`;
103
87
  return path;
104
88
  }
105
-
106
89
  //#endregion
107
90
  //#region ../../node_modules/.pnpm/@jsr+std__path@1.1.0/node_modules/@jsr/std__path/_common/dirname.js
108
91
  function assertArg$1(path) {
109
92
  assertPath(path);
110
93
  if (path.length === 0) return ".";
111
94
  }
112
-
113
95
  //#endregion
114
96
  //#region ../../node_modules/.pnpm/@jsr+std__path@1.1.0/node_modules/@jsr/std__path/posix/dirname.js
115
97
  /**
@@ -139,8 +121,8 @@ function assertArg$1(path) {
139
121
  *
140
122
  * @param path The path to get the directory from.
141
123
  * @returns The directory path.
142
- */ function dirname(path) {
143
- if (path instanceof URL) path = fromFileUrl$1(path);
124
+ */ function dirname$1(path) {
125
+ if (path instanceof URL) path = fromFileUrl$2(path);
144
126
  assertArg$1(path);
145
127
  let end = -1;
146
128
  let matchedNonSeparator = false;
@@ -153,7 +135,6 @@ function assertArg$1(path) {
153
135
  if (end === -1) return isPosixPathSeparator(path.charCodeAt(0)) ? "/" : ".";
154
136
  return stripTrailingSeparators(path.slice(0, end), isPosixPathSeparator);
155
137
  }
156
-
157
138
  //#endregion
158
139
  //#region ../../node_modules/.pnpm/@jsr+std__path@1.1.0/node_modules/@jsr/std__path/from_file_url.js
159
140
  /**
@@ -176,16 +157,14 @@ function assertArg$1(path) {
176
157
  * @param url The file URL to convert to a path.
177
158
  * @returns The path string.
178
159
  */ function fromFileUrl(url) {
179
- return isWindows ? fromFileUrl$2(url) : fromFileUrl$1(url);
160
+ return isWindows ? fromFileUrl$1(url) : fromFileUrl$2(url);
180
161
  }
181
-
182
162
  //#endregion
183
163
  //#region ../../node_modules/.pnpm/@jsr+std__path@1.1.0/node_modules/@jsr/std__path/_common/normalize.js
184
164
  function assertArg(path) {
185
165
  assertPath(path);
186
166
  if (path.length === 0) return ".";
187
167
  }
188
-
189
168
  //#endregion
190
169
  //#region ../../node_modules/.pnpm/@jsr+std__path@1.1.0/node_modules/@jsr/std__path/_common/normalize_string.js
191
170
  function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
@@ -197,10 +176,10 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
197
176
  for (let i = 0; i <= path.length; ++i) {
198
177
  if (i < path.length) code = path.charCodeAt(i);
199
178
  else if (isPathSeparator(code)) break;
200
- else code = CHAR_FORWARD_SLASH;
179
+ else code = 47;
201
180
  if (isPathSeparator(code)) {
202
181
  if (lastSlash === i - 1 || dots === 1) {} else if (lastSlash !== i - 1 && dots === 2) {
203
- if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== CHAR_DOT || res.charCodeAt(res.length - 2) !== CHAR_DOT) {
182
+ if (res.length < 2 || lastSegmentLength !== 2 || res.charCodeAt(res.length - 1) !== 46 || res.charCodeAt(res.length - 2) !== 46) {
204
183
  if (res.length > 2) {
205
184
  const lastSlashIndex = res.lastIndexOf(separator);
206
185
  if (lastSlashIndex === -1) {
@@ -233,12 +212,11 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
233
212
  }
234
213
  lastSlash = i;
235
214
  dots = 0;
236
- } else if (code === CHAR_DOT && dots !== -1) ++dots;
215
+ } else if (code === 46 && dots !== -1) ++dots;
237
216
  else dots = -1;
238
217
  }
239
218
  return res;
240
219
  }
241
-
242
220
  //#endregion
243
221
  //#region ../../node_modules/.pnpm/@jsr+std__path@1.1.0/node_modules/@jsr/std__path/posix/normalize.js
244
222
  /**
@@ -276,7 +254,7 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
276
254
  * @param path The path to normalize.
277
255
  * @returns The normalized path.
278
256
  */ function normalize(path) {
279
- if (path instanceof URL) path = fromFileUrl$1(path);
257
+ if (path instanceof URL) path = fromFileUrl$2(path);
280
258
  assertArg(path);
281
259
  const isAbsolute = isPosixPathSeparator(path.charCodeAt(0));
282
260
  const trailingSeparator = isPosixPathSeparator(path.charCodeAt(path.length - 1));
@@ -286,7 +264,6 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
286
264
  if (isAbsolute) return `/${path}`;
287
265
  return path;
288
266
  }
289
-
290
267
  //#endregion
291
268
  //#region ../../node_modules/.pnpm/@jsr+std__path@1.1.0/node_modules/@jsr/std__path/posix/join.js
292
269
  /**
@@ -317,15 +294,14 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
317
294
  * @param path The path to join. This can be string or file URL.
318
295
  * @param paths The paths to join.
319
296
  * @returns The joined path.
320
- */ function join$1(path, ...paths) {
297
+ */ function join$2(path, ...paths) {
321
298
  if (path === void 0) return ".";
322
- if (path instanceof URL) path = fromFileUrl$1(path);
299
+ if (path instanceof URL) path = fromFileUrl$2(path);
323
300
  paths = path ? [path, ...paths] : paths;
324
- paths.forEach((path$1) => assertPath(path$1));
325
- const joined = paths.filter((path$1) => path$1.length > 0).join("/");
301
+ paths.forEach((path) => assertPath(path));
302
+ const joined = paths.filter((path) => path.length > 0).join("/");
326
303
  return joined === "" ? "." : normalize(joined);
327
304
  }
328
-
329
305
  //#endregion
330
306
  //#region ../../node_modules/.pnpm/@jsr+std__url@1.0.0-rc.3/node_modules/@jsr/std__url/_strip.js
331
307
  /**
@@ -337,7 +313,6 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
337
313
  url.hash = "";
338
314
  url.search = "";
339
315
  }
340
-
341
316
  //#endregion
342
317
  //#region ../../node_modules/.pnpm/@jsr+std__url@1.0.0-rc.3/node_modules/@jsr/std__url/dirname.js
343
318
  /**
@@ -361,13 +336,12 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
361
336
  * @deprecated Use
362
337
  * {@linkcode https://jsr.io/@std/path/doc/posix/~/dirname | @std/path/posix/dirname}
363
338
  * instead (examples included). `@std/url` will be removed in the future.
364
- */ function dirname$1(url) {
339
+ */ function dirname(url) {
365
340
  url = new URL(url);
366
341
  strip(url);
367
- url.pathname = dirname(url.pathname);
342
+ url.pathname = dirname$1(url.pathname);
368
343
  return url;
369
344
  }
370
-
371
345
  //#endregion
372
346
  //#region ../../node_modules/.pnpm/@jsr+std__url@1.0.0-rc.3/node_modules/@jsr/std__url/join.js
373
347
  /**
@@ -391,54 +365,23 @@ function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
391
365
  * @deprecated Use
392
366
  * {@linkcode https://jsr.io/@std/path/doc/posix/~/join | @std/path/posix/join}
393
367
  * instead (examples included). `@std/url` will be removed in the future.
394
- */ function join$2(url, ...paths) {
368
+ */ function join$1(url, ...paths) {
395
369
  url = new URL(url);
396
- url.pathname = join$1(url.pathname, ...paths);
370
+ url.pathname = join$2(url.pathname, ...paths);
397
371
  return url;
398
372
  }
399
-
400
- //#endregion
401
- //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/_chars.js
402
- const TAB = 9;
403
- const LINE_FEED = 10;
404
- const CARRIAGE_RETURN = 13;
405
- const SPACE = 32;
406
- const EXCLAMATION = 33;
407
- const DOUBLE_QUOTE = 34;
408
- const SHARP = 35;
409
- const PERCENT = 37;
410
- const AMPERSAND = 38;
411
- const SINGLE_QUOTE = 39;
412
- const ASTERISK = 42;
413
- const PLUS = 43;
414
- const COMMA = 44;
415
- const MINUS = 45;
416
- const DOT = 46;
417
- const COLON = 58;
418
- const SMALLER_THAN = 60;
419
- const GREATER_THAN = 62;
420
- const QUESTION = 63;
421
- const COMMERCIAL_AT = 64;
422
- const LEFT_SQUARE_BRACKET = 91;
423
- const BACKSLASH = 92;
424
- const RIGHT_SQUARE_BRACKET = 93;
425
- const GRAVE_ACCENT = 96;
426
- const LEFT_CURLY_BRACKET = 123;
427
- const VERTICAL_LINE = 124;
428
- const RIGHT_CURLY_BRACKET = 125;
429
373
  function isEOL(c) {
430
- return c === LINE_FEED || c === CARRIAGE_RETURN;
374
+ return c === 10 || c === 13;
431
375
  }
432
376
  function isWhiteSpace(c) {
433
- return c === TAB || c === SPACE;
377
+ return c === 9 || c === 32;
434
378
  }
435
379
  function isWhiteSpaceOrEOL(c) {
436
380
  return isWhiteSpace(c) || isEOL(c);
437
381
  }
438
382
  function isFlowIndicator(c) {
439
- return c === COMMA || c === LEFT_SQUARE_BRACKET || c === RIGHT_SQUARE_BRACKET || c === LEFT_CURLY_BRACKET || c === RIGHT_CURLY_BRACKET;
383
+ return c === 44 || c === 91 || c === 93 || c === 123 || c === 125;
440
384
  }
441
-
442
385
  //#endregion
443
386
  //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/_type/binary.js
444
387
  const BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
@@ -447,9 +390,9 @@ function resolveYamlBinary(data) {
447
390
  let code;
448
391
  let bitlen = 0;
449
392
  const max = data.length;
450
- const map$1 = BASE64_MAP;
393
+ const map = BASE64_MAP;
451
394
  for (let idx = 0; idx < max; idx++) {
452
- code = map$1.indexOf(data.charAt(idx));
395
+ code = map.indexOf(data.charAt(idx));
453
396
  if (code > 64) continue;
454
397
  if (code < 0) return false;
455
398
  bitlen += 6;
@@ -459,7 +402,7 @@ function resolveYamlBinary(data) {
459
402
  function constructYamlBinary(data) {
460
403
  const input = data.replace(/[\r\n=]/g, "");
461
404
  const max = input.length;
462
- const map$1 = BASE64_MAP;
405
+ const map = BASE64_MAP;
463
406
  const result = [];
464
407
  let bits = 0;
465
408
  for (let idx = 0; idx < max; idx++) {
@@ -468,7 +411,7 @@ function constructYamlBinary(data) {
468
411
  result.push(bits >> 8 & 255);
469
412
  result.push(bits & 255);
470
413
  }
471
- bits = bits << 6 | map$1.indexOf(input.charAt(idx));
414
+ bits = bits << 6 | map.indexOf(input.charAt(idx));
472
415
  }
473
416
  const tailbits = max % 4 * 6;
474
417
  if (tailbits === 0) {
@@ -483,34 +426,34 @@ function constructYamlBinary(data) {
483
426
  }
484
427
  function representYamlBinary(object) {
485
428
  const max = object.length;
486
- const map$1 = BASE64_MAP;
429
+ const map = BASE64_MAP;
487
430
  let result = "";
488
431
  let bits = 0;
489
432
  for (let idx = 0; idx < max; idx++) {
490
433
  if (idx % 3 === 0 && idx) {
491
- result += map$1[bits >> 18 & 63];
492
- result += map$1[bits >> 12 & 63];
493
- result += map$1[bits >> 6 & 63];
494
- result += map$1[bits & 63];
434
+ result += map[bits >> 18 & 63];
435
+ result += map[bits >> 12 & 63];
436
+ result += map[bits >> 6 & 63];
437
+ result += map[bits & 63];
495
438
  }
496
439
  bits = (bits << 8) + object[idx];
497
440
  }
498
441
  const tail = max % 3;
499
442
  if (tail === 0) {
500
- result += map$1[bits >> 18 & 63];
501
- result += map$1[bits >> 12 & 63];
502
- result += map$1[bits >> 6 & 63];
503
- result += map$1[bits & 63];
443
+ result += map[bits >> 18 & 63];
444
+ result += map[bits >> 12 & 63];
445
+ result += map[bits >> 6 & 63];
446
+ result += map[bits & 63];
504
447
  } else if (tail === 2) {
505
- result += map$1[bits >> 10 & 63];
506
- result += map$1[bits >> 4 & 63];
507
- result += map$1[bits << 2 & 63];
508
- result += map$1[64];
448
+ result += map[bits >> 10 & 63];
449
+ result += map[bits >> 4 & 63];
450
+ result += map[bits << 2 & 63];
451
+ result += map[64];
509
452
  } else if (tail === 1) {
510
- result += map$1[bits >> 2 & 63];
511
- result += map$1[bits << 4 & 63];
512
- result += map$1[64];
513
- result += map$1[64];
453
+ result += map[bits >> 2 & 63];
454
+ result += map[bits << 4 & 63];
455
+ result += map[64];
456
+ result += map[64];
514
457
  }
515
458
  return result;
516
459
  }
@@ -525,7 +468,6 @@ const binary = {
525
468
  represent: representYamlBinary,
526
469
  resolve: resolveYamlBinary
527
470
  };
528
-
529
471
  //#endregion
530
472
  //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/_type/bool.js
531
473
  const YAML_TRUE_BOOLEANS = [
@@ -548,20 +490,16 @@ const bool = {
548
490
  resolve: (data) => YAML_BOOLEANS.includes(data),
549
491
  represent: {
550
492
  lowercase: (object) => {
551
- const value = object instanceof Boolean ? object.valueOf() : object;
552
- return value ? "true" : "false";
493
+ return (object instanceof Boolean ? object.valueOf() : object) ? "true" : "false";
553
494
  },
554
495
  uppercase: (object) => {
555
- const value = object instanceof Boolean ? object.valueOf() : object;
556
- return value ? "TRUE" : "FALSE";
496
+ return (object instanceof Boolean ? object.valueOf() : object) ? "TRUE" : "FALSE";
557
497
  },
558
498
  camelcase: (object) => {
559
- const value = object instanceof Boolean ? object.valueOf() : object;
560
- return value ? "True" : "False";
499
+ return (object instanceof Boolean ? object.valueOf() : object) ? "True" : "False";
561
500
  }
562
501
  }
563
502
  };
564
-
565
503
  //#endregion
566
504
  //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/_utils.js
567
505
  function isObject(value) {
@@ -573,7 +511,6 @@ function isNegativeZero(i) {
573
511
  function isPlainObject(object) {
574
512
  return Object.prototype.toString.call(object) === "[object Object]";
575
513
  }
576
-
577
514
  //#endregion
578
515
  //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/_type/float.js
579
516
  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))$");
@@ -624,7 +561,6 @@ const float = {
624
561
  represent: representYamlFloat,
625
562
  resolve: resolveYamlFloat
626
563
  };
627
-
628
564
  //#endregion
629
565
  //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/_type/int.js
630
566
  function isCharCodeInRange(c, lower, upper) {
@@ -725,8 +661,7 @@ const int = {
725
661
  return value >= 0 ? `0${value.toString(8)}` : `-0${value.toString(8).slice(1)}`;
726
662
  },
727
663
  decimal(object) {
728
- const value = object instanceof Number ? object.valueOf() : object;
729
- return value.toString(10);
664
+ return (object instanceof Number ? object.valueOf() : object).toString(10);
730
665
  },
731
666
  hexadecimal(object) {
732
667
  const value = object instanceof Number ? object.valueOf() : object;
@@ -735,7 +670,6 @@ const int = {
735
670
  },
736
671
  resolve: resolveYamlInteger
737
672
  };
738
-
739
673
  //#endregion
740
674
  //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/_type/map.js
741
675
  const map = {
@@ -748,7 +682,6 @@ const map = {
748
682
  },
749
683
  kind: "mapping"
750
684
  };
751
-
752
685
  //#endregion
753
686
  //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/_type/merge.js
754
687
  const merge = {
@@ -757,7 +690,6 @@ const merge = {
757
690
  resolve: (data) => data === "<<" || data === null,
758
691
  construct: (data) => data
759
692
  };
760
-
761
693
  //#endregion
762
694
  //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/_type/nil.js
763
695
  const nil = {
@@ -775,7 +707,6 @@ const nil = {
775
707
  camelcase: () => "Null"
776
708
  }
777
709
  };
778
-
779
710
  //#endregion
780
711
  //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/_type/omap.js
781
712
  function resolveYamlOmap(data) {
@@ -799,7 +730,6 @@ const omap = {
799
730
  return data;
800
731
  }
801
732
  };
802
-
803
733
  //#endregion
804
734
  //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/_type/pairs.js
805
735
  function resolveYamlPairs(data) {
@@ -814,7 +744,6 @@ const pairs = {
814
744
  kind: "sequence",
815
745
  resolve: resolveYamlPairs
816
746
  };
817
-
818
747
  //#endregion
819
748
  //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/_type/regexp.js
820
749
  const REGEXP = /^\/(?<regexp>[\s\S]+)\/(?<modifiers>[gismuy]*)$/;
@@ -832,13 +761,12 @@ const regexp = {
832
761
  return true;
833
762
  },
834
763
  construct(data) {
835
- const { regexp: regexp$1 = data, modifiers = "" } = data.match(REGEXP)?.groups ?? {};
836
- return new RegExp(regexp$1, modifiers);
764
+ const { regexp = data, modifiers = "" } = data.match(REGEXP)?.groups ?? {};
765
+ return new RegExp(regexp, modifiers);
837
766
  },
838
767
  predicate: (object) => object instanceof RegExp,
839
768
  represent: (object) => object.toString()
840
769
  };
841
-
842
770
  //#endregion
843
771
  //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/_type/seq.js
844
772
  const seq = {
@@ -847,7 +775,6 @@ const seq = {
847
775
  resolve: () => true,
848
776
  construct: (data) => data !== null ? data : []
849
777
  };
850
-
851
778
  //#endregion
852
779
  //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/_type/set.js
853
780
  const set = {
@@ -859,7 +786,6 @@ const set = {
859
786
  return Object.values(data).every((it) => it === null);
860
787
  }
861
788
  };
862
-
863
789
  //#endregion
864
790
  //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/_type/str.js
865
791
  const str = {
@@ -868,7 +794,6 @@ const str = {
868
794
  resolve: () => true,
869
795
  construct: (data) => data !== null ? data : ""
870
796
  };
871
-
872
797
  //#endregion
873
798
  //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/_type/timestamp.js
874
799
  const YAML_DATE_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$");
@@ -920,7 +845,6 @@ const timestamp = {
920
845
  represent: representYamlTimestamp,
921
846
  resolve: resolveYamlTimestamp
922
847
  };
923
-
924
848
  //#endregion
925
849
  //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/_type/undefined.js
926
850
  const undefinedType = {
@@ -929,9 +853,7 @@ const undefinedType = {
929
853
  resolve() {
930
854
  return true;
931
855
  },
932
- construct() {
933
- return void 0;
934
- },
856
+ construct() {},
935
857
  predicate(object) {
936
858
  return typeof object === "undefined";
937
859
  },
@@ -939,7 +861,6 @@ const undefinedType = {
939
861
  return "";
940
862
  }
941
863
  };
942
-
943
864
  //#endregion
944
865
  //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/_schema.js
945
866
  function createTypeMap(implicitTypes, explicitTypes) {
@@ -951,8 +872,7 @@ function createTypeMap(implicitTypes, explicitTypes) {
951
872
  };
952
873
  const fallbackMap = result.fallback;
953
874
  for (const type of [...implicitTypes, ...explicitTypes]) {
954
- const map$1 = result[type.kind];
955
- map$1.set(type.tag, type);
875
+ result[type.kind].set(type.tag, type);
956
876
  fallbackMap.set(type.tag, type);
957
877
  }
958
878
  return result;
@@ -962,11 +882,10 @@ function createSchema({ explicitTypes = [], implicitTypes = [], include }) {
962
882
  implicitTypes.push(...include.implicitTypes);
963
883
  explicitTypes.push(...include.explicitTypes);
964
884
  }
965
- const typeMap = createTypeMap(implicitTypes, explicitTypes);
966
885
  return {
967
886
  implicitTypes,
968
887
  explicitTypes,
969
- typeMap
888
+ typeMap: createTypeMap(implicitTypes, explicitTypes)
970
889
  };
971
890
  }
972
891
  /**
@@ -1038,7 +957,6 @@ const SCHEMA_MAP = new Map([
1038
957
  ["json", JSON_SCHEMA],
1039
958
  ["extended", EXTENDED_SCHEMA]
1040
959
  ]);
1041
-
1042
960
  //#endregion
1043
961
  //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/_loader_state.js
1044
962
  const CONTEXT_FLOW_IN = 1;
@@ -1169,13 +1087,13 @@ var LoaderState = class {
1169
1087
  }
1170
1088
  skipComment() {
1171
1089
  let ch = this.peek();
1172
- if (ch !== SHARP) return;
1090
+ if (ch !== 35) return;
1173
1091
  ch = this.next();
1174
1092
  while (ch !== 0 && !isEOL(ch)) ch = this.next();
1175
1093
  }
1176
1094
  readIndent() {
1177
1095
  let char = this.peek();
1178
- while (char === SPACE) {
1096
+ while (char === 32) {
1179
1097
  this.lineIndent += 1;
1180
1098
  char = this.next();
1181
1099
  }
@@ -1235,9 +1153,8 @@ var LoaderState = class {
1235
1153
  if (this.anchor !== null && typeof this.anchor !== "undefined") this.anchorMap.set(this.anchor, result);
1236
1154
  let ch = this.peek();
1237
1155
  while (ch !== 0) {
1238
- if (ch !== MINUS) break;
1239
- const following = this.peek(1);
1240
- if (!isWhiteSpaceOrEOL(following)) break;
1156
+ if (ch !== 45) break;
1157
+ if (!isWhiteSpaceOrEOL(this.peek(1))) break;
1241
1158
  detected = true;
1242
1159
  this.position++;
1243
1160
  if (this.skipSeparationSpace(true, -1)) {
@@ -1312,10 +1229,10 @@ var LoaderState = class {
1312
1229
  }
1313
1230
  readLineBreak() {
1314
1231
  const ch = this.peek();
1315
- if (ch === LINE_FEED) this.position++;
1316
- else if (ch === CARRIAGE_RETURN) {
1232
+ if (ch === 10) this.position++;
1233
+ else if (ch === 13) {
1317
1234
  this.position++;
1318
- if (this.peek() === LINE_FEED) this.position++;
1235
+ if (this.peek() === 10) this.position++;
1319
1236
  } else throw this.#createError("Cannot read line: line break not found");
1320
1237
  this.line += 1;
1321
1238
  this.lineStart = this.position;
@@ -1344,7 +1261,7 @@ var LoaderState = class {
1344
1261
  }
1345
1262
  testDocumentSeparator() {
1346
1263
  let ch = this.peek();
1347
- if ((ch === MINUS || ch === DOT) && ch === this.peek(1) && ch === this.peek(2)) {
1264
+ if ((ch === 45 || ch === 46) && ch === this.peek(1) && ch === this.peek(2)) {
1348
1265
  ch = this.peek(3);
1349
1266
  if (ch === 0 || isWhiteSpaceOrEOL(ch)) return true;
1350
1267
  }
@@ -1358,9 +1275,9 @@ var LoaderState = class {
1358
1275
  const kind = this.kind;
1359
1276
  const result = this.result;
1360
1277
  let ch = this.peek();
1361
- if (isWhiteSpaceOrEOL(ch) || isFlowIndicator(ch) || ch === SHARP || ch === AMPERSAND || ch === ASTERISK || ch === EXCLAMATION || ch === VERTICAL_LINE || ch === GREATER_THAN || ch === SINGLE_QUOTE || ch === DOUBLE_QUOTE || ch === PERCENT || ch === COMMERCIAL_AT || ch === GRAVE_ACCENT) return false;
1278
+ if (isWhiteSpaceOrEOL(ch) || isFlowIndicator(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) return false;
1362
1279
  let following;
1363
- if (ch === QUESTION || ch === MINUS) {
1280
+ if (ch === 63 || ch === 45) {
1364
1281
  following = this.peek(1);
1365
1282
  if (isWhiteSpaceOrEOL(following) || withinFlowCollection && isFlowIndicator(following)) return false;
1366
1283
  }
@@ -1371,12 +1288,11 @@ var LoaderState = class {
1371
1288
  let hasPendingContent = false;
1372
1289
  let line = 0;
1373
1290
  while (ch !== 0) {
1374
- if (ch === COLON) {
1291
+ if (ch === 58) {
1375
1292
  following = this.peek(1);
1376
1293
  if (isWhiteSpaceOrEOL(following) || withinFlowCollection && isFlowIndicator(following)) break;
1377
- } else if (ch === SHARP) {
1378
- const preceding = this.peek(-1);
1379
- if (isWhiteSpaceOrEOL(preceding)) break;
1294
+ } else if (ch === 35) {
1295
+ if (isWhiteSpaceOrEOL(this.peek(-1))) break;
1380
1296
  } else if (this.position === this.lineStart && this.testDocumentSeparator() || withinFlowCollection && isFlowIndicator(ch)) break;
1381
1297
  else if (isEOL(ch)) {
1382
1298
  line = this.line;
@@ -1412,7 +1328,7 @@ var LoaderState = class {
1412
1328
  }
1413
1329
  readSingleQuotedScalar(nodeIndent) {
1414
1330
  let ch = this.peek();
1415
- if (ch !== SINGLE_QUOTE) return false;
1331
+ if (ch !== 39) return false;
1416
1332
  this.kind = "scalar";
1417
1333
  this.result = "";
1418
1334
  this.position++;
@@ -1420,10 +1336,10 @@ var LoaderState = class {
1420
1336
  let captureEnd = this.position;
1421
1337
  ch = this.peek();
1422
1338
  while (ch !== 0) {
1423
- if (ch === SINGLE_QUOTE) {
1339
+ if (ch === 39) {
1424
1340
  this.captureSegment(captureStart, this.position, true);
1425
1341
  ch = this.next();
1426
- if (ch === SINGLE_QUOTE) {
1342
+ if (ch === 39) {
1427
1343
  captureStart = this.position;
1428
1344
  this.position++;
1429
1345
  captureEnd = this.position;
@@ -1443,7 +1359,7 @@ var LoaderState = class {
1443
1359
  }
1444
1360
  readDoubleQuotedScalar(nodeIndent) {
1445
1361
  let ch = this.peek();
1446
- if (ch !== DOUBLE_QUOTE) return false;
1362
+ if (ch !== 34) return false;
1447
1363
  this.kind = "scalar";
1448
1364
  this.result = "";
1449
1365
  this.position++;
@@ -1452,12 +1368,12 @@ var LoaderState = class {
1452
1368
  let tmp;
1453
1369
  ch = this.peek();
1454
1370
  while (ch !== 0) {
1455
- if (ch === DOUBLE_QUOTE) {
1371
+ if (ch === 34) {
1456
1372
  this.captureSegment(captureStart, this.position, true);
1457
1373
  this.position++;
1458
1374
  return true;
1459
1375
  }
1460
- if (ch === BACKSLASH) {
1376
+ if (ch === 92) {
1461
1377
  this.captureSegment(captureStart, this.position, true);
1462
1378
  ch = this.next();
1463
1379
  if (isEOL(ch)) this.skipSeparationSpace(false, nodeIndent);
@@ -1494,11 +1410,11 @@ var LoaderState = class {
1494
1410
  let terminator;
1495
1411
  let isMapping = true;
1496
1412
  let result = {};
1497
- if (ch === LEFT_SQUARE_BRACKET) {
1498
- terminator = RIGHT_SQUARE_BRACKET;
1413
+ if (ch === 91) {
1414
+ terminator = 93;
1499
1415
  isMapping = false;
1500
1416
  result = [];
1501
- } else if (ch === LEFT_CURLY_BRACKET) terminator = RIGHT_CURLY_BRACKET;
1417
+ } else if (ch === 123) terminator = 125;
1502
1418
  else return false;
1503
1419
  if (this.anchor !== null && typeof this.anchor !== "undefined") this.anchorMap.set(this.anchor, result);
1504
1420
  ch = this.next();
@@ -1527,7 +1443,7 @@ var LoaderState = class {
1527
1443
  if (!readNext) throw this.#createError("Cannot read flow collection: missing comma between flow collection entries");
1528
1444
  keyTag = keyNode = valueNode = null;
1529
1445
  isPair = isExplicitPair = false;
1530
- if (ch === QUESTION) {
1446
+ if (ch === 63) {
1531
1447
  following = this.peek(1);
1532
1448
  if (isWhiteSpaceOrEOL(following)) {
1533
1449
  isPair = isExplicitPair = true;
@@ -1546,7 +1462,7 @@ var LoaderState = class {
1546
1462
  keyNode = this.result;
1547
1463
  this.skipSeparationSpace(true, nodeIndent);
1548
1464
  ch = this.peek();
1549
- if ((isExplicitPair || this.line === line) && ch === COLON) {
1465
+ if ((isExplicitPair || this.line === line) && ch === 58) {
1550
1466
  isPair = true;
1551
1467
  ch = this.next();
1552
1468
  this.skipSeparationSpace(true, nodeIndent);
@@ -1563,7 +1479,7 @@ var LoaderState = class {
1563
1479
  else result.push(keyNode);
1564
1480
  this.skipSeparationSpace(true, nodeIndent);
1565
1481
  ch = this.peek();
1566
- if (ch === COMMA) {
1482
+ if (ch === 44) {
1567
1483
  readNext = true;
1568
1484
  ch = this.next();
1569
1485
  } else readNext = false;
@@ -1579,15 +1495,15 @@ var LoaderState = class {
1579
1495
  let atMoreIndented = false;
1580
1496
  let ch = this.peek();
1581
1497
  let folding = false;
1582
- if (ch === VERTICAL_LINE) folding = false;
1583
- else if (ch === GREATER_THAN) folding = true;
1498
+ if (ch === 124) folding = false;
1499
+ else if (ch === 62) folding = true;
1584
1500
  else return false;
1585
1501
  this.kind = "scalar";
1586
1502
  this.result = "";
1587
1503
  let tmp = 0;
1588
1504
  while (ch !== 0) {
1589
1505
  ch = this.next();
1590
- if (ch === PLUS || ch === MINUS) if (CHOMPING_CLIP === chomping) chomping = ch === PLUS ? CHOMPING_KEEP : CHOMPING_STRIP;
1506
+ if (ch === 43 || ch === 45) if (CHOMPING_CLIP === chomping) chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP;
1591
1507
  else throw this.#createError("Cannot read block: chomping mode identifier repeated");
1592
1508
  else if ((tmp = decimalCharCodeToNumber(ch)) >= 0) if (tmp === 0) throw this.#createError("Cannot read block: indentation width must be greater than 0");
1593
1509
  else if (!detectedIndent) {
@@ -1605,7 +1521,7 @@ var LoaderState = class {
1605
1521
  this.readLineBreak();
1606
1522
  this.lineIndent = 0;
1607
1523
  ch = this.peek();
1608
- while ((!detectedIndent || this.lineIndent < textIndent) && ch === SPACE) {
1524
+ while ((!detectedIndent || this.lineIndent < textIndent) && ch === 32) {
1609
1525
  this.lineIndent++;
1610
1526
  ch = this.next();
1611
1527
  }
@@ -1659,8 +1575,8 @@ var LoaderState = class {
1659
1575
  const following = this.peek(1);
1660
1576
  line = this.line;
1661
1577
  pos = this.position;
1662
- if ((ch === QUESTION || ch === COLON) && isWhiteSpaceOrEOL(following)) {
1663
- if (ch === QUESTION) {
1578
+ if ((ch === 63 || ch === 58) && isWhiteSpaceOrEOL(following)) {
1579
+ if (ch === 63) {
1664
1580
  if (atExplicitKey) {
1665
1581
  this.storeMappingPair(result, overridableKeys, keyTag, keyNode, null);
1666
1582
  keyTag = null;
@@ -1685,7 +1601,7 @@ var LoaderState = class {
1685
1601
  ch = this.peek();
1686
1602
  this.skipWhitespaces();
1687
1603
  ch = this.peek();
1688
- if (ch === COLON) {
1604
+ if (ch === 58) {
1689
1605
  ch = this.next();
1690
1606
  if (!isWhiteSpaceOrEOL(ch)) throw this.#createError("Cannot read block: a whitespace character is expected after the key-value separator within a block mapping");
1691
1607
  if (atExplicitKey) {
@@ -1745,13 +1661,13 @@ var LoaderState = class {
1745
1661
  let tagHandle = "";
1746
1662
  let tagName;
1747
1663
  let ch = this.peek();
1748
- if (ch !== EXCLAMATION) return false;
1664
+ if (ch !== 33) return false;
1749
1665
  if (this.tag !== null) throw this.#createError("Cannot read tag property: duplication of a tag property");
1750
1666
  ch = this.next();
1751
- if (ch === SMALLER_THAN) {
1667
+ if (ch === 60) {
1752
1668
  isVerbatim = true;
1753
1669
  ch = this.next();
1754
- } else if (ch === EXCLAMATION) {
1670
+ } else if (ch === 33) {
1755
1671
  isNamed = true;
1756
1672
  tagHandle = "!!";
1757
1673
  ch = this.next();
@@ -1760,14 +1676,14 @@ var LoaderState = class {
1760
1676
  if (isVerbatim) {
1761
1677
  do
1762
1678
  ch = this.next();
1763
- while (ch !== 0 && ch !== GREATER_THAN);
1679
+ while (ch !== 0 && ch !== 62);
1764
1680
  if (this.position < this.length) {
1765
1681
  tagName = this.input.slice(position, this.position);
1766
1682
  ch = this.next();
1767
1683
  } else throw this.#createError("Cannot read tag property: unexpected end of stream");
1768
1684
  } else {
1769
1685
  while (ch !== 0 && !isWhiteSpaceOrEOL(ch)) {
1770
- if (ch === EXCLAMATION) if (!isNamed) {
1686
+ if (ch === 33) if (!isNamed) {
1771
1687
  tagHandle = this.input.slice(position - 1, this.position + 1);
1772
1688
  if (!PATTERN_TAG_HANDLE.test(tagHandle)) throw this.#createError("Cannot read tag property: named tag handle contains invalid characters");
1773
1689
  isNamed = true;
@@ -1788,7 +1704,7 @@ var LoaderState = class {
1788
1704
  }
1789
1705
  readAnchorProperty() {
1790
1706
  let ch = this.peek();
1791
- if (ch !== AMPERSAND) return false;
1707
+ if (ch !== 38) return false;
1792
1708
  if (this.anchor !== null) throw this.#createError("Cannot read anchor property: duplicate anchor property");
1793
1709
  ch = this.next();
1794
1710
  const position = this.position;
@@ -1798,7 +1714,7 @@ var LoaderState = class {
1798
1714
  return true;
1799
1715
  }
1800
1716
  readAlias() {
1801
- if (this.peek() !== ASTERISK) return false;
1717
+ if (this.peek() !== 42) return false;
1802
1718
  let ch = this.next();
1803
1719
  const position = this.position;
1804
1720
  while (ch !== 0 && !isWhiteSpaceOrEOL(ch) && !isFlowIndicator(ch)) ch = this.next();
@@ -1838,8 +1754,7 @@ var LoaderState = class {
1838
1754
  } else allowBlockCollections = false;
1839
1755
  if (allowBlockCollections) allowBlockCollections = atNewLine || allowCompact;
1840
1756
  if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
1841
- const cond = CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext;
1842
- const flowIndent = cond ? parentIndent : parentIndent + 1;
1757
+ const flowIndent = CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext ? parentIndent : parentIndent + 1;
1843
1758
  const blockIndent = this.position - this.lineStart;
1844
1759
  if (indentStatus === 1) if (allowBlockCollections && (this.readBlockSequence(blockIndent) || this.readBlockMapping(blockIndent, flowIndent)) || this.readFlowCollection(flowIndent)) hasContent = true;
1845
1760
  else {
@@ -1865,8 +1780,7 @@ var LoaderState = class {
1865
1780
  }
1866
1781
  }
1867
1782
  else if (this.typeMap[this.kind ?? "fallback"].has(this.tag)) {
1868
- const map$1 = this.typeMap[this.kind ?? "fallback"];
1869
- type = map$1.get(this.tag);
1783
+ type = this.typeMap[this.kind ?? "fallback"].get(this.tag);
1870
1784
  if (this.result !== null && type.kind !== this.kind) throw this.#createError(`Unacceptable node kind for !<${this.tag}> tag: it should be "${type.kind}", not "${this.kind}"`);
1871
1785
  if (!type.resolve(this.result)) throw this.#createError(`Cannot resolve a node with !<${this.tag}> explicit tag`);
1872
1786
  else {
@@ -1887,7 +1801,7 @@ var LoaderState = class {
1887
1801
  while (ch !== 0) {
1888
1802
  this.skipSeparationSpace(true, -1);
1889
1803
  ch = this.peek();
1890
- if (this.lineIndent > 0 || ch !== PERCENT) break;
1804
+ if (this.lineIndent > 0 || ch !== 37) break;
1891
1805
  hasDirectives = true;
1892
1806
  ch = this.next();
1893
1807
  let position = this.position;
@@ -1919,7 +1833,7 @@ var LoaderState = class {
1919
1833
  ch = this.peek();
1920
1834
  }
1921
1835
  this.skipSeparationSpace(true, -1);
1922
- if (this.lineIndent === 0 && this.peek() === MINUS && this.peek(1) === MINUS && this.peek(2) === MINUS) {
1836
+ if (this.lineIndent === 0 && this.peek() === 45 && this.peek(1) === 45 && this.peek(2) === 45) {
1923
1837
  this.position += 3;
1924
1838
  this.skipSeparationSpace(true, -1);
1925
1839
  } else if (hasDirectives) throw this.#createError("Cannot read document: directives end mark is expected");
@@ -1932,7 +1846,7 @@ var LoaderState = class {
1932
1846
  this.skipSeparationSpace(true, -1);
1933
1847
  if (this.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(this.input.slice(documentStart, this.position))) this.dispatchWarning("non-ASCII line breaks are interpreted as content");
1934
1848
  if (this.position === this.lineStart && this.testDocumentSeparator()) {
1935
- if (this.peek() === DOT) {
1849
+ if (this.peek() === 46) {
1936
1850
  this.position += 3;
1937
1851
  this.skipSeparationSpace(true, -1);
1938
1852
  }
@@ -1943,7 +1857,6 @@ var LoaderState = class {
1943
1857
  while (this.position < this.length - 1) yield this.readDocument();
1944
1858
  }
1945
1859
  };
1946
-
1947
1860
  //#endregion
1948
1861
  //#region ../../node_modules/.pnpm/@jsr+std__yaml@1.0.8/node_modules/@jsr/std__yaml/parse.js
1949
1862
  function sanitizeInput(input) {
@@ -1979,16 +1892,14 @@ function sanitizeInput(input) {
1979
1892
  * @returns Parsed document.
1980
1893
  */ function parse(content, options = {}) {
1981
1894
  content = sanitizeInput(content);
1982
- const state = new LoaderState(content, {
1895
+ const documentGenerator = new LoaderState(content, {
1983
1896
  ...options,
1984
1897
  schema: SCHEMA_MAP.get(options.schema)
1985
- });
1986
- const documentGenerator = state.readDocuments();
1898
+ }).readDocuments();
1987
1899
  const document = documentGenerator.next().value;
1988
1900
  if (!documentGenerator.next().done) throw new SyntaxError("Found more than 1 document in the stream: expected a single document");
1989
1901
  return document ?? null;
1990
1902
  }
1991
-
1992
1903
  //#endregion
1993
1904
  //#region src/codegen/fs.ts
1994
1905
  /**
@@ -2003,7 +1914,6 @@ async function* readDirRecursive(dir) {
2003
1914
  for await (const subentry of readDirRecursive(path)) yield join(entry.name, subentry);
2004
1915
  } else yield entry.name;
2005
1916
  }
2006
-
2007
1917
  //#endregion
2008
1918
  //#region src/codegen/schema.ts
2009
1919
  /**
@@ -2025,20 +1935,15 @@ var SchemaError = class extends Error {
2025
1935
  }
2026
1936
  };
2027
1937
  async function loadSchemaValidator() {
2028
- const thisFile = new URL(import.meta.url);
2029
- const schemaFile = join$2(dirname$1(thisFile), "schema.yaml");
1938
+ const schemaFile = join$1(dirname(new URL(import.meta.url)), "schema.yaml");
2030
1939
  let content;
2031
- if (schemaFile.protocol !== "file:") {
2032
- const response = await fetch(schemaFile);
2033
- content = await response.text();
2034
- } else content = await readFile(fromFileUrl(schemaFile), { encoding: "utf-8" });
2035
- const schemaObject = parse(content);
2036
- return new Validator(schemaObject);
1940
+ if (schemaFile.protocol !== "file:") content = await (await fetch(schemaFile)).text();
1941
+ else content = await readFile(fromFileUrl(schemaFile), { encoding: "utf-8" });
1942
+ return new Validator(parse(content));
2037
1943
  }
2038
1944
  let schemaValidator = void 0;
2039
1945
  async function loadSchema(path) {
2040
- const content = await readFile(path, { encoding: "utf-8" });
2041
- const schema = parse(content);
1946
+ const schema = parse(await readFile(path, { encoding: "utf-8" }));
2042
1947
  if (schemaValidator == null) schemaValidator = await loadSchemaValidator();
2043
1948
  const result = schemaValidator.validate(schema);
2044
1949
  const errors = [];
@@ -2078,7 +1983,6 @@ async function loadSchemaFiles(dir) {
2078
1983
  entries.sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
2079
1984
  return Object.fromEntries(entries);
2080
1985
  }
2081
-
2082
1986
  //#endregion
2083
1987
  //#region src/codegen/type.ts
2084
1988
  const scalarTypes = {
@@ -2472,15 +2376,14 @@ const scalarTypes = {
2472
2376
  }
2473
2377
  }
2474
2378
  };
2475
- function isScalarType(typeUri, types$1) {
2379
+ function isScalarType(typeUri, types) {
2476
2380
  if (typeUri in scalarTypes) return true;
2477
- else if (typeUri in types$1) return !types$1[typeUri].entity;
2381
+ else if (typeUri in types) return !types[typeUri].entity;
2478
2382
  throw new Error(`Unknown type: ${typeUri}`);
2479
2383
  }
2480
- function areAllScalarTypes(typeUris, types$1) {
2481
- return typeUris.every((typeUri) => isScalarType(typeUri, types$1));
2384
+ function areAllScalarTypes(typeUris, types) {
2385
+ return typeUris.every((typeUri) => isScalarType(typeUri, types));
2482
2386
  }
2483
-
2484
2387
  //#endregion
2485
2388
  //#region src/vocab/vocab.test.ts
2486
2389
  test("new Object()", () => {
@@ -2574,8 +2477,7 @@ test("Object.fromJsonLd()", async () => {
2574
2477
  const note = await create.getObject();
2575
2478
  assertInstanceOf(note, Note);
2576
2479
  assertEquals(note.content, "Content");
2577
- const empty = await Object$1.fromJsonLd({});
2578
- assertInstanceOf(empty, Object$1);
2480
+ assertInstanceOf(await Object$1.fromJsonLd({}), Object$1);
2579
2481
  await assertRejects(() => Object$1.fromJsonLd(null), TypeError, "Invalid JSON-LD: null.");
2580
2482
  await assertRejects(() => Object$1.fromJsonLd(void 0), TypeError, "Invalid JSON-LD: undefined.");
2581
2483
  });
@@ -2720,8 +2622,7 @@ test({
2720
2622
  assertInstanceOf(object, Object$1);
2721
2623
  assertEquals(object.id, new URL("https://example.com/object"));
2722
2624
  assertEquals(object.name, "Fetched object");
2723
- const jsonLd = await activity.toJsonLd();
2724
- assertEquals(jsonLd, {
2625
+ assertEquals(await activity.toJsonLd(), {
2725
2626
  "@context": [
2726
2627
  "https://w3id.org/identity/v1",
2727
2628
  "https://www.w3.org/ns/activitystreams",
@@ -2739,9 +2640,8 @@ test({
2739
2640
  }
2740
2641
  }
2741
2642
  });
2742
- const activity2 = new Activity({ object: new URL("https://example.com/not-found") });
2743
- assertEquals(await activity2.getObject({ suppressError: true }), null);
2744
- const activity3 = await Activity.fromJsonLd({
2643
+ assertEquals(await new Activity({ object: new URL("https://example.com/not-found") }).getObject({ suppressError: true }), null);
2644
+ const object3 = await (await Activity.fromJsonLd({
2745
2645
  "@context": "https://www.w3.org/ns/activitystreams",
2746
2646
  type: "Create",
2747
2647
  object: {
@@ -2749,8 +2649,7 @@ test({
2749
2649
  type: "Note",
2750
2650
  content: "Hello world"
2751
2651
  }
2752
- });
2753
- const object3 = await activity3.getObject();
2652
+ })).getObject();
2754
2653
  assertInstanceOf(object3, Note);
2755
2654
  assertEquals(await object3.toJsonLd(), {
2756
2655
  "@context": "https://www.w3.org/ns/activitystreams",
@@ -2809,8 +2708,7 @@ test("Activity.clone()", async () => {
2809
2708
  }), TypeError, "Cannot update both summary and summaries at the same time.");
2810
2709
  });
2811
2710
  test("Question.voters", async () => {
2812
- const question = new Question({ voters: 123 });
2813
- const json = await question.toJsonLd({ format: "compact" });
2711
+ const json = await new Question({ voters: 123 }).toJsonLd({ format: "compact" });
2814
2712
  assert(typeof json === "object" && json != null);
2815
2713
  assert("votersCount" in json);
2816
2714
  assertEquals(json["votersCount"], 123);
@@ -2850,19 +2748,17 @@ test("Person.fromJsonLd()", async () => {
2850
2748
  const publicKey = await person.getPublicKey({ documentLoader: mockDocumentLoader });
2851
2749
  assertInstanceOf(publicKey, CryptographicKey);
2852
2750
  assertEquals(publicKey?.ownerId, new URL("https://todon.eu/users/hongminhee"));
2853
- const person2 = await Person.fromJsonLd({
2751
+ assertEquals((await Person.fromJsonLd({
2854
2752
  "@context": ["https://www.w3.org/ns/activitystreams", { alsoKnownAs: {
2855
2753
  "@id": "as:alsoKnownAs",
2856
2754
  "@type": "@id"
2857
2755
  } }],
2858
2756
  "type": "Person",
2859
2757
  "alsoKnownAs": "at://did:plc:x7xdowahlhm5xulzqw4ehv6q"
2860
- });
2861
- assertEquals(person2.aliasId, new URL("at://did%3Aplc%3Ax7xdowahlhm5xulzqw4ehv6q"));
2758
+ })).aliasId, new URL("at://did%3Aplc%3Ax7xdowahlhm5xulzqw4ehv6q"));
2862
2759
  });
2863
2760
  test("Person.toJsonLd()", async () => {
2864
- const person = new Person({ aliases: [new URL("https://example.com/alias")] });
2865
- assertEquals(await person.toJsonLd(), {
2761
+ assertEquals(await new Person({ aliases: [new URL("https://example.com/alias")] }).toJsonLd(), {
2866
2762
  "@context": [
2867
2763
  "https://www.w3.org/ns/activitystreams",
2868
2764
  "https://w3id.org/security/v1",
@@ -2957,14 +2853,11 @@ test("Note.quoteUrl", async () => {
2957
2853
  _misskey_quote: "https://example.com/object2",
2958
2854
  quoteUri: "https://example.com/object3"
2959
2855
  };
2960
- const loaded = await Note.fromJsonLd(jsonLd);
2961
- assertEquals(loaded.quoteUrl, new URL("https://example.com/object"));
2856
+ assertEquals((await Note.fromJsonLd(jsonLd)).quoteUrl, new URL("https://example.com/object"));
2962
2857
  delete jsonLd.quoteUrl;
2963
- const loaded2 = await Note.fromJsonLd(jsonLd);
2964
- assertEquals(loaded2.quoteUrl, new URL("https://example.com/object2"));
2858
+ assertEquals((await Note.fromJsonLd(jsonLd)).quoteUrl, new URL("https://example.com/object2"));
2965
2859
  delete jsonLd._misskey_quote;
2966
- const loaded3 = await Note.fromJsonLd(jsonLd);
2967
- assertEquals(loaded3.quoteUrl, new URL("https://example.com/object3"));
2860
+ assertEquals((await Note.fromJsonLd(jsonLd)).quoteUrl, new URL("https://example.com/object3"));
2968
2861
  });
2969
2862
  test("Key.publicKey", async () => {
2970
2863
  const jwk = {
@@ -2975,11 +2868,10 @@ test("Key.publicKey", async () => {
2975
2868
  key_ops: ["verify"],
2976
2869
  ext: true
2977
2870
  };
2978
- const key = new CryptographicKey({ publicKey: await crypto.subtle.importKey("jwk", jwk, {
2871
+ const jsonLd = await new CryptographicKey({ publicKey: await crypto.subtle.importKey("jwk", jwk, {
2979
2872
  name: "RSASSA-PKCS1-v1_5",
2980
2873
  hash: "SHA-256"
2981
- }, true, ["verify"]) });
2982
- const jsonLd = await key.toJsonLd({ contextLoader: mockDocumentLoader });
2874
+ }, true, ["verify"]) }).toJsonLd({ contextLoader: mockDocumentLoader });
2983
2875
  assertEquals(jsonLd, {
2984
2876
  "@context": "https://w3id.org/security/v1",
2985
2877
  publicKeyPem: "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxsRuvCkgJtflBTl4OVsm\nnt/J1mQfZasfJtN33dcZ3d1lJroxmgmMu69zjGEAwkNbMQaWNLqC4eogkJaeJ4RR\n5MHYXkL9nNilVoTkjX5BVit3puzs7XJ7WQnKQgQMI+ezn24GHsZ/v1JIo77lerX5\nk4HNwTNVt+yaZVQWaOMR3+6FwziQR6kd0VuG9/a9dgAnz2cEoORRC1i4W7IZaB1s\nZnh1WbHbevlGd72HSXll5rocPIHn8gq6xpBgpHwRphlRsgn4KHaJ6brXDIJjrnQh\nIe/YUBOGj/ImSEXhRwlFerKsoAVnZ0Hwbfa46qk44TAt8CyoPMWmpK6pt0ng4pQ2\nuwIDAQAB\n-----END PUBLIC KEY-----\n",
@@ -3036,8 +2928,7 @@ test("Place.fromJsonLd()", async () => {
3036
2928
  });
3037
2929
  });
3038
2930
  test("Actor.getOutbox()", async () => {
3039
- const person = new Person({ outbox: new URL("https://example.com/orderedcollectionpage") });
3040
- const outbox = await person.getOutbox({ documentLoader: mockDocumentLoader });
2931
+ const outbox = await new Person({ outbox: new URL("https://example.com/orderedcollectionpage") }).getOutbox({ documentLoader: mockDocumentLoader });
3041
2932
  assertInstanceOf(outbox, OrderedCollectionPage);
3042
2933
  assertEquals(outbox.totalItems, 1);
3043
2934
  });
@@ -3050,21 +2941,19 @@ test("Link.fromJsonLd()", async () => {
3050
2941
  });
3051
2942
  assertEquals(link.rel, "canonical");
3052
2943
  assertEquals(link.href, new URL("at://did%3Aplc%3Aia76kvnndjutgedggx2ibrem/app.bsky.feed.post/3lyxjjs27jkqg"));
3053
- const link2 = await Link.fromJsonLd({
2944
+ assertEquals((await Link.fromJsonLd({
3054
2945
  "@context": "https://www.w3.org/ns/activitystreams",
3055
2946
  "type": "Link",
3056
2947
  "href": "at://bnewbold.bsky.team/app.bsky.feed.post/3jwdwj2ctlk26"
3057
- });
3058
- assertEquals(link2.href, new URL("at://bnewbold.bsky.team/app.bsky.feed.post/3jwdwj2ctlk26"));
3059
- const link3 = await Link.fromJsonLd({
2948
+ })).href, new URL("at://bnewbold.bsky.team/app.bsky.feed.post/3jwdwj2ctlk26"));
2949
+ assertEquals((await Link.fromJsonLd({
3060
2950
  "@context": "https://www.w3.org/ns/activitystreams",
3061
2951
  "type": "Link",
3062
2952
  "href": "at://did:plc:ia76kvnndjutgedggx2ibrem"
3063
- });
3064
- assertEquals(link3.href, new URL("at://did%3Aplc%3Aia76kvnndjutgedggx2ibrem"));
2953
+ })).href, new URL("at://did%3Aplc%3Aia76kvnndjutgedggx2ibrem"));
3065
2954
  });
3066
2955
  test("Person.fromJsonLd() with relative URLs", async () => {
3067
- const json = {
2956
+ assertEquals((await (await Person.fromJsonLd({
3068
2957
  "@context": ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1"],
3069
2958
  id: "https://example.com/ap/actors/019382d3-63d7-7cf7-86e8-91e2551c306c",
3070
2959
  type: "Person",
@@ -3073,14 +2962,11 @@ test("Person.fromJsonLd() with relative URLs", async () => {
3073
2962
  type: "Image",
3074
2963
  url: "/avatars/test-avatar.jpg"
3075
2964
  }
3076
- };
3077
- const person = await Person.fromJsonLd(json, {
2965
+ }, {
3078
2966
  documentLoader: mockDocumentLoader,
3079
2967
  contextLoader: mockDocumentLoader
3080
- });
3081
- const icon = await person.getIcon();
3082
- assertEquals(icon?.url, new URL("https://example.com/avatars/test-avatar.jpg"));
3083
- const json2 = {
2968
+ })).getIcon())?.url, new URL("https://example.com/avatars/test-avatar.jpg"));
2969
+ assertEquals((await (await Person.fromJsonLd({
3084
2970
  "@context": ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1"],
3085
2971
  id: "https://example.com/ap/actors/019382d3-63d7-7cf7-86e8-91e2551c306c",
3086
2972
  type: "Person",
@@ -3090,16 +2976,13 @@ test("Person.fromJsonLd() with relative URLs", async () => {
3090
2976
  type: "Image",
3091
2977
  url: "/avatars/test-avatar.jpg"
3092
2978
  }
3093
- };
3094
- const person2 = await Person.fromJsonLd(json2, {
2979
+ }, {
3095
2980
  documentLoader: mockDocumentLoader,
3096
2981
  contextLoader: mockDocumentLoader
3097
- });
3098
- const icon2 = await person2.getIcon();
3099
- assertEquals(icon2?.url, new URL("https://media.example.com/avatars/test-avatar.jpg"));
2982
+ })).getIcon())?.url, new URL("https://media.example.com/avatars/test-avatar.jpg"));
3100
2983
  });
3101
2984
  test("Person.fromJsonLd() with relative URLs and baseUrl", async () => {
3102
- const json = {
2985
+ assertEquals((await (await Person.fromJsonLd({
3103
2986
  "@context": ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1"],
3104
2987
  "id": "https://example.com/ap/actors/019382d3-63d7-7cf7-86e8-91e2551c306c",
3105
2988
  "type": "Person",
@@ -3108,14 +2991,11 @@ test("Person.fromJsonLd() with relative URLs and baseUrl", async () => {
3108
2991
  "type": "Image",
3109
2992
  "url": "/avatars/test-avatar.jpg"
3110
2993
  }
3111
- };
3112
- const personWithBase = await Person.fromJsonLd(json, {
2994
+ }, {
3113
2995
  documentLoader: mockDocumentLoader,
3114
2996
  contextLoader: mockDocumentLoader,
3115
2997
  baseUrl: new URL("https://example.com")
3116
- });
3117
- const icon = await personWithBase.getIcon();
3118
- assertEquals(icon?.url, new URL("https://example.com/avatars/test-avatar.jpg"));
2998
+ })).getIcon())?.url, new URL("https://example.com/avatars/test-avatar.jpg"));
3119
2999
  });
3120
3000
  test("FEP-fe34: Trust tracking in object construction", async () => {
3121
3001
  const note = new Note({
@@ -3146,8 +3026,7 @@ test("FEP-fe34: Trust tracking in object cloning", () => {
3146
3026
  id: new URL("https://example.com/new-note"),
3147
3027
  content: "New content"
3148
3028
  });
3149
- const clonedCreate = create.clone({ object: newNote });
3150
- assertEquals(clonedCreate.objectId, new URL("https://example.com/new-note"));
3029
+ assertEquals(create.clone({ object: newNote }).objectId, new URL("https://example.com/new-note"));
3151
3030
  });
3152
3031
  test("FEP-fe34: crossOrigin ignore behavior (default)", async () => {
3153
3032
  const crossOriginDocumentLoader = async (url) => {
@@ -3163,13 +3042,11 @@ test("FEP-fe34: crossOrigin ignore behavior (default)", async () => {
3163
3042
  };
3164
3043
  throw new Error("Document not found");
3165
3044
  };
3166
- const create = new Create({
3045
+ assertEquals(await new Create({
3167
3046
  id: new URL("https://example.com/create"),
3168
3047
  actor: new URL("https://example.com/actor"),
3169
3048
  object: new URL("https://different-origin.com/note")
3170
- });
3171
- const result = await create.getObject({ documentLoader: crossOriginDocumentLoader });
3172
- assertEquals(result, null);
3049
+ }).getObject({ documentLoader: crossOriginDocumentLoader }), null);
3173
3050
  });
3174
3051
  test("FEP-fe34: crossOrigin throw behavior", async () => {
3175
3052
  const crossOriginDocumentLoader = async (url) => {
@@ -3209,12 +3086,11 @@ test("FEP-fe34: crossOrigin trust behavior", async () => {
3209
3086
  };
3210
3087
  throw new Error("Document not found");
3211
3088
  };
3212
- const create = new Create({
3089
+ const result = await new Create({
3213
3090
  id: new URL("https://example.com/create"),
3214
3091
  actor: new URL("https://example.com/actor"),
3215
3092
  object: new URL("https://different-origin.com/note")
3216
- });
3217
- const result = await create.getObject({
3093
+ }).getObject({
3218
3094
  documentLoader: crossOriginDocumentLoader,
3219
3095
  crossOrigin: "trust"
3220
3096
  });
@@ -3236,12 +3112,11 @@ test("FEP-fe34: Same origin objects are trusted", async () => {
3236
3112
  };
3237
3113
  throw new Error("Document not found");
3238
3114
  };
3239
- const create = new Create({
3115
+ const result = await new Create({
3240
3116
  id: new URL("https://example.com/create"),
3241
3117
  actor: new URL("https://example.com/actor"),
3242
3118
  object: new URL("https://example.com/note")
3243
- });
3244
- const result = await create.getObject({ documentLoader: sameOriginDocumentLoader });
3119
+ }).getObject({ documentLoader: sameOriginDocumentLoader });
3245
3120
  assertInstanceOf(result, Note);
3246
3121
  assertEquals(result?.id, new URL("https://example.com/note"));
3247
3122
  assertEquals(result?.content, "This is a legitimate note");
@@ -3284,16 +3159,14 @@ test("FEP-fe34: Embedded cross-origin objects from JSON-LD are ignored by defaul
3284
3159
  assertEquals(result?.content, "Legitimate note from origin");
3285
3160
  });
3286
3161
  test("FEP-fe34: Constructor vs JSON-LD parsing trust difference", async () => {
3287
- const constructorCreate = new Create({
3162
+ assertEquals((await new Create({
3288
3163
  id: new URL("https://example.com/create"),
3289
3164
  actor: new URL("https://example.com/actor"),
3290
3165
  object: new Note({
3291
3166
  id: new URL("https://different-origin.com/note"),
3292
3167
  content: "Constructor embedded note"
3293
3168
  })
3294
- });
3295
- const constructorResult = await constructorCreate.getObject();
3296
- assertEquals(constructorResult?.content, "Constructor embedded note");
3169
+ }).getObject())?.content, "Constructor embedded note");
3297
3170
  const jsonLdCreate = await Create.fromJsonLd({
3298
3171
  "@context": "https://www.w3.org/ns/activitystreams",
3299
3172
  "@type": "Create",
@@ -3318,8 +3191,7 @@ test("FEP-fe34: Constructor vs JSON-LD parsing trust difference", async () => {
3318
3191
  };
3319
3192
  throw new Error("Document not found");
3320
3193
  };
3321
- const jsonLdResult = await jsonLdCreate.getObject({ documentLoader });
3322
- assertEquals(jsonLdResult?.content, "Fetched from origin");
3194
+ assertEquals((await jsonLdCreate.getObject({ documentLoader }))?.content, "Fetched from origin");
3323
3195
  });
3324
3196
  test("FEP-fe34: Array properties respect cross-origin policy", async () => {
3325
3197
  const crossOriginDocumentLoader = async (url) => {
@@ -3448,9 +3320,9 @@ test("FEP-fe34: Embedded objects in arrays from JSON-LD respect cross-origin pol
3448
3320
  assertInstanceOf(items[1], Note);
3449
3321
  assertEquals(items[1].content, "Legitimate note from actual origin");
3450
3322
  });
3451
- function getAllProperties(type, types$1) {
3323
+ function getAllProperties(type, types) {
3452
3324
  const props = type.properties;
3453
- if (type.extends != null) props.push(...getAllProperties(types$1[type.extends], types$1));
3325
+ if (type.extends != null) props.push(...getAllProperties(types[type.extends], types));
3454
3326
  return props;
3455
3327
  }
3456
3328
  const sampleValues = {
@@ -3539,8 +3411,7 @@ const sampleValues = {
3539
3411
  };
3540
3412
  const types = navigator?.userAgent === "Cloudflare-Workers" ? {} : await loadSchemaFiles(import.meta.dirname);
3541
3413
  for (const typeUri in types) {
3542
- const type = types[typeUri];
3543
- const cls = vocab_exports[type.name];
3414
+ const cls = vocab_exports[types[typeUri].name];
3544
3415
  sampleValues[typeUri] = new cls({
3545
3416
  "@id": "https://example.com/",
3546
3417
  "@type": typeUri
@@ -3568,17 +3439,17 @@ for (const typeUri in types) {
3568
3439
  }
3569
3440
  }
3570
3441
  const empty = new cls({});
3571
- for (const property$1 of allProperties) if (areAllScalarTypes(property$1.range, types)) {
3572
- if (property$1.functional || property$1.singularAccessor) assertEquals(empty[property$1.singularName], null);
3573
- if (!property$1.functional) assertEquals(empty[property$1.pluralName], []);
3442
+ for (const property of allProperties) if (areAllScalarTypes(property.range, types)) {
3443
+ if (property.functional || property.singularAccessor) assertEquals(empty[property.singularName], null);
3444
+ if (!property.functional) assertEquals(empty[property.pluralName], []);
3574
3445
  } else {
3575
- if (property$1.functional || property$1.singularAccessor) {
3576
- assertEquals(await empty[`get${pascalCase(property$1.singularName)}`].call(empty, { documentLoader: mockDocumentLoader }), null);
3577
- assertEquals(empty[`${property$1.singularName}Id`], null);
3446
+ if (property.functional || property.singularAccessor) {
3447
+ assertEquals(await empty[`get${pascalCase(property.singularName)}`].call(empty, { documentLoader: mockDocumentLoader }), null);
3448
+ assertEquals(empty[`${property.singularName}Id`], null);
3578
3449
  }
3579
- if (!property$1.functional) {
3580
- assertEquals(await Array.fromAsync(empty[`get${pascalCase(property$1.pluralName)}`].call(empty, { documentLoader: mockDocumentLoader })), []);
3581
- assertEquals(empty[`${property$1.singularName}Ids`], []);
3450
+ if (!property.functional) {
3451
+ assertEquals(await Array.fromAsync(empty[`get${pascalCase(property.pluralName)}`].call(empty, { documentLoader: mockDocumentLoader })), []);
3452
+ assertEquals(empty[`${property.singularName}Ids`], []);
3582
3453
  }
3583
3454
  }
3584
3455
  }
@@ -3629,8 +3500,7 @@ for (const typeUri in types) {
3629
3500
  };
3630
3501
  if (property.functional || property.singularAccessor) test(`${type.name}.get${pascalCase(property.singularName)}() [auto]`, async () => {
3631
3502
  const instance = new cls({ [property.singularName]: new URL("https://example.com/test") });
3632
- const value = await instance[`get${pascalCase(property.singularName)}`].call(instance, { documentLoader: docLoader });
3633
- assertEquals(value, sampleValues[property.range[0]]);
3503
+ assertEquals(await instance[`get${pascalCase(property.singularName)}`].call(instance, { documentLoader: docLoader }), sampleValues[property.range[0]]);
3634
3504
  if (property.untyped) return;
3635
3505
  const wrongRef = new cls({ [property.singularName]: new URL("https://example.com/wrong-type") });
3636
3506
  await assertRejects(() => wrongRef[`get${pascalCase(property.singularName)}`].call(wrongRef, { documentLoader: mockDocumentLoader }), TypeError);
@@ -3694,31 +3564,28 @@ for (const typeUri in types) {
3694
3564
  });
3695
3565
  assertEquals(jsonLd2["@context"], "https://www.w3.org/ns/activitystreams");
3696
3566
  assertEquals(jsonLd2.id, "https://example.com/");
3697
- const restored2 = await cls.fromJsonLd(jsonLd2, {
3567
+ assertEquals(await cls.fromJsonLd(jsonLd2, {
3698
3568
  documentLoader: mockDocumentLoader,
3699
3569
  contextLoader: mockDocumentLoader
3700
- });
3701
- assertEquals(restored2, instance);
3570
+ }), instance);
3702
3571
  const expanded = await instance.toJsonLd({
3703
3572
  contextLoader: mockDocumentLoader,
3704
3573
  format: "expand"
3705
3574
  });
3706
- const restored3 = await cls.fromJsonLd(expanded, {
3575
+ assertEquals(await cls.fromJsonLd(expanded, {
3707
3576
  documentLoader: mockDocumentLoader,
3708
3577
  contextLoader: mockDocumentLoader
3709
- });
3710
- assertEquals(restored3, instance);
3578
+ }), instance);
3711
3579
  const instance2 = new cls({
3712
3580
  id: new URL("https://example.com/"),
3713
3581
  ...initValues,
3714
3582
  ...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")]]))
3715
3583
  });
3716
3584
  const jsonLd3 = await instance2.toJsonLd({ contextLoader: mockDocumentLoader });
3717
- const restored4 = await cls.fromJsonLd(jsonLd3, {
3585
+ assertEquals(await cls.fromJsonLd(jsonLd3, {
3718
3586
  documentLoader: mockDocumentLoader,
3719
3587
  contextLoader: mockDocumentLoader
3720
- });
3721
- assertEquals(restored4, instance2);
3588
+ }), instance2);
3722
3589
  assertRejects(() => instance.toJsonLd({ context: "https://www.w3.org/ns/activitystreams" }), TypeError);
3723
3590
  assertRejects(() => instance.toJsonLd({
3724
3591
  format: "expand",
@@ -3748,5 +3615,5 @@ for (const typeUri in types) {
3748
3615
  assertEquals(cls.typeId, new URL(type.uri));
3749
3616
  });
3750
3617
  }
3751
-
3752
- //#endregion
3618
+ //#endregion
3619
+ export {};