@fedify/fedify 1.7.11 → 1.7.13
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/dist/{actor-2ENhJMd7.js → actor-BVilnhZ3.js} +6 -9
- package/dist/{actor-DgWryCk8.js → actor-CsmPeeHG.js} +1059 -2276
- package/dist/{assert-DmFG7ppO.js → assert-LOEeCUK5.js} +1 -1
- package/dist/{assert_equals-CTYbeopb.js → assert_equals-B44MxcIj.js} +2 -4
- package/dist/{assert_instance_of-CF09JHYM.js → assert_instance_of-XtuFevV_.js} +1 -1
- package/dist/{assert_is_error-nrwA1GeT.js → assert_is_error-BTlryvT0.js} +1 -1
- package/dist/{assert_not_equals-Dc7y-V5Q.js → assert_not_equals-C685gKx6.js} +1 -1
- package/dist/{assert_rejects-C-sxEMM5.js → assert_rejects-DWQ4jaf9.js} +2 -2
- package/dist/{assert_throws-Cn9C6Jur.js → assert_throws-YetpVSc-.js} +2 -2
- package/dist/{authdocloader-CK17fG7y.js → authdocloader-9g6RkEcR.js} +4 -4
- package/dist/{authdocloader-BUJAQQAE.js → authdocloader-DqCINL6u.js} +3 -3
- package/dist/{builder-CZM8EtHh.js → builder-CKUAOfcL.js} +7 -10
- package/dist/{chunk-HsBuZ-b2.js → chunk-Cx8LTkjm.js} +3 -1
- package/dist/{client-D83KwIk4.js → client-C5xUY491.js} +6 -6
- package/dist/compat/transformers.test.js +27 -28
- package/dist/{context-MUHrGcK9.js → context-aglzx1Ww.js} +2 -2
- package/dist/{docloader-BcyuO_kK.js → docloader-CchlnLWb.js} +5 -9
- package/dist/{docloader-D4wl8z_4.js → docloader-Qfs9nPiy.js} +4 -6
- package/dist/{esm-Db4De7AS.js → esm-DO9PrujO.js} +23 -34
- package/dist/federation/builder.test.js +23 -29
- package/dist/federation/collection.test.js +9 -9
- package/dist/federation/handler.test.js +33 -33
- package/dist/federation/inbox.test.js +10 -10
- package/dist/federation/keycache.test.js +9 -9
- package/dist/federation/kv.test.js +10 -9
- package/dist/federation/middleware.test.js +76 -99
- package/dist/federation/mod.js +11 -11
- package/dist/federation/mq.test.js +10 -11
- package/dist/federation/retry.test.js +3 -3
- package/dist/federation/router.test.js +9 -9
- package/dist/federation/send.test.js +22 -22
- package/dist/{federation-BRIQn-GV.js → federation-B0aljx0V.js} +1 -2
- package/dist/{http-DFHfa9tA.js → http-CP3h1SLi.js} +8 -15
- package/dist/{http-Dsj_eYDw.js → http-CjDwMreH.js} +8 -15
- package/dist/{inbox-CltmHpHc.js → inbox-ApPO50Ma.js} +5 -7
- package/dist/{key-qFVeObG1.js → key--l6NVKdl.js} +5 -8
- package/dist/key-1Fv7reaM.js +16 -0
- package/dist/{key-bttcdrh5.js → key-BPUM0v_S.js} +6 -9
- package/dist/{key-bBurC_PZ.js → key-DD37RpoD.js} +4 -4
- package/dist/{keycache-DijbBawF.js → keycache-B7Urghlu.js} +2 -2
- package/dist/{keys-DJ5t4jB4.js → keys-DGJec4-R.js} +1 -1
- package/dist/{ld-U-lGfuzj.js → ld-DJTavNY3.js} +9 -16
- package/dist/{lookup-BlPHJ-Ff.js → lookup-CN-LpF5e.js} +2 -4
- package/dist/{lookup-BGqnk7rW.js → lookup-CkOdKyYR.js} +3 -5
- package/dist/{lookup-C8ZpflGI.js → lookup-CnkkF4Rf.js} +7 -11
- package/dist/middleware-BQHe0X6Y.js +17 -0
- package/dist/{middleware-D66R1UZl.js → middleware-BxHcZC4p.js} +34 -52
- package/dist/middleware-C3TZ3P-v.js +33 -0
- package/dist/{middleware-BRzqW-QG.js → middleware-CEpilAEY.js} +34 -58
- package/dist/mod.js +11 -11
- package/dist/{multibase-DeCHcK8L.js → multibase-CnLHszip.js} +1 -2
- package/dist/nodeinfo/client.test.js +20 -23
- package/dist/nodeinfo/handler.test.js +32 -32
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +23 -30
- package/dist/nodeinfo/types.test.js +11 -11
- package/dist/{owner-2zho-3Ew.js → owner-qKULzrkx.js} +3 -3
- package/dist/{proof-3J23UdVg.js → proof-BfeWBNrY.js} +12 -25
- package/dist/{proof-BYHc1mMr.js → proof-d5P09-xk.js} +8 -14
- package/dist/runtime/authdocloader.test.js +21 -21
- package/dist/runtime/docloader.test.js +16 -18
- package/dist/runtime/key.test.js +17 -17
- package/dist/runtime/langstr.test.js +9 -9
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +11 -12
- package/dist/runtime/url.test.js +6 -6
- package/dist/{semver-DWClQt_5.js → semver-BNrOOAs9.js} +1 -3
- package/dist/{send-CW7iJ-b9.js → send-BnMY3Qxa.js} +3 -4
- package/dist/sig/http.test.js +40 -54
- package/dist/sig/key.test.js +18 -18
- package/dist/sig/ld.test.js +20 -22
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +20 -20
- package/dist/sig/proof.test.js +19 -19
- package/dist/{std__assert-vp0TKMS1.js → std__assert-o_r9vqm1.js} +1 -1
- package/dist/testing/docloader.test.js +9 -9
- package/dist/testing/mod.js +1 -1
- package/dist/{testing-BZ0dJ4qn.js → testing-DLyvtiiW.js} +3 -5
- package/dist/{type-D2s5lmbZ.js → type-CFuiGLz9.js} +1 -2
- package/dist/{types-DXmLob1B.js → types-BZUzjGS0.js} +6 -8
- package/dist/{types-C7C_l-jz.js → types-CJHS5pXl.js} +1 -1
- package/dist/{url-kTAI6_KP.js → url-C2xuoQD1.js} +2 -4
- package/dist/vocab/actor.test.js +104 -156
- package/dist/vocab/lookup.test.js +17 -17
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +11 -15
- package/dist/vocab/vocab.test.js +68 -49
- package/dist/{vocab-Cy9XhW_T.js → vocab-C_pE4SvE.js} +6 -10
- package/dist/{vocab-BojAnGjI.js → vocab-S7fEn6XO.js} +1057 -2270
- package/dist/webfinger/handler.test.js +33 -34
- package/dist/webfinger/lookup.test.js +13 -13
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.test.js +9 -9
- package/package.json +1 -1
- package/dist/key-BROjrzkW.js +0 -16
- package/dist/middleware-BhqeOJrC.js +0 -17
- package/dist/middleware-DFra19vb.js +0 -33
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./docloader-
|
|
7
|
-
import { Application, Group, Organization, Person, Service } from "./vocab-
|
|
8
|
-
import { lookupWebFinger } from "./lookup-
|
|
9
|
-
import { getTypeId } from "./type-
|
|
6
|
+
import { deno_default } from "./docloader-Qfs9nPiy.js";
|
|
7
|
+
import { Application, Group, Organization, Person, Service } from "./vocab-S7fEn6XO.js";
|
|
8
|
+
import { lookupWebFinger } from "./lookup-CkOdKyYR.js";
|
|
9
|
+
import { getTypeId } from "./type-CFuiGLz9.js";
|
|
10
10
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
11
11
|
import { domainToASCII, domainToUnicode } from "node:url";
|
|
12
12
|
|
|
@@ -72,9 +72,7 @@ function getActorClassByTypeName(typeName) {
|
|
|
72
72
|
* @since 0.4.0
|
|
73
73
|
*/
|
|
74
74
|
async function getActorHandle(actor, options = {}) {
|
|
75
|
-
|
|
76
|
-
const tracer = tracerProvider.getTracer(deno_default.name, deno_default.version);
|
|
77
|
-
return await tracer.startActiveSpan("activitypub.get_actor_handle", async (span) => {
|
|
75
|
+
return await (options.tracerProvider ?? trace.getTracerProvider()).getTracer(deno_default.name, deno_default.version).startActiveSpan("activitypub.get_actor_handle", async (span) => {
|
|
78
76
|
if (isActor(actor)) {
|
|
79
77
|
if (actor.id != null) span.setAttribute("activitypub.actor.id", actor.id.href);
|
|
80
78
|
span.setAttribute("activitypub.actor.type", getTypeId(actor).href);
|
|
@@ -105,8 +103,7 @@ async function getActorHandleInternal(actor, options = {}) {
|
|
|
105
103
|
for (const alias of aliases) {
|
|
106
104
|
const match = alias.match(/^acct:([^@]+)@([^@]+)$/);
|
|
107
105
|
if (match != null) {
|
|
108
|
-
|
|
109
|
-
if (hostname !== actorId.hostname && !await verifyCrossOriginActorHandle(actorId.href, alias, options.userAgent, options.tracerProvider)) continue;
|
|
106
|
+
if (new URL(`https://${match[2]}/`).hostname !== actorId.hostname && !await verifyCrossOriginActorHandle(actorId.href, alias, options.userAgent, options.tracerProvider)) continue;
|
|
110
107
|
return normalizeActorHandle(`@${match[1]}@${match[2]}`, options);
|
|
111
108
|
}
|
|
112
109
|
}
|