@fedify/fedify 1.8.1-pr.350.1285 → 1.8.1
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 +2 -0
- package/dist/{actor-CaMRRcub.js → actor-BDPKTUai.js} +179 -179
- package/dist/{actor-D_mYtQ--.js → actor-CLRQDEV9.js} +1 -1
- package/dist/{actor-C2nhWp6O.d.ts → actor-Uh1YDuVl.d.ts} +2 -2
- package/dist/{authdocloader-CQh4IJfT.js → authdocloader-BBwf1_f7.js} +6 -5
- package/dist/{authdocloader-K0Peq1hX.js → authdocloader-C2mtQBvn.js} +6 -5
- package/dist/{builder-fPWs-TI4.js → builder-C2kEWQ9P.js} +4 -4
- package/dist/{client-D2tgjFk3.d.ts → client-DF8anIB5.d.ts} +1 -1
- package/dist/{client-9cPnAibf.js → client-DQZ4AQIk.js} +1 -1
- package/dist/compat/mod.d.ts +10 -10
- package/dist/compat/transformers.test.js +16 -16
- package/dist/{context-BBD2ZH_P.d.ts → context-CnveeHUR.d.ts} +8 -8
- package/dist/{docloader-Bz56sKV5.d.ts → docloader-CxWcuWqQ.d.ts} +14 -1
- package/dist/{docloader-BBtyRca1.js → docloader-Dvsvkvlo.js} +23 -27
- package/dist/{esm-QBbiQNo4.js → esm-BWVigQCO.js} +1 -1
- package/dist/federation/builder.test.js +5 -5
- package/dist/federation/collection.test.js +3 -3
- package/dist/federation/handler.test.js +17 -17
- package/dist/federation/inbox.test.js +4 -4
- package/dist/federation/keycache.test.js +4 -4
- package/dist/federation/kv.test.js +3 -3
- package/dist/federation/middleware.test.js +18 -18
- package/dist/federation/mod.d.ts +9 -9
- package/dist/federation/mod.js +10 -10
- package/dist/federation/mq.test.js +3 -3
- package/dist/federation/retry.test.js +3 -3
- package/dist/federation/router.test.js +3 -3
- package/dist/federation/send.test.js +10 -10
- package/dist/{http-B0NkMLuT.js → http-Cdw1rmQb.js} +11 -5
- package/dist/{http-DWJVfkyZ.js → http-CgMHCKJe.js} +12 -6
- package/dist/{http-l4uEvaAw.d.ts → http-DtG44GdM.d.ts} +2 -2
- package/dist/{inbox-B1nIxc0q.js → inbox-CvnAgO-D.js} +1 -1
- package/dist/{key-BDCSCae-.js → key-C5L8OQYQ.js} +3 -3
- package/dist/{key-BRl4AtNh.js → key-CK11m7Rs.js} +2 -2
- package/dist/{key-CKINuzqT.js → key-CuoSylWi.js} +4 -4
- package/dist/{key-Bpdjmig5.js → key-I8MiG9nK.js} +2 -2
- package/dist/{keycache-CoDCGPU_.js → keycache-Z0xx1tPQ.js} +1 -1
- package/dist/{keys--rBfRBtT.js → keys-Ddyoaf_e.js} +1 -1
- package/dist/{ld-C3oVh0YJ.js → ld-DTtWNgiE.js} +2 -2
- package/dist/{lookup-BJelGpWr.d.ts → lookup-3czM5mmU.d.ts} +7 -1
- package/dist/{lookup-BLwnybnA.js → lookup-BBjrfjI5.js} +5 -4
- package/dist/{lookup-BxBwlMQM.js → lookup-nB-tCGVP.js} +3 -2
- package/dist/middleware-BQe2VdJO.js +26 -0
- package/dist/middleware-DOSupjKJ.js +17 -0
- package/dist/{middleware-KK44603T.js → middleware-DScUEBAy.js} +10 -10
- package/dist/{middleware-hQ-rKnGR.js → middleware-TVCxZbNW.js} +13 -13
- package/dist/{mod-DDwnlIlm.d.ts → mod-DPpunL8j.d.ts} +2 -2
- package/dist/{mod-D79SaXL-.d.ts → mod-cz-tNIqP.d.ts} +7 -2
- package/dist/{mod-DM7ZpXF4.d.ts → mod-mSMqo9JU.d.ts} +2 -2
- package/dist/{mod-DwquBB1g.d.ts → mod-tQVUxQ_D.d.ts} +3 -3
- package/dist/mod.d.ts +12 -12
- package/dist/mod.js +10 -10
- package/dist/nodeinfo/client.test.js +5 -5
- package/dist/nodeinfo/handler.test.js +16 -16
- package/dist/nodeinfo/mod.d.ts +2 -2
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +3 -3
- package/dist/nodeinfo/types.test.js +3 -3
- package/dist/{owner-fFqUg4lq.d.ts → owner-C12klfeG.d.ts} +3 -3
- package/dist/{owner-D42JugRm.js → owner-H5ZC_lkd.js} +2 -2
- package/dist/{proof-wEvE3AbS.js → proof-Chg3ytBc.js} +3 -3
- package/dist/{proof-CIm_fnDK.js → proof-De02H0W-.js} +2 -2
- package/dist/runtime/authdocloader.test.js +49 -9
- package/dist/runtime/docloader.test.js +60 -4
- package/dist/runtime/key.test.js +5 -5
- package/dist/runtime/langstr.test.js +3 -3
- package/dist/runtime/mod.d.ts +4 -4
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +3 -3
- package/dist/runtime/url.test.js +3 -3
- package/dist/{send-BRA7aMRV.js → send-CL5-bPSf.js} +2 -2
- package/dist/sig/http.test.js +51 -9
- package/dist/sig/key.test.js +6 -6
- package/dist/sig/ld.test.js +7 -7
- package/dist/sig/mod.d.ts +6 -6
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +7 -7
- package/dist/sig/proof.test.js +7 -7
- package/dist/testing/docloader.test.js +3 -3
- package/dist/testing/mod.d.ts +24 -1
- package/dist/testing/mod.js +3 -3
- package/dist/{testing-C7zAnwt8.js → testing-BVNNmwCi.js} +3 -3
- package/dist/{type-gkozZs_Y.js → type-iB-6GI3W.js} +202 -205
- package/dist/{types-YGkwBxol.js → types-mbUbOJzp.js} +1 -1
- package/dist/vocab/actor.test.js +5 -5
- package/dist/vocab/lookup.test.js +98 -6
- package/dist/vocab/mod.d.ts +4 -4
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +3 -3
- package/dist/vocab/vocab.test.js +4 -4
- package/dist/{vocab-DQ4SEIWh.js → vocab-Bpo_epAX.js} +7 -6
- package/dist/{vocab-CA7YwVEz.d.ts → vocab-Ukxjz3TM.d.ts} +1 -1
- package/dist/webfinger/handler.test.js +16 -16
- package/dist/webfinger/lookup.test.js +58 -4
- package/dist/webfinger/mod.d.ts +2 -2
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.test.js +3 -3
- package/dist/x/hono.d.ts +9 -9
- package/dist/x/sveltekit.d.ts +9 -9
- package/package.json +1 -1
- package/dist/middleware-BEG0MAZG.js +0 -26
- package/dist/middleware-BtSPPgam.js +0 -17
|
@@ -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-Dvsvkvlo.js";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
|
|
8
8
|
//#region src/nodeinfo/semver.ts
|
package/dist/vocab/actor.test.js
CHANGED
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Application, Group, Organization, Person, Service, __export } from "../type-
|
|
6
|
+
import { Application, Group, Organization, Person, Service, __export } from "../type-iB-6GI3W.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import "../lookup-
|
|
11
|
-
import { getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "../actor-
|
|
12
|
-
import { test } from "../testing-
|
|
10
|
+
import "../lookup-BBjrfjI5.js";
|
|
11
|
+
import { getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "../actor-CLRQDEV9.js";
|
|
12
|
+
import { test } from "../testing-BVNNmwCi.js";
|
|
13
13
|
import { assertStrictEquals } from "../std__assert-X-_kMxKM.js";
|
|
14
14
|
import { assertFalse, assertRejects } from "../assert_rejects-DiIiJbZn.js";
|
|
15
15
|
import "../assert_is_error-BPGph1Jx.js";
|
|
16
16
|
import "../assert_not_equals-f3m3epl3.js";
|
|
17
17
|
import { assertThrows } from "../assert_throws-BOO88avQ.js";
|
|
18
|
-
import { esm_default } from "../esm-
|
|
18
|
+
import { esm_default } from "../esm-BWVigQCO.js";
|
|
19
19
|
|
|
20
20
|
//#region ../../node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/precondition/PreconditionFailure.js
|
|
21
21
|
var PreconditionFailure = class PreconditionFailure extends Error {
|
|
@@ -3,21 +3,24 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Collection, Note, Object as Object$1, Person } from "../type-
|
|
6
|
+
import { Collection, Note, Object as Object$1, Person } from "../type-iB-6GI3W.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import "../assert-MZs1qjMx.js";
|
|
9
9
|
import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import { lookupObject, traverseCollection } from "../lookup-
|
|
11
|
-
import { mockDocumentLoader, test } from "../testing-
|
|
10
|
+
import { lookupObject, traverseCollection } from "../lookup-BBjrfjI5.js";
|
|
11
|
+
import { mockDocumentLoader, test } from "../testing-BVNNmwCi.js";
|
|
12
12
|
import "../std__assert-X-_kMxKM.js";
|
|
13
13
|
import "../assert_rejects-DiIiJbZn.js";
|
|
14
14
|
import "../assert_is_error-BPGph1Jx.js";
|
|
15
15
|
import "../assert_not_equals-f3m3epl3.js";
|
|
16
16
|
import "../assert_throws-BOO88avQ.js";
|
|
17
|
-
import { esm_default } from "../esm-
|
|
17
|
+
import { esm_default } from "../esm-BWVigQCO.js";
|
|
18
18
|
|
|
19
19
|
//#region src/vocab/lookup.test.ts
|
|
20
|
-
test("lookupObject()",
|
|
20
|
+
test("lookupObject()", {
|
|
21
|
+
sanitizeResources: false,
|
|
22
|
+
sanitizeOps: false
|
|
23
|
+
}, async (t) => {
|
|
21
24
|
esm_default.spyGlobal();
|
|
22
25
|
esm_default.get("begin:https://example.com/.well-known/webfinger", {
|
|
23
26
|
subject: "acct:johndoe@example.com",
|
|
@@ -80,9 +83,98 @@ test("lookupObject()", async (t) => {
|
|
|
80
83
|
assertEquals(await lookupObject("janedoe@example.com", options), null);
|
|
81
84
|
assertEquals(await lookupObject("https://example.com/404", options), null);
|
|
82
85
|
});
|
|
86
|
+
esm_default.removeRoutes();
|
|
87
|
+
esm_default.get("begin:https://example.com/.well-known/webfinger", () => new Promise((resolve) => {
|
|
88
|
+
setTimeout(() => {
|
|
89
|
+
resolve({
|
|
90
|
+
subject: "acct:johndoe@example.com",
|
|
91
|
+
links: [{
|
|
92
|
+
rel: "self",
|
|
93
|
+
href: "https://example.com/person",
|
|
94
|
+
type: "application/activity+json"
|
|
95
|
+
}]
|
|
96
|
+
});
|
|
97
|
+
}, 1e3);
|
|
98
|
+
}));
|
|
99
|
+
await t.step("request cancellation", async () => {
|
|
100
|
+
const controller = new AbortController();
|
|
101
|
+
const promise = lookupObject("johndoe@example.com", {
|
|
102
|
+
...options,
|
|
103
|
+
signal: controller.signal
|
|
104
|
+
});
|
|
105
|
+
controller.abort();
|
|
106
|
+
assertEquals(await promise, null);
|
|
107
|
+
});
|
|
108
|
+
esm_default.removeRoutes();
|
|
109
|
+
esm_default.get("begin:https://example.com/.well-known/webfinger", {
|
|
110
|
+
subject: "acct:johndoe@example.com",
|
|
111
|
+
links: [{
|
|
112
|
+
rel: "self",
|
|
113
|
+
href: "https://example.com/person",
|
|
114
|
+
type: "application/activity+json"
|
|
115
|
+
}]
|
|
116
|
+
});
|
|
117
|
+
await t.step("successful request with signal", async () => {
|
|
118
|
+
const controller = new AbortController();
|
|
119
|
+
const person = await lookupObject("johndoe@example.com", {
|
|
120
|
+
...options,
|
|
121
|
+
signal: controller.signal
|
|
122
|
+
});
|
|
123
|
+
assertInstanceOf(person, Person);
|
|
124
|
+
assertEquals(person.id, new URL("https://example.com/person"));
|
|
125
|
+
});
|
|
126
|
+
esm_default.removeRoutes();
|
|
127
|
+
esm_default.get("begin:https://example.com/.well-known/webfinger", () => new Promise((resolve) => {
|
|
128
|
+
setTimeout(() => {
|
|
129
|
+
resolve({
|
|
130
|
+
subject: "acct:johndoe@example.com",
|
|
131
|
+
links: [{
|
|
132
|
+
rel: "self",
|
|
133
|
+
href: "https://example.com/person",
|
|
134
|
+
type: "application/activity+json"
|
|
135
|
+
}]
|
|
136
|
+
});
|
|
137
|
+
}, 500);
|
|
138
|
+
}));
|
|
139
|
+
await t.step("cancellation with immediate abort", async () => {
|
|
140
|
+
const controller = new AbortController();
|
|
141
|
+
controller.abort();
|
|
142
|
+
const result = await lookupObject("johndoe@example.com", {
|
|
143
|
+
...options,
|
|
144
|
+
signal: controller.signal
|
|
145
|
+
});
|
|
146
|
+
assertEquals(result, null);
|
|
147
|
+
});
|
|
148
|
+
esm_default.removeRoutes();
|
|
149
|
+
esm_default.get("https://example.com/slow-object", () => new Promise((resolve) => {
|
|
150
|
+
setTimeout(() => {
|
|
151
|
+
resolve({
|
|
152
|
+
status: 200,
|
|
153
|
+
headers: { "Content-Type": "application/activity+json" },
|
|
154
|
+
body: {
|
|
155
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
|
156
|
+
type: "Note",
|
|
157
|
+
content: "Slow response"
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}, 1e3);
|
|
161
|
+
}));
|
|
162
|
+
await t.step("direct object fetch cancellation", async () => {
|
|
163
|
+
const controller = new AbortController();
|
|
164
|
+
const promise = lookupObject("https://example.com/slow-object", {
|
|
165
|
+
contextLoader: mockDocumentLoader,
|
|
166
|
+
signal: controller.signal
|
|
167
|
+
});
|
|
168
|
+
controller.abort();
|
|
169
|
+
assertEquals(await promise, null);
|
|
170
|
+
});
|
|
83
171
|
esm_default.hardReset();
|
|
172
|
+
esm_default.removeRoutes();
|
|
84
173
|
});
|
|
85
|
-
test("traverseCollection()",
|
|
174
|
+
test("traverseCollection()", {
|
|
175
|
+
sanitizeResources: false,
|
|
176
|
+
sanitizeOps: false
|
|
177
|
+
}, async () => {
|
|
86
178
|
const options = {
|
|
87
179
|
documentLoader: mockDocumentLoader,
|
|
88
180
|
contextLoader: mockDocumentLoader
|
package/dist/vocab/mod.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
3
|
import "../kv-C7sopW2E.js";
|
|
4
|
-
import "../docloader-
|
|
5
|
-
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 } from "../vocab-
|
|
6
|
-
import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "../actor-
|
|
7
|
-
import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "../mod-
|
|
4
|
+
import "../docloader-CxWcuWqQ.js";
|
|
5
|
+
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 } from "../vocab-Ukxjz3TM.js";
|
|
6
|
+
import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "../actor-Uh1YDuVl.js";
|
|
7
|
+
import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "../mod-cz-tNIqP.js";
|
|
8
8
|
export { Accept, Activity, Actor, ActorTypeName, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, FediverseHandle, Flag, Follow, GetActorHandleOptions, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, Leave, Like, Link, Listen, LookupObjectOptions, Mention, Move, Multikey, NormalizeActorHandleOptions, Note, Object$1 as Object, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, Person, Place, Profile, PropertyValue, Question, Read, Recipient, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Video, View, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, isFediverseHandle, lookupObject, normalizeActorHandle, parseFediverseHandle, toAcctUrl, traverseCollection };
|
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-Dvsvkvlo.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-BDPKTUai.js";
|
|
7
|
+
import "../lookup-nB-tCGVP.js";
|
|
8
|
+
import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "../vocab-Bpo_epAX.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,10 +3,10 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Person, getTypeId } from "../type-
|
|
6
|
+
import { Person, getTypeId } from "../type-iB-6GI3W.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
-
import "../lookup-
|
|
9
|
-
import { test } from "../testing-
|
|
8
|
+
import "../lookup-BBjrfjI5.js";
|
|
9
|
+
import { test } from "../testing-BVNNmwCi.js";
|
|
10
10
|
|
|
11
11
|
//#region src/vocab/type.test.ts
|
|
12
12
|
test("getTypeId()", () => {
|
package/dist/vocab/vocab.test.js
CHANGED
|
@@ -3,18 +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-
|
|
6
|
+
import { Activity, Announce, Create, CryptographicKey, Follow, Hashtag, LanguageString, Note, Object as Object$1, OrderedCollectionPage, Person, Place, Question, Source, decode, vocab_exports } from "../type-iB-6GI3W.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
9
|
import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import "../lookup-
|
|
11
|
-
import { mockDocumentLoader, test } from "../testing-
|
|
10
|
+
import "../lookup-BBjrfjI5.js";
|
|
11
|
+
import { mockDocumentLoader, test } from "../testing-BVNNmwCi.js";
|
|
12
12
|
import "../std__assert-X-_kMxKM.js";
|
|
13
13
|
import { assertFalse, assertRejects } from "../assert_rejects-DiIiJbZn.js";
|
|
14
14
|
import "../assert_is_error-BPGph1Jx.js";
|
|
15
15
|
import { assertNotEquals } from "../assert_not_equals-f3m3epl3.js";
|
|
16
16
|
import { assertThrows } from "../assert_throws-BOO88avQ.js";
|
|
17
|
-
import { ed25519PublicKey, rsaPublicKey1 } from "../keys
|
|
17
|
+
import { ed25519PublicKey, rsaPublicKey1 } from "../keys-Ddyoaf_e.js";
|
|
18
18
|
import { pascalCase } from "es-toolkit";
|
|
19
19
|
import { parseLanguageTag } from "@phensley/language-tag";
|
|
20
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-Dvsvkvlo.js";
|
|
6
|
+
import { Object as Object$1, getTypeId } from "./actor-BDPKTUai.js";
|
|
7
|
+
import { lookupWebFinger } from "./lookup-nB-tCGVP.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
import { delay } from "es-toolkit";
|
|
@@ -154,7 +154,7 @@ async function lookupObjectInternal(identifier, options = {}) {
|
|
|
154
154
|
if (typeof identifier === "string") identifier = toAcctUrl(identifier) ?? new URL(identifier);
|
|
155
155
|
let document = null;
|
|
156
156
|
if (identifier.protocol === "http:" || identifier.protocol === "https:") try {
|
|
157
|
-
const remoteDoc = await documentLoader(identifier.href);
|
|
157
|
+
const remoteDoc = await documentLoader(identifier.href, { signal: options.signal });
|
|
158
158
|
document = remoteDoc.document;
|
|
159
159
|
} catch (error) {
|
|
160
160
|
logger.debug("Failed to fetch remote document:\n{error}", { error });
|
|
@@ -163,13 +163,14 @@ async function lookupObjectInternal(identifier, options = {}) {
|
|
|
163
163
|
const jrd = await lookupWebFinger(identifier, {
|
|
164
164
|
userAgent: options.userAgent,
|
|
165
165
|
tracerProvider: options.tracerProvider,
|
|
166
|
-
allowPrivateAddress: "allowPrivateAddress" in options && options.allowPrivateAddress === true
|
|
166
|
+
allowPrivateAddress: "allowPrivateAddress" in options && options.allowPrivateAddress === true,
|
|
167
|
+
signal: options.signal
|
|
167
168
|
});
|
|
168
169
|
if (jrd?.links == null) return null;
|
|
169
170
|
for (const l of jrd.links) {
|
|
170
171
|
if (l.type !== "application/activity+json" && !l.type?.match(/application\/ld\+json;\s*profile="https:\/\/www.w3.org\/ns\/activitystreams"/) || l.rel !== "self") continue;
|
|
171
172
|
try {
|
|
172
|
-
const remoteDoc = await documentLoader(l.href);
|
|
173
|
+
const remoteDoc = await documentLoader(l.href, { signal: options.signal });
|
|
173
174
|
document = remoteDoc.document;
|
|
174
175
|
break;
|
|
175
176
|
} catch (error) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { DocumentLoader } from "./docloader-
|
|
3
|
+
import { DocumentLoader } from "./docloader-CxWcuWqQ.js";
|
|
4
4
|
import { Span, TracerProvider } from "@opentelemetry/api";
|
|
5
5
|
import { LanguageTag } from "@phensley/language-tag";
|
|
6
6
|
|
|
@@ -3,30 +3,30 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Image, Link, Person } from "../type-
|
|
6
|
+
import { Image, Link, Person } from "../type-iB-6GI3W.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
10
|
import { MemoryKvStore } from "../kv-CRZrzyXm.js";
|
|
11
|
-
import { createFederation, handleWebFinger } from "../middleware-
|
|
11
|
+
import { createFederation, handleWebFinger } from "../middleware-TVCxZbNW.js";
|
|
12
12
|
import "../semver-dArNLkR9.js";
|
|
13
|
-
import "../client-
|
|
14
|
-
import "../lookup-
|
|
13
|
+
import "../client-DQZ4AQIk.js";
|
|
14
|
+
import "../lookup-BBjrfjI5.js";
|
|
15
15
|
import "../types-BIgY6c-l.js";
|
|
16
|
-
import "../actor-
|
|
17
|
-
import "../key-
|
|
18
|
-
import "../http-
|
|
19
|
-
import "../authdocloader-
|
|
20
|
-
import "../ld-
|
|
21
|
-
import "../owner-
|
|
22
|
-
import "../proof-
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
16
|
+
import "../actor-CLRQDEV9.js";
|
|
17
|
+
import "../key-I8MiG9nK.js";
|
|
18
|
+
import "../http-Cdw1rmQb.js";
|
|
19
|
+
import "../authdocloader-BBwf1_f7.js";
|
|
20
|
+
import "../ld-DTtWNgiE.js";
|
|
21
|
+
import "../owner-H5ZC_lkd.js";
|
|
22
|
+
import "../proof-De02H0W-.js";
|
|
23
|
+
import "../inbox-CvnAgO-D.js";
|
|
24
|
+
import "../builder-C2kEWQ9P.js";
|
|
25
25
|
import "../collection-CSzG2j1P.js";
|
|
26
|
-
import "../keycache-
|
|
26
|
+
import "../keycache-Z0xx1tPQ.js";
|
|
27
27
|
import "../retry-D4GJ670a.js";
|
|
28
|
-
import "../send-
|
|
29
|
-
import { createRequestContext, test } from "../testing-
|
|
28
|
+
import "../send-CL5-bPSf.js";
|
|
29
|
+
import { createRequestContext, test } from "../testing-BVNNmwCi.js";
|
|
30
30
|
import "../std__assert-X-_kMxKM.js";
|
|
31
31
|
import "../assert_rejects-DiIiJbZn.js";
|
|
32
32
|
import "../assert_is_error-BPGph1Jx.js";
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { lookupWebFinger } from "../type-
|
|
6
|
+
import { lookupWebFinger } from "../type-iB-6GI3W.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import "../lookup-
|
|
11
|
-
import { test } from "../testing-
|
|
10
|
+
import "../lookup-BBjrfjI5.js";
|
|
11
|
+
import { test } from "../testing-BVNNmwCi.js";
|
|
12
12
|
import "../std__assert-X-_kMxKM.js";
|
|
13
13
|
import "../assert_rejects-DiIiJbZn.js";
|
|
14
14
|
import "../assert_is_error-BPGph1Jx.js";
|
|
15
15
|
import "../assert_not_equals-f3m3epl3.js";
|
|
16
16
|
import "../assert_throws-BOO88avQ.js";
|
|
17
|
-
import { esm_default } from "../esm-
|
|
17
|
+
import { esm_default } from "../esm-BWVigQCO.js";
|
|
18
18
|
import { withTimeout } from "es-toolkit";
|
|
19
19
|
|
|
20
20
|
//#region src/webfinger/lookup.test.ts
|
|
@@ -134,6 +134,60 @@ test({
|
|
|
134
134
|
redirectCount = 0;
|
|
135
135
|
assertEquals(await lookupWebFinger("acct:johndoe@example.com"), expected);
|
|
136
136
|
});
|
|
137
|
+
esm_default.removeRoutes();
|
|
138
|
+
esm_default.get("begin:https://example.com/.well-known/webfinger?", () => new Promise((resolve) => {
|
|
139
|
+
const timeoutId = setTimeout(() => {
|
|
140
|
+
resolve({ body: expected });
|
|
141
|
+
}, 1e3);
|
|
142
|
+
return () => clearTimeout(timeoutId);
|
|
143
|
+
}));
|
|
144
|
+
await t.step("request cancellation", async () => {
|
|
145
|
+
const controller = new AbortController();
|
|
146
|
+
const promise = lookupWebFinger("acct:johndoe@example.com", { signal: controller.signal });
|
|
147
|
+
controller.abort();
|
|
148
|
+
assertEquals(await promise, null);
|
|
149
|
+
});
|
|
150
|
+
esm_default.removeRoutes();
|
|
151
|
+
let redirectCount2 = 0;
|
|
152
|
+
esm_default.get("begin:https://example.com/.well-known/webfinger", () => {
|
|
153
|
+
redirectCount2++;
|
|
154
|
+
if (redirectCount2 === 1) return {
|
|
155
|
+
status: 302,
|
|
156
|
+
headers: { Location: "/.well-known/webfinger2" }
|
|
157
|
+
};
|
|
158
|
+
return new Promise((resolve) => {
|
|
159
|
+
const timeoutId = setTimeout(() => {
|
|
160
|
+
resolve({ body: expected });
|
|
161
|
+
}, 1e3);
|
|
162
|
+
return () => clearTimeout(timeoutId);
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
await t.step("cancellation during redirection", async () => {
|
|
166
|
+
const controller = new AbortController();
|
|
167
|
+
const promise = lookupWebFinger("acct:johndoe@example.com", { signal: controller.signal });
|
|
168
|
+
setTimeout(() => controller.abort(), 100);
|
|
169
|
+
assertEquals(await promise, null);
|
|
170
|
+
});
|
|
171
|
+
esm_default.removeRoutes();
|
|
172
|
+
esm_default.get("begin:https://example.com/.well-known/webfinger?", () => new Promise((resolve) => {
|
|
173
|
+
const timeoutId = setTimeout(() => {
|
|
174
|
+
resolve({ body: expected });
|
|
175
|
+
}, 500);
|
|
176
|
+
return () => clearTimeout(timeoutId);
|
|
177
|
+
}));
|
|
178
|
+
await t.step("cancellation with immediate abort", async () => {
|
|
179
|
+
const controller = new AbortController();
|
|
180
|
+
controller.abort();
|
|
181
|
+
const result = await lookupWebFinger("acct:johndoe@example.com", { signal: controller.signal });
|
|
182
|
+
assertEquals(result, null);
|
|
183
|
+
});
|
|
184
|
+
esm_default.removeRoutes();
|
|
185
|
+
esm_default.get("begin:https://example.com/.well-known/webfinger?", { body: expected });
|
|
186
|
+
await t.step("successful request with signal", async () => {
|
|
187
|
+
const controller = new AbortController();
|
|
188
|
+
const result = await lookupWebFinger("acct:johndoe@example.com", { signal: controller.signal });
|
|
189
|
+
assertEquals(result, expected);
|
|
190
|
+
});
|
|
137
191
|
esm_default.hardReset();
|
|
138
192
|
}
|
|
139
193
|
});
|
package/dist/webfinger/mod.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
3
|
import "../kv-C7sopW2E.js";
|
|
4
|
-
import "../docloader-
|
|
5
|
-
import { Link, LookupWebFingerOptions, ResourceDescriptor, lookupWebFinger } from "../lookup-
|
|
4
|
+
import "../docloader-CxWcuWqQ.js";
|
|
5
|
+
import { Link, LookupWebFingerOptions, ResourceDescriptor, lookupWebFinger } from "../lookup-3czM5mmU.js";
|
|
6
6
|
import "../mod-GIh5OYxW.js";
|
|
7
7
|
export { Link, LookupWebFingerOptions, ResourceDescriptor, lookupWebFinger };
|
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-Dvsvkvlo.js";
|
|
6
|
+
import { lookupWebFinger } from "../lookup-nB-tCGVP.js";
|
|
7
7
|
import "../webfinger-C3GIyXIg.js";
|
|
8
8
|
|
|
9
9
|
export { lookupWebFinger };
|
package/dist/x/cfworkers.test.js
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
6
|
+
import "../type-iB-6GI3W.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import "../lookup-
|
|
11
|
-
import { test } from "../testing-
|
|
10
|
+
import "../lookup-BBjrfjI5.js";
|
|
11
|
+
import { test } from "../testing-BVNNmwCi.js";
|
|
12
12
|
import "../std__assert-X-_kMxKM.js";
|
|
13
13
|
import "../assert_rejects-DiIiJbZn.js";
|
|
14
14
|
import "../assert_is_error-BPGph1Jx.js";
|
package/dist/x/hono.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
3
|
import "../kv-C7sopW2E.js";
|
|
4
|
-
import "../docloader-
|
|
5
|
-
import "../client-
|
|
6
|
-
import "../vocab-
|
|
7
|
-
import "../actor-
|
|
8
|
-
import "../http-
|
|
9
|
-
import "../owner-
|
|
10
|
-
import "../mod-
|
|
11
|
-
import "../lookup-
|
|
12
|
-
import { Federation } from "../context-
|
|
4
|
+
import "../docloader-CxWcuWqQ.js";
|
|
5
|
+
import "../client-DF8anIB5.js";
|
|
6
|
+
import "../vocab-Ukxjz3TM.js";
|
|
7
|
+
import "../actor-Uh1YDuVl.js";
|
|
8
|
+
import "../http-DtG44GdM.js";
|
|
9
|
+
import "../owner-C12klfeG.js";
|
|
10
|
+
import "../mod-cz-tNIqP.js";
|
|
11
|
+
import "../lookup-3czM5mmU.js";
|
|
12
|
+
import { Federation } from "../context-CnveeHUR.js";
|
|
13
13
|
import "../mq-CRGm1e_F.js";
|
|
14
14
|
|
|
15
15
|
//#region src/x/hono.d.ts
|
package/dist/x/sveltekit.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
3
|
import "../kv-C7sopW2E.js";
|
|
4
|
-
import "../docloader-
|
|
5
|
-
import "../client-
|
|
6
|
-
import "../vocab-
|
|
7
|
-
import "../actor-
|
|
8
|
-
import "../http-
|
|
9
|
-
import "../owner-
|
|
10
|
-
import "../mod-
|
|
11
|
-
import "../lookup-
|
|
12
|
-
import { Federation } from "../context-
|
|
4
|
+
import "../docloader-CxWcuWqQ.js";
|
|
5
|
+
import "../client-DF8anIB5.js";
|
|
6
|
+
import "../vocab-Ukxjz3TM.js";
|
|
7
|
+
import "../actor-Uh1YDuVl.js";
|
|
8
|
+
import "../http-DtG44GdM.js";
|
|
9
|
+
import "../owner-C12klfeG.js";
|
|
10
|
+
import "../mod-cz-tNIqP.js";
|
|
11
|
+
import "../lookup-3czM5mmU.js";
|
|
12
|
+
import { Federation } from "../context-CnveeHUR.js";
|
|
13
13
|
import "../mq-CRGm1e_F.js";
|
|
14
14
|
|
|
15
15
|
//#region src/x/sveltekit.d.ts
|
package/package.json
CHANGED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
-
globalThis.addEventListener = () => {};
|
|
5
|
-
|
|
6
|
-
import "./type-gkozZs_Y.js";
|
|
7
|
-
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-hQ-rKnGR.js";
|
|
8
|
-
import "./semver-dArNLkR9.js";
|
|
9
|
-
import "./client-9cPnAibf.js";
|
|
10
|
-
import "./lookup-BLwnybnA.js";
|
|
11
|
-
import "./types-BIgY6c-l.js";
|
|
12
|
-
import "./actor-D_mYtQ--.js";
|
|
13
|
-
import "./key-Bpdjmig5.js";
|
|
14
|
-
import "./http-B0NkMLuT.js";
|
|
15
|
-
import "./authdocloader-CQh4IJfT.js";
|
|
16
|
-
import "./ld-C3oVh0YJ.js";
|
|
17
|
-
import "./owner-D42JugRm.js";
|
|
18
|
-
import "./proof-CIm_fnDK.js";
|
|
19
|
-
import "./inbox-B1nIxc0q.js";
|
|
20
|
-
import "./builder-fPWs-TI4.js";
|
|
21
|
-
import "./collection-CSzG2j1P.js";
|
|
22
|
-
import "./keycache-CoDCGPU_.js";
|
|
23
|
-
import "./retry-D4GJ670a.js";
|
|
24
|
-
import "./send-BRA7aMRV.js";
|
|
25
|
-
|
|
26
|
-
export { FederationImpl };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
-
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
-
|
|
5
|
-
import "./transformers-Dna8Fg7k.js";
|
|
6
|
-
import "./docloader-BBtyRca1.js";
|
|
7
|
-
import "./actor-CaMRRcub.js";
|
|
8
|
-
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-KK44603T.js";
|
|
9
|
-
import "./lookup-BxBwlMQM.js";
|
|
10
|
-
import "./key-BRl4AtNh.js";
|
|
11
|
-
import "./http-DWJVfkyZ.js";
|
|
12
|
-
import "./proof-wEvE3AbS.js";
|
|
13
|
-
import "./types-YGkwBxol.js";
|
|
14
|
-
import "./authdocloader-K0Peq1hX.js";
|
|
15
|
-
import "./vocab-DQ4SEIWh.js";
|
|
16
|
-
|
|
17
|
-
export { FederationImpl };
|