@fedify/fedify 1.8.1-pr.328.1159 → 1.8.1-pr.331.1169

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 (102) hide show
  1. package/README.md +4 -1
  2. package/dist/{actor-LkF6aqGd.js → actor-CM9DhmYG.js} +179 -179
  3. package/dist/{actor-BI_2abz3.js → actor-CXiBUxzX.js} +1 -4
  4. package/dist/{assert_rejects-DceVjUlD.js → assert_rejects-AjlKk-Vo.js} +1 -1
  5. package/dist/{assert_throws-DTDC_gwN.js → assert_throws-CqMKbTh_.js} +1 -1
  6. package/dist/{authdocloader-Bn1wpyy1.js → authdocloader-CoK1cNSv.js} +3 -4
  7. package/dist/{authdocloader-DeF41lCp.js → authdocloader-CxTR6Cx7.js} +3 -3
  8. package/dist/{builder-ypgCZZ9b.js → builder-D5PVNw-f.js} +4 -5
  9. package/dist/{client-D_GpybaE.js → client-Deo5HWuU.js} +2 -2
  10. package/dist/compat/transformers.test.js +20 -27
  11. package/dist/{docloader-ZcdrjMf8.js → docloader-CoCVFIdd.js} +2 -1
  12. package/dist/{esm-d-9EVGaP.js → esm-EXQbXMPG.js} +1 -1
  13. package/dist/federation/builder.test.js +11 -16
  14. package/dist/federation/collection.test.js +9 -7
  15. package/dist/federation/handler.test.js +26 -35
  16. package/dist/federation/inbox.test.js +6 -10
  17. package/dist/federation/keycache.test.js +4 -7
  18. package/dist/federation/kv.test.js +8 -6
  19. package/dist/federation/middleware.test.js +27 -35
  20. package/dist/federation/mod.js +10 -10
  21. package/dist/federation/mq.test.js +10 -8
  22. package/dist/federation/retry.test.js +5 -3
  23. package/dist/federation/router.test.js +8 -7
  24. package/dist/federation/send.test.js +15 -21
  25. package/dist/{http-CzYP-q4a.js → http-BMGJhytW.js} +2 -3
  26. package/dist/{http-BzbQEWKu.js → http-C2JU_TBj.js} +3 -3
  27. package/dist/{inbox-C3u7wpp-.js → inbox-BPbz_ao6.js} +1 -3
  28. package/dist/{key-ctbEcqup.js → key-Cw4UVtxp.js} +2 -3
  29. package/dist/{key-DpPVsVBo.js → key-DN4BIKz_.js} +4 -4
  30. package/dist/key-IO1BOpia.js +10 -0
  31. package/dist/{key-DuMiqGNl.js → key-OtdoFkXm.js} +2 -2
  32. package/dist/{keycache-B4MVJOqX.js → keycache-VoOwxP0J.js} +1 -1
  33. package/dist/{keys-8BtWAvD6.js → keys-BLkL01oe.js} +1 -1
  34. package/dist/{ld-DpsRY9hw.js → ld-DzSYkEZt.js} +2 -4
  35. package/dist/{lookup-Cl-flyHw.js → lookup-C_W_03GR.js} +1 -1
  36. package/dist/{lookup-DrKu09YQ.js → lookup-DmCcT32H.js} +113 -6
  37. package/dist/middleware-BOpaJuMq.js +26 -0
  38. package/dist/{middleware-Bel3idhw.js → middleware-CpvSNOWP.js} +11 -11
  39. package/dist/{middleware-_FILA5XM.js → middleware-D5a8IwLT.js} +17 -21
  40. package/dist/middleware-DsTB1RZr.js +17 -0
  41. package/dist/mod.js +10 -10
  42. package/dist/nodeinfo/client.test.js +11 -11
  43. package/dist/nodeinfo/handler.test.js +25 -34
  44. package/dist/nodeinfo/mod.js +2 -2
  45. package/dist/nodeinfo/semver.test.js +9 -7
  46. package/dist/nodeinfo/types.test.js +10 -8
  47. package/dist/{owner-MQpfmrEp.js → owner-B7WC4XMm.js} +2 -3
  48. package/dist/{proof-BmJlaEuD.js → proof-DGvKD7fj.js} +3 -3
  49. package/dist/{proof-C3Gb_y9R.js → proof-DZgS1afh.js} +2 -4
  50. package/dist/runtime/authdocloader.test.js +14 -20
  51. package/dist/runtime/docloader.test.js +9 -10
  52. package/dist/runtime/key.test.js +10 -15
  53. package/dist/runtime/langstr.test.js +8 -7
  54. package/dist/runtime/mod.js +6 -6
  55. package/dist/runtime/multibase/multibase.test.js +8 -7
  56. package/dist/runtime/url.test.js +5 -4
  57. package/dist/{send-B95nXWtF.js → send-KqOpWmPm.js} +2 -2
  58. package/dist/sig/http.test.js +13 -19
  59. package/dist/sig/key.test.js +11 -17
  60. package/dist/sig/ld.test.js +10 -16
  61. package/dist/sig/mod.js +6 -6
  62. package/dist/sig/owner.test.js +12 -19
  63. package/dist/sig/proof.test.js +12 -18
  64. package/dist/testing/docloader.test.js +8 -7
  65. package/dist/testing/mod.d.ts +8387 -1
  66. package/dist/testing/mod.js +4 -2
  67. package/dist/testing-Ckz8sJMd.js +301 -0
  68. package/dist/{vocab-BczrO3jQ.js → type-C5cdRbDh.js} +5255 -183
  69. package/dist/{types-C7C_l-jz.js → types-n7HI7VFr.js} +1 -1
  70. package/dist/{types-BACpZoAu.js → types-zNofm6uK.js} +1 -1
  71. package/dist/vocab/actor.test.js +10 -16
  72. package/dist/vocab/lookup.test.js +9 -16
  73. package/dist/vocab/mod.js +4 -4
  74. package/dist/vocab/type.test.js +3 -7
  75. package/dist/vocab/vocab.test.js +9 -13
  76. package/dist/{vocab-BFQwOXsO.js → vocab-B-ZpQXwI.js} +3 -3
  77. package/dist/webfinger/handler.test.js +25 -34
  78. package/dist/webfinger/lookup.test.js +9 -10
  79. package/dist/webfinger/mod.js +2 -2
  80. package/dist/x/cfworkers.test.js +8 -6
  81. package/package.json +1 -1
  82. package/dist/chunk-HsBuZ-b2.js +0 -41
  83. package/dist/context-wTS6NVpw.js +0 -108
  84. package/dist/docloader-09nVWLAZ.js +0 -68
  85. package/dist/docloader-4n0wKCuD.js +0 -4526
  86. package/dist/key-BDYWJlpE.js +0 -16
  87. package/dist/langstr-DbWheeIS.js +0 -33
  88. package/dist/lookup-CIZBWILo.js +0 -132
  89. package/dist/middleware-BoSxCdkz.js +0 -17
  90. package/dist/middleware-Db3gnzbt.js +0 -33
  91. package/dist/multibase-DeCHcK8L.js +0 -316
  92. package/dist/router-D3UybECj.js +0 -118
  93. package/dist/testing-BZ0dJ4qn.js +0 -143
  94. package/dist/type-D2s5lmbZ.js +0 -14
  95. package/dist/url-kTAI6_KP.js +0 -68
  96. /package/dist/{assert_is_error-DQdKoRgb.js → assert_is_error-CeVBLPsZ.js} +0 -0
  97. /package/dist/{assert_not_equals-7pyUM3Ib.js → assert_not_equals-D2R2nl5h.js} +0 -0
  98. /package/dist/{collection-Dfb0TPno.js → collection-D5V3UzU3.js} +0 -0
  99. /package/dist/{denokv-QWKsIqML.js → denokv-DK9P5Jq7.js} +0 -0
  100. /package/dist/{retry-BiIhZWgD.js → retry-BnpVRGFC.js} +0 -0
  101. /package/dist/{semver-DWClQt_5.js → semver-DCqorrj5.js} +0 -0
  102. /package/dist/{std__assert-B3iAixc-.js → std__assert-BQdmxyzF.js} +0 -0
@@ -3,7 +3,7 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { formatSemVer } from "./semver-DWClQt_5.js";
6
+ import { formatSemVer } from "./semver-DCqorrj5.js";
7
7
 
8
8
  //#region nodeinfo/types.ts
9
9
  /**
@@ -2,7 +2,7 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import { getUserAgent } from "./docloader-ZcdrjMf8.js";
5
+ import { getUserAgent } from "./docloader-CoCVFIdd.js";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
 
8
8
  //#region nodeinfo/semver.ts
@@ -3,25 +3,19 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { __export } from "../chunk-HsBuZ-b2.js";
6
+ import { Application, Group, Organization, Person, Service, __export } from "../type-C5cdRbDh.js";
7
7
  import { assertEquals } from "../assert_equals-C5gKCm6A.js";
8
8
  import { assert } from "../assert-DwEa6glZ.js";
9
9
  import "../assert_instance_of-C9QtN-X9.js";
10
- import "../docloader-4n0wKCuD.js";
11
- import "../url-kTAI6_KP.js";
12
- import "../multibase-DeCHcK8L.js";
13
- import { Application, Group, Organization, Person, Service } from "../vocab-BczrO3jQ.js";
14
- import "../langstr-DbWheeIS.js";
15
- import "../lookup-CIZBWILo.js";
16
- import "../type-D2s5lmbZ.js";
17
- import { getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "../actor-BI_2abz3.js";
18
- import { test } from "../testing-BZ0dJ4qn.js";
19
- import { assertStrictEquals } from "../std__assert-B3iAixc-.js";
20
- import { assertFalse, assertRejects } from "../assert_rejects-DceVjUlD.js";
21
- import "../assert_is_error-DQdKoRgb.js";
22
- import "../assert_not_equals-7pyUM3Ib.js";
23
- import { assertThrows } from "../assert_throws-DTDC_gwN.js";
24
- import { esm_default } from "../esm-d-9EVGaP.js";
10
+ import "../lookup-DmCcT32H.js";
11
+ import { getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "../actor-CXiBUxzX.js";
12
+ import { test } from "../testing-Ckz8sJMd.js";
13
+ import { assertStrictEquals } from "../std__assert-BQdmxyzF.js";
14
+ import { assertFalse, assertRejects } from "../assert_rejects-AjlKk-Vo.js";
15
+ import "../assert_is_error-CeVBLPsZ.js";
16
+ import "../assert_not_equals-D2R2nl5h.js";
17
+ import { assertThrows } from "../assert_throws-CqMKbTh_.js";
18
+ import { esm_default } from "../esm-EXQbXMPG.js";
25
19
 
26
20
  //#region ../node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/precondition/PreconditionFailure.js
27
21
  var PreconditionFailure = class PreconditionFailure extends Error {
@@ -3,25 +3,18 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
+ import { Collection, Note, Object as Object$1, Person } from "../type-C5cdRbDh.js";
6
7
  import { assertEquals } from "../assert_equals-C5gKCm6A.js";
7
8
  import "../assert-DwEa6glZ.js";
8
9
  import { assertInstanceOf } from "../assert_instance_of-C9QtN-X9.js";
9
- import "../docloader-4n0wKCuD.js";
10
- import "../url-kTAI6_KP.js";
11
- import "../multibase-DeCHcK8L.js";
12
- import { Collection, Note, Object as Object$1, Person } from "../vocab-BczrO3jQ.js";
13
- import "../langstr-DbWheeIS.js";
14
- import "../lookup-CIZBWILo.js";
15
- import "../type-D2s5lmbZ.js";
16
- import { lookupObject, traverseCollection } from "../lookup-DrKu09YQ.js";
17
- import { test } from "../testing-BZ0dJ4qn.js";
18
- import "../std__assert-B3iAixc-.js";
19
- import "../assert_rejects-DceVjUlD.js";
20
- import "../assert_is_error-DQdKoRgb.js";
21
- import "../assert_not_equals-7pyUM3Ib.js";
22
- import "../assert_throws-DTDC_gwN.js";
23
- import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
24
- import { esm_default } from "../esm-d-9EVGaP.js";
10
+ import { lookupObject, traverseCollection } from "../lookup-DmCcT32H.js";
11
+ import { mockDocumentLoader, test } from "../testing-Ckz8sJMd.js";
12
+ import "../std__assert-BQdmxyzF.js";
13
+ import "../assert_rejects-AjlKk-Vo.js";
14
+ import "../assert_is_error-CeVBLPsZ.js";
15
+ import "../assert_not_equals-D2R2nl5h.js";
16
+ import "../assert_throws-CqMKbTh_.js";
17
+ import { esm_default } from "../esm-EXQbXMPG.js";
25
18
 
26
19
  //#region vocab/lookup.test.ts
27
20
  test("lookupObject()", async (t) => {
package/dist/vocab/mod.js CHANGED
@@ -2,9 +2,9 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import "../docloader-ZcdrjMf8.js";
6
- import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, normalizeActorHandle } from "../actor-LkF6aqGd.js";
7
- import "../lookup-Cl-flyHw.js";
8
- import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "../vocab-BFQwOXsO.js";
5
+ import "../docloader-CoCVFIdd.js";
6
+ import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, normalizeActorHandle } from "../actor-CM9DhmYG.js";
7
+ import "../lookup-C_W_03GR.js";
8
+ import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "../vocab-B-ZpQXwI.js";
9
9
 
10
10
  export { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object$1 as Object, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, isFediverseHandle, lookupObject, normalizeActorHandle, parseFediverseHandle, toAcctUrl, traverseCollection };
@@ -3,14 +3,10 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
+ import { Person, getTypeId } from "../type-C5cdRbDh.js";
6
7
  import { assertEquals } from "../assert_equals-C5gKCm6A.js";
7
- import "../docloader-4n0wKCuD.js";
8
- import "../url-kTAI6_KP.js";
9
- import "../multibase-DeCHcK8L.js";
10
- import { Person } from "../vocab-BczrO3jQ.js";
11
- import "../langstr-DbWheeIS.js";
12
- import { getTypeId } from "../type-D2s5lmbZ.js";
13
- import { test } from "../testing-BZ0dJ4qn.js";
8
+ import "../lookup-DmCcT32H.js";
9
+ import { test } from "../testing-Ckz8sJMd.js";
14
10
 
15
11
  //#region vocab/type.test.ts
16
12
  test("getTypeId()", () => {
@@ -3,22 +3,18 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
+ import { Activity, Announce, Create, CryptographicKey, Follow, Hashtag, LanguageString, Note, Object as Object$1, OrderedCollectionPage, Person, Place, Question, Source, decode, vocab_exports } from "../type-C5cdRbDh.js";
6
7
  import { assertEquals } from "../assert_equals-C5gKCm6A.js";
7
8
  import { assert } from "../assert-DwEa6glZ.js";
8
9
  import { assertInstanceOf } from "../assert_instance_of-C9QtN-X9.js";
9
- import "../docloader-4n0wKCuD.js";
10
- import "../url-kTAI6_KP.js";
11
- import { decode } from "../multibase-DeCHcK8L.js";
12
- import { Activity, Announce, Create, CryptographicKey, Follow, Hashtag, Note, Object as Object$1, OrderedCollectionPage, Person, Place, Question, Source, vocab_exports } from "../vocab-BczrO3jQ.js";
13
- import { LanguageString } from "../langstr-DbWheeIS.js";
14
- import { test } from "../testing-BZ0dJ4qn.js";
15
- import "../std__assert-B3iAixc-.js";
16
- import { assertFalse, assertRejects } from "../assert_rejects-DceVjUlD.js";
17
- import "../assert_is_error-DQdKoRgb.js";
18
- import { assertNotEquals } from "../assert_not_equals-7pyUM3Ib.js";
19
- import { assertThrows } from "../assert_throws-DTDC_gwN.js";
20
- import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
21
- import { ed25519PublicKey, rsaPublicKey1 } from "../keys-8BtWAvD6.js";
10
+ import "../lookup-DmCcT32H.js";
11
+ import { mockDocumentLoader, test } from "../testing-Ckz8sJMd.js";
12
+ import "../std__assert-BQdmxyzF.js";
13
+ import { assertFalse, assertRejects } from "../assert_rejects-AjlKk-Vo.js";
14
+ import "../assert_is_error-CeVBLPsZ.js";
15
+ import { assertNotEquals } from "../assert_not_equals-D2R2nl5h.js";
16
+ import { assertThrows } from "../assert_throws-CqMKbTh_.js";
17
+ import { ed25519PublicKey, rsaPublicKey1 } from "../keys-BLkL01oe.js";
22
18
  import { pascalCase } from "es-toolkit";
23
19
  import { parseLanguageTag } from "@phensley/language-tag";
24
20
  import { Validator } from "@cfworker/json-schema";
@@ -2,9 +2,9 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import { deno_default, getDocumentLoader } from "./docloader-ZcdrjMf8.js";
6
- import { Object as Object$1, getTypeId } from "./actor-LkF6aqGd.js";
7
- import { lookupWebFinger } from "./lookup-Cl-flyHw.js";
5
+ import { deno_default, getDocumentLoader } from "./docloader-CoCVFIdd.js";
6
+ import { Object as Object$1, getTypeId } from "./actor-CM9DhmYG.js";
7
+ import { lookupWebFinger } from "./lookup-C_W_03GR.js";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
  import { SpanStatusCode, trace } from "@opentelemetry/api";
10
10
  import { delay } from "es-toolkit";
@@ -3,44 +3,35 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
+ import { Image, Link, Person } from "../type-C5cdRbDh.js";
6
7
  import { assertEquals } from "../assert_equals-C5gKCm6A.js";
7
8
  import "../assert-DwEa6glZ.js";
8
9
  import "../assert_instance_of-C9QtN-X9.js";
9
10
  import { MemoryKvStore } from "../kv-D7Yt6pnB.js";
10
- import { createFederation, handleWebFinger } from "../middleware-_FILA5XM.js";
11
- import "../docloader-4n0wKCuD.js";
12
- import "../url-kTAI6_KP.js";
13
- import "../semver-DWClQt_5.js";
14
- import "../client-D_GpybaE.js";
15
- import "../router-D3UybECj.js";
16
- import "../types-C7C_l-jz.js";
17
- import "../multibase-DeCHcK8L.js";
18
- import { Image, Link, Person } from "../vocab-BczrO3jQ.js";
19
- import "../langstr-DbWheeIS.js";
20
- import "../lookup-CIZBWILo.js";
21
- import "../type-D2s5lmbZ.js";
22
- import "../actor-BI_2abz3.js";
23
- import "../key-ctbEcqup.js";
24
- import "../http-CzYP-q4a.js";
25
- import "../authdocloader-Bn1wpyy1.js";
26
- import "../ld-DpsRY9hw.js";
27
- import "../owner-MQpfmrEp.js";
28
- import "../proof-C3Gb_y9R.js";
29
- import "../lookup-DrKu09YQ.js";
30
- import "../inbox-C3u7wpp-.js";
31
- import "../builder-ypgCZZ9b.js";
32
- import "../collection-Dfb0TPno.js";
33
- import "../keycache-B4MVJOqX.js";
34
- import "../retry-BiIhZWgD.js";
35
- import "../send-B95nXWtF.js";
36
- import { test } from "../testing-BZ0dJ4qn.js";
37
- import "../std__assert-B3iAixc-.js";
38
- import "../assert_rejects-DceVjUlD.js";
39
- import "../assert_is_error-DQdKoRgb.js";
40
- import "../assert_not_equals-7pyUM3Ib.js";
41
- import "../assert_throws-DTDC_gwN.js";
42
- import "../docloader-09nVWLAZ.js";
43
- import { createRequestContext } from "../context-wTS6NVpw.js";
11
+ import { createFederation, handleWebFinger } from "../middleware-D5a8IwLT.js";
12
+ import "../semver-DCqorrj5.js";
13
+ import "../client-Deo5HWuU.js";
14
+ import "../lookup-DmCcT32H.js";
15
+ import "../types-n7HI7VFr.js";
16
+ import "../actor-CXiBUxzX.js";
17
+ import "../key-Cw4UVtxp.js";
18
+ import "../http-BMGJhytW.js";
19
+ import "../authdocloader-CoK1cNSv.js";
20
+ import "../ld-DzSYkEZt.js";
21
+ import "../owner-B7WC4XMm.js";
22
+ import "../proof-DZgS1afh.js";
23
+ import "../inbox-BPbz_ao6.js";
24
+ import "../builder-D5PVNw-f.js";
25
+ import "../collection-D5V3UzU3.js";
26
+ import "../keycache-VoOwxP0J.js";
27
+ import "../retry-BnpVRGFC.js";
28
+ import "../send-KqOpWmPm.js";
29
+ import { createRequestContext, test } from "../testing-Ckz8sJMd.js";
30
+ import "../std__assert-BQdmxyzF.js";
31
+ import "../assert_rejects-AjlKk-Vo.js";
32
+ import "../assert_is_error-CeVBLPsZ.js";
33
+ import "../assert_not_equals-D2R2nl5h.js";
34
+ import "../assert_throws-CqMKbTh_.js";
44
35
 
45
36
  //#region webfinger/handler.test.ts
46
37
  test("handleWebFinger()", async (t) => {
@@ -3,19 +3,18 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
+ import { lookupWebFinger } from "../type-C5cdRbDh.js";
6
7
  import { assertEquals } from "../assert_equals-C5gKCm6A.js";
7
8
  import "../assert-DwEa6glZ.js";
8
9
  import "../assert_instance_of-C9QtN-X9.js";
9
- import "../docloader-4n0wKCuD.js";
10
- import "../url-kTAI6_KP.js";
11
- import { lookupWebFinger } from "../lookup-CIZBWILo.js";
12
- import { test } from "../testing-BZ0dJ4qn.js";
13
- import "../std__assert-B3iAixc-.js";
14
- import "../assert_rejects-DceVjUlD.js";
15
- import "../assert_is_error-DQdKoRgb.js";
16
- import "../assert_not_equals-7pyUM3Ib.js";
17
- import "../assert_throws-DTDC_gwN.js";
18
- import { esm_default } from "../esm-d-9EVGaP.js";
10
+ import "../lookup-DmCcT32H.js";
11
+ import { test } from "../testing-Ckz8sJMd.js";
12
+ import "../std__assert-BQdmxyzF.js";
13
+ import "../assert_rejects-AjlKk-Vo.js";
14
+ import "../assert_is_error-CeVBLPsZ.js";
15
+ import "../assert_not_equals-D2R2nl5h.js";
16
+ import "../assert_throws-CqMKbTh_.js";
17
+ import { esm_default } from "../esm-EXQbXMPG.js";
19
18
  import { withTimeout } from "es-toolkit";
20
19
 
21
20
  //#region webfinger/lookup.test.ts
@@ -2,8 +2,8 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import "../docloader-ZcdrjMf8.js";
6
- import { lookupWebFinger } from "../lookup-Cl-flyHw.js";
5
+ import "../docloader-CoCVFIdd.js";
6
+ import { lookupWebFinger } from "../lookup-C_W_03GR.js";
7
7
  import "../webfinger-C3GIyXIg.js";
8
8
 
9
9
  export { lookupWebFinger };
@@ -3,15 +3,17 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
+ import "../type-C5cdRbDh.js";
6
7
  import { assertEquals } from "../assert_equals-C5gKCm6A.js";
7
8
  import "../assert-DwEa6glZ.js";
8
9
  import "../assert_instance_of-C9QtN-X9.js";
9
- import { test } from "../testing-BZ0dJ4qn.js";
10
- import "../std__assert-B3iAixc-.js";
11
- import "../assert_rejects-DceVjUlD.js";
12
- import "../assert_is_error-DQdKoRgb.js";
13
- import "../assert_not_equals-7pyUM3Ib.js";
14
- import "../assert_throws-DTDC_gwN.js";
10
+ import "../lookup-DmCcT32H.js";
11
+ import { test } from "../testing-Ckz8sJMd.js";
12
+ import "../std__assert-BQdmxyzF.js";
13
+ import "../assert_rejects-AjlKk-Vo.js";
14
+ import "../assert_is_error-CeVBLPsZ.js";
15
+ import "../assert_not_equals-D2R2nl5h.js";
16
+ import "../assert_throws-CqMKbTh_.js";
15
17
  import { delay } from "es-toolkit";
16
18
 
17
19
  //#region x/cfworkers.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/fedify",
3
- "version": "1.8.1-pr.328.1159+4d4b250e",
3
+ "version": "1.8.1-pr.331.1169+bbbf8ccc",
4
4
  "description": "An ActivityPub server framework",
5
5
  "keywords": [
6
6
  "ActivityPub",
@@ -1,41 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
- import { URLPattern } from "urlpattern-polyfill";
4
- globalThis.addEventListener = () => {};
5
-
6
- import { createRequire } from "node:module";
7
-
8
- //#region rolldown:runtime
9
- var __create = Object.create;
10
- var __defProp = Object.defineProperty;
11
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
- var __getOwnPropNames = Object.getOwnPropertyNames;
13
- var __getProtoOf = Object.getPrototypeOf;
14
- var __hasOwnProp = Object.prototype.hasOwnProperty;
15
- var __commonJS = (cb, mod) => function() {
16
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
17
- };
18
- var __export = (target, all) => {
19
- for (var name in all) __defProp(target, name, {
20
- get: all[name],
21
- enumerable: true
22
- });
23
- };
24
- var __copyProps = (to, from, except, desc) => {
25
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
26
- key = keys[i];
27
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
28
- get: ((k) => from[k]).bind(null, key),
29
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
30
- });
31
- }
32
- return to;
33
- };
34
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
35
- value: mod,
36
- enumerable: true
37
- }) : target, mod));
38
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
39
-
40
- //#endregion
41
- export { __commonJS, __export, __require, __toESM };
@@ -1,108 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
- import { URLPattern } from "urlpattern-polyfill";
4
- globalThis.addEventListener = () => {};
5
-
6
- import { RouterError } from "./router-D3UybECj.js";
7
- import { lookupWebFinger } from "./lookup-CIZBWILo.js";
8
- import { lookupObject, traverseCollection } from "./lookup-DrKu09YQ.js";
9
- import { mockDocumentLoader } from "./docloader-09nVWLAZ.js";
10
- import { trace } from "@opentelemetry/api";
11
-
12
- //#region testing/context.ts
13
- function createContext(values) {
14
- const { federation, url = new URL("http://example.com/"), canonicalOrigin, data, documentLoader, contextLoader, tracerProvider, clone, getNodeInfoUri, getActorUri, getObjectUri, getOutboxUri, getInboxUri, getFollowingUri, getFollowersUri, getLikedUri, getFeaturedUri, getFeaturedTagsUri, parseUri, getActorKeyPairs, getDocumentLoader, lookupObject: lookupObject$1, traverseCollection: traverseCollection$1, lookupNodeInfo, lookupWebFinger: lookupWebFinger$1, sendActivity, routeActivity } = values;
15
- function throwRouteError() {
16
- throw new RouterError("Not implemented");
17
- }
18
- return {
19
- federation,
20
- data,
21
- origin: url.origin,
22
- canonicalOrigin: canonicalOrigin ?? url.origin,
23
- host: url.host,
24
- hostname: url.hostname,
25
- documentLoader: documentLoader ?? mockDocumentLoader,
26
- contextLoader: contextLoader ?? mockDocumentLoader,
27
- tracerProvider: tracerProvider ?? trace.getTracerProvider(),
28
- clone: clone ?? ((data$1) => createContext({
29
- ...values,
30
- data: data$1
31
- })),
32
- getNodeInfoUri: getNodeInfoUri ?? throwRouteError,
33
- getActorUri: getActorUri ?? throwRouteError,
34
- getObjectUri: getObjectUri ?? throwRouteError,
35
- getOutboxUri: getOutboxUri ?? throwRouteError,
36
- getInboxUri: getInboxUri ?? throwRouteError,
37
- getFollowingUri: getFollowingUri ?? throwRouteError,
38
- getFollowersUri: getFollowersUri ?? throwRouteError,
39
- getLikedUri: getLikedUri ?? throwRouteError,
40
- getFeaturedUri: getFeaturedUri ?? throwRouteError,
41
- getFeaturedTagsUri: getFeaturedTagsUri ?? throwRouteError,
42
- parseUri: parseUri ?? ((_uri) => {
43
- throw new Error("Not implemented");
44
- }),
45
- getDocumentLoader: getDocumentLoader ?? ((_params) => {
46
- throw new Error("Not implemented");
47
- }),
48
- getActorKeyPairs: getActorKeyPairs ?? ((_handle) => Promise.resolve([])),
49
- lookupObject: lookupObject$1 ?? ((uri, options = {}) => {
50
- return lookupObject(uri, {
51
- documentLoader: options.documentLoader ?? documentLoader ?? mockDocumentLoader,
52
- contextLoader: options.contextLoader ?? contextLoader ?? mockDocumentLoader
53
- });
54
- }),
55
- traverseCollection: traverseCollection$1 ?? ((collection, options = {}) => {
56
- return traverseCollection(collection, {
57
- documentLoader: options.documentLoader ?? documentLoader ?? mockDocumentLoader,
58
- contextLoader: options.contextLoader ?? contextLoader ?? mockDocumentLoader
59
- });
60
- }),
61
- lookupNodeInfo: lookupNodeInfo ?? ((_params) => {
62
- throw new Error("Not implemented");
63
- }),
64
- lookupWebFinger: lookupWebFinger$1 ?? ((resource, options = {}) => {
65
- return lookupWebFinger(resource, options);
66
- }),
67
- sendActivity: sendActivity ?? ((_params) => {
68
- throw new Error("Not implemented");
69
- }),
70
- routeActivity: routeActivity ?? ((_params) => {
71
- throw new Error("Not implemented");
72
- })
73
- };
74
- }
75
- function createRequestContext(args) {
76
- return {
77
- ...createContext(args),
78
- clone: args.clone ?? ((data) => createRequestContext({
79
- ...args,
80
- data
81
- })),
82
- request: args.request ?? new Request(args.url),
83
- url: args.url,
84
- getActor: args.getActor ?? (() => Promise.resolve(null)),
85
- getObject: args.getObject ?? (() => Promise.resolve(null)),
86
- getSignedKey: args.getSignedKey ?? (() => Promise.resolve(null)),
87
- getSignedKeyOwner: args.getSignedKeyOwner ?? (() => Promise.resolve(null)),
88
- sendActivity: args.sendActivity ?? ((_params) => {
89
- throw new Error("Not implemented");
90
- })
91
- };
92
- }
93
- function createInboxContext(args) {
94
- return {
95
- ...createContext(args),
96
- clone: args.clone ?? ((data) => createInboxContext({
97
- ...args,
98
- data
99
- })),
100
- recipient: args.recipient ?? null,
101
- forwardActivity: args.forwardActivity ?? ((_params) => {
102
- throw new Error("Not implemented");
103
- })
104
- };
105
- }
106
-
107
- //#endregion
108
- export { createInboxContext, createRequestContext };
@@ -1,68 +0,0 @@
1
-
2
- import { Temporal } from "@js-temporal/polyfill";
3
- import { URLPattern } from "urlpattern-polyfill";
4
- globalThis.addEventListener = () => {};
5
-
6
- import { getLogger } from "@logtape/logtape";
7
-
8
- //#region testing/docloader.ts
9
- const logger = getLogger([
10
- "fedify",
11
- "testing",
12
- "docloader"
13
- ]);
14
- /**
15
- * A mock of the document loader. This does not make any actual HTTP requests
16
- * towards the remote server, but looks up the local fixture files instead.
17
- *
18
- * For instance, `mockDocumentLoader("http://example.com/foo/bar")` will look up
19
- * the file `testing/fixtures/http/example.com/foo/bar` (no suffix) and return
20
- * its content as the response.
21
- */
22
- async function mockDocumentLoader(resource) {
23
- const url = new URL(resource);
24
- if ("navigator" in globalThis && navigator.userAgent === "Cloudflare-Workers") {
25
- const testUrl = new URL(url);
26
- testUrl.hostname += ".test";
27
- const resp = await fetch(testUrl);
28
- if (resp.ok) {
29
- const document$1 = await resp.json();
30
- logger.debug("Successfully fetched fixture {resource}: {status} {statusText}\n{body}", {
31
- resource,
32
- status: resp.status,
33
- statusText: resp.statusText,
34
- body: document$1
35
- });
36
- return {
37
- contextUrl: null,
38
- document: document$1,
39
- documentUrl: resource
40
- };
41
- }
42
- const error = await resp.text();
43
- logger.error("Failed to fetch fixture {resource}: {error}", {
44
- resource,
45
- error
46
- });
47
- throw new Error(error);
48
- }
49
- const path = `./fixtures/${url.host}${url.pathname}.json`;
50
- let document;
51
- try {
52
- document = (await import(path, { with: { type: "json" } })).default;
53
- } catch (error) {
54
- logger.error("Failed to read fixture file {path}: {error}", {
55
- path,
56
- error
57
- });
58
- throw error;
59
- }
60
- return {
61
- contextUrl: null,
62
- document,
63
- documentUrl: resource
64
- };
65
- }
66
-
67
- //#endregion
68
- export { mockDocumentLoader };