@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.
- package/README.md +4 -1
- package/dist/{actor-LkF6aqGd.js → actor-CM9DhmYG.js} +179 -179
- package/dist/{actor-BI_2abz3.js → actor-CXiBUxzX.js} +1 -4
- package/dist/{assert_rejects-DceVjUlD.js → assert_rejects-AjlKk-Vo.js} +1 -1
- package/dist/{assert_throws-DTDC_gwN.js → assert_throws-CqMKbTh_.js} +1 -1
- package/dist/{authdocloader-Bn1wpyy1.js → authdocloader-CoK1cNSv.js} +3 -4
- package/dist/{authdocloader-DeF41lCp.js → authdocloader-CxTR6Cx7.js} +3 -3
- package/dist/{builder-ypgCZZ9b.js → builder-D5PVNw-f.js} +4 -5
- package/dist/{client-D_GpybaE.js → client-Deo5HWuU.js} +2 -2
- package/dist/compat/transformers.test.js +20 -27
- package/dist/{docloader-ZcdrjMf8.js → docloader-CoCVFIdd.js} +2 -1
- package/dist/{esm-d-9EVGaP.js → esm-EXQbXMPG.js} +1 -1
- package/dist/federation/builder.test.js +11 -16
- package/dist/federation/collection.test.js +9 -7
- package/dist/federation/handler.test.js +26 -35
- package/dist/federation/inbox.test.js +6 -10
- package/dist/federation/keycache.test.js +4 -7
- package/dist/federation/kv.test.js +8 -6
- package/dist/federation/middleware.test.js +27 -35
- package/dist/federation/mod.js +10 -10
- package/dist/federation/mq.test.js +10 -8
- package/dist/federation/retry.test.js +5 -3
- package/dist/federation/router.test.js +8 -7
- package/dist/federation/send.test.js +15 -21
- package/dist/{http-CzYP-q4a.js → http-BMGJhytW.js} +2 -3
- package/dist/{http-BzbQEWKu.js → http-C2JU_TBj.js} +3 -3
- package/dist/{inbox-C3u7wpp-.js → inbox-BPbz_ao6.js} +1 -3
- package/dist/{key-ctbEcqup.js → key-Cw4UVtxp.js} +2 -3
- package/dist/{key-DpPVsVBo.js → key-DN4BIKz_.js} +4 -4
- package/dist/key-IO1BOpia.js +10 -0
- package/dist/{key-DuMiqGNl.js → key-OtdoFkXm.js} +2 -2
- package/dist/{keycache-B4MVJOqX.js → keycache-VoOwxP0J.js} +1 -1
- package/dist/{keys-8BtWAvD6.js → keys-BLkL01oe.js} +1 -1
- package/dist/{ld-DpsRY9hw.js → ld-DzSYkEZt.js} +2 -4
- package/dist/{lookup-Cl-flyHw.js → lookup-C_W_03GR.js} +1 -1
- package/dist/{lookup-DrKu09YQ.js → lookup-DmCcT32H.js} +113 -6
- package/dist/middleware-BOpaJuMq.js +26 -0
- package/dist/{middleware-Bel3idhw.js → middleware-CpvSNOWP.js} +11 -11
- package/dist/{middleware-_FILA5XM.js → middleware-D5a8IwLT.js} +17 -21
- package/dist/middleware-DsTB1RZr.js +17 -0
- package/dist/mod.js +10 -10
- package/dist/nodeinfo/client.test.js +11 -11
- package/dist/nodeinfo/handler.test.js +25 -34
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +9 -7
- package/dist/nodeinfo/types.test.js +10 -8
- package/dist/{owner-MQpfmrEp.js → owner-B7WC4XMm.js} +2 -3
- package/dist/{proof-BmJlaEuD.js → proof-DGvKD7fj.js} +3 -3
- package/dist/{proof-C3Gb_y9R.js → proof-DZgS1afh.js} +2 -4
- package/dist/runtime/authdocloader.test.js +14 -20
- package/dist/runtime/docloader.test.js +9 -10
- package/dist/runtime/key.test.js +10 -15
- package/dist/runtime/langstr.test.js +8 -7
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +8 -7
- package/dist/runtime/url.test.js +5 -4
- package/dist/{send-B95nXWtF.js → send-KqOpWmPm.js} +2 -2
- package/dist/sig/http.test.js +13 -19
- package/dist/sig/key.test.js +11 -17
- package/dist/sig/ld.test.js +10 -16
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +12 -19
- package/dist/sig/proof.test.js +12 -18
- package/dist/testing/docloader.test.js +8 -7
- package/dist/testing/mod.d.ts +8387 -1
- package/dist/testing/mod.js +4 -2
- package/dist/testing-Ckz8sJMd.js +301 -0
- package/dist/{vocab-BczrO3jQ.js → type-C5cdRbDh.js} +5255 -183
- package/dist/{types-C7C_l-jz.js → types-n7HI7VFr.js} +1 -1
- package/dist/{types-BACpZoAu.js → types-zNofm6uK.js} +1 -1
- package/dist/vocab/actor.test.js +10 -16
- package/dist/vocab/lookup.test.js +9 -16
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +3 -7
- package/dist/vocab/vocab.test.js +9 -13
- package/dist/{vocab-BFQwOXsO.js → vocab-B-ZpQXwI.js} +3 -3
- package/dist/webfinger/handler.test.js +25 -34
- package/dist/webfinger/lookup.test.js +9 -10
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.test.js +8 -6
- package/package.json +1 -1
- package/dist/chunk-HsBuZ-b2.js +0 -41
- package/dist/context-wTS6NVpw.js +0 -108
- package/dist/docloader-09nVWLAZ.js +0 -68
- package/dist/docloader-4n0wKCuD.js +0 -4526
- package/dist/key-BDYWJlpE.js +0 -16
- package/dist/langstr-DbWheeIS.js +0 -33
- package/dist/lookup-CIZBWILo.js +0 -132
- package/dist/middleware-BoSxCdkz.js +0 -17
- package/dist/middleware-Db3gnzbt.js +0 -33
- package/dist/multibase-DeCHcK8L.js +0 -316
- package/dist/router-D3UybECj.js +0 -118
- package/dist/testing-BZ0dJ4qn.js +0 -143
- package/dist/type-D2s5lmbZ.js +0 -14
- package/dist/url-kTAI6_KP.js +0 -68
- /package/dist/{assert_is_error-DQdKoRgb.js → assert_is_error-CeVBLPsZ.js} +0 -0
- /package/dist/{assert_not_equals-7pyUM3Ib.js → assert_not_equals-D2R2nl5h.js} +0 -0
- /package/dist/{collection-Dfb0TPno.js → collection-D5V3UzU3.js} +0 -0
- /package/dist/{denokv-QWKsIqML.js → denokv-DK9P5Jq7.js} +0 -0
- /package/dist/{retry-BiIhZWgD.js → retry-BnpVRGFC.js} +0 -0
- /package/dist/{semver-DWClQt_5.js → semver-DCqorrj5.js} +0 -0
- /package/dist/{std__assert-B3iAixc-.js → std__assert-BQdmxyzF.js} +0 -0
|
@@ -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-
|
|
5
|
+
import { getUserAgent } from "./docloader-CoCVFIdd.js";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
|
|
8
8
|
//#region nodeinfo/semver.ts
|
package/dist/vocab/actor.test.js
CHANGED
|
@@ -3,25 +3,19 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { __export } from "../
|
|
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 "../
|
|
11
|
-
import "../
|
|
12
|
-
import "../
|
|
13
|
-
import {
|
|
14
|
-
import "../
|
|
15
|
-
import "../
|
|
16
|
-
import "../
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
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 "../
|
|
10
|
-
import "../
|
|
11
|
-
import "../
|
|
12
|
-
import
|
|
13
|
-
import "../
|
|
14
|
-
import "../
|
|
15
|
-
import "../
|
|
16
|
-
import {
|
|
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-
|
|
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-
|
|
7
|
-
import "../lookup-
|
|
8
|
-
import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "../vocab-
|
|
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 };
|
package/dist/vocab/type.test.js
CHANGED
|
@@ -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 "../
|
|
8
|
-
import "../
|
|
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()", () => {
|
package/dist/vocab/vocab.test.js
CHANGED
|
@@ -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 "../
|
|
10
|
-
import "../
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import "../
|
|
16
|
-
import {
|
|
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-
|
|
6
|
-
import { Object as Object$1, getTypeId } from "./actor-
|
|
7
|
-
import { lookupWebFinger } from "./lookup-
|
|
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-
|
|
11
|
-
import "../
|
|
12
|
-
import "../
|
|
13
|
-
import "../
|
|
14
|
-
import "../
|
|
15
|
-
import "../
|
|
16
|
-
import "../
|
|
17
|
-
import "../
|
|
18
|
-
import
|
|
19
|
-
import "../
|
|
20
|
-
import "../
|
|
21
|
-
import "../
|
|
22
|
-
import "../
|
|
23
|
-
import "../
|
|
24
|
-
import "../
|
|
25
|
-
import "../
|
|
26
|
-
import "../
|
|
27
|
-
import "../
|
|
28
|
-
import "../
|
|
29
|
-
import "../
|
|
30
|
-
import "../
|
|
31
|
-
import "../
|
|
32
|
-
import "../
|
|
33
|
-
import "../
|
|
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 "../
|
|
10
|
-
import "../
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import "../
|
|
14
|
-
import "../
|
|
15
|
-
import "../
|
|
16
|
-
import "../
|
|
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
|
package/dist/webfinger/mod.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import "../docloader-
|
|
6
|
-
import { lookupWebFinger } from "../lookup-
|
|
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 };
|
package/dist/x/cfworkers.test.js
CHANGED
|
@@ -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
|
|
10
|
-
import "../
|
|
11
|
-
import "../
|
|
12
|
-
import "../
|
|
13
|
-
import "../
|
|
14
|
-
import "../
|
|
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
package/dist/chunk-HsBuZ-b2.js
DELETED
|
@@ -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 };
|
package/dist/context-wTS6NVpw.js
DELETED
|
@@ -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 };
|