@fedify/fedify 2.2.0-pr.715.28 → 2.2.0-pr.731.34
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/assert_strict_equals-Dmjbg-bA.mjs +41 -0
- package/dist/{builder-BfmqkrIE.mjs → builder-OFkoAQ85.mjs} +3 -3
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/outgoing-jsonld.test.d.mts +2 -0
- package/dist/compat/outgoing-jsonld.test.mjs +189 -0
- package/dist/compat/public-audience.test.d.mts +2 -0
- package/dist/compat/public-audience.test.mjs +178 -0
- package/dist/compat/transformers.test.mjs +3 -3
- package/dist/{context-BGrYMSTk.d.ts → context-BzH2-ajs.d.ts} +22 -0
- package/dist/{context-CMUd4wy0.d.cts → context-DJGagtNd.d.cts} +22 -0
- package/dist/{deno-CjZGHpS5.mjs → deno-BYRjHaeb.mjs} +1 -1
- package/dist/{docloader-Du9_2PyA.mjs → docloader-CuVh02a1.mjs} +2 -2
- package/dist/federation/builder.test.mjs +3 -3
- package/dist/federation/collection.test.mjs +2 -2
- package/dist/federation/handler.test.mjs +8 -8
- package/dist/federation/idempotency.test.mjs +5 -5
- package/dist/federation/inbox.test.mjs +1 -1
- package/dist/federation/keycache.test.mjs +3 -3
- package/dist/federation/kv.test.mjs +2 -2
- package/dist/federation/middleware.test.mjs +160 -10
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.d.cts +2 -2
- package/dist/federation/mod.d.ts +2 -2
- package/dist/federation/mod.js +1 -1
- package/dist/federation/mq.test.mjs +17 -10
- package/dist/federation/negotiation.test.mjs +3 -3
- package/dist/federation/retry.test.mjs +1 -1
- package/dist/federation/router.test.mjs +2 -2
- package/dist/federation/send.test.mjs +6 -6
- package/dist/federation/webfinger.test.mjs +3 -3
- package/dist/{http-9zjtsC0n.mjs → http-BrVfkREl.mjs} +3 -3
- package/dist/{http-Wm7tvhRa.cjs → http-H-4FzBb3.cjs} +1 -1
- package/dist/{http-C8puyZ4Z.js → http-pZce7PcA.js} +1 -1
- package/dist/{key-CMhIdO1-.mjs → key-cK-YTNKa.mjs} +1 -1
- package/dist/{kv-cache-BTq6qqgJ.js → kv-cache-CjweM0Am.js} +1 -1
- package/dist/{kv-cache-DyRjARFV.cjs → kv-cache-NgzTkTjv.cjs} +1 -1
- package/dist/{ld-BH-6muxq.mjs → ld-SXDkzuUo.mjs} +2 -2
- package/dist/{middleware-CO5RpqOP.mjs → middleware-AqjYcDmu.mjs} +1 -1
- package/dist/{middleware-DBgitte6.mjs → middleware-BMePykoo.mjs} +34 -22
- package/dist/{middleware-D3S_Ctwx.cjs → middleware-CXhCkBG4.cjs} +1 -1
- package/dist/{middleware-C_CRggCg.cjs → middleware-TZHT1gKk.cjs} +20 -9
- package/dist/{middleware-Da-j6H9U.js → middleware-YcQIUUHs.js} +19 -8
- package/dist/{mod-CJXfyw7v.d.ts → mod-2d12ffz3.d.ts} +1 -1
- package/dist/{mod-BcJHeuv1.d.cts → mod-D35TRn09.d.cts} +1 -1
- package/dist/mod.cjs +4 -4
- package/dist/mod.d.cts +2 -2
- package/dist/mod.d.ts +2 -2
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/client.test.mjs +2 -2
- package/dist/nodeinfo/handler.test.mjs +3 -3
- package/dist/nodeinfo/types.test.mjs +2 -2
- package/dist/otel/exporter.test.mjs +2 -2
- package/dist/outgoing-jsonld-CNmZLixq.mjs +203 -0
- package/dist/{owner-CE5FwvNR.mjs → owner-Cudh-ej0.mjs} +2 -2
- package/dist/{proof-jHDv7IKD.js → proof-BJrEACyu.js} +425 -41
- package/dist/{proof-D-HuDCQe.cjs → proof-CFERN43j.cjs} +428 -38
- package/dist/{proof-Ds3T1-sE.mjs → proof-DC69vtxY.mjs} +38 -31
- package/dist/public-audience-DYFHzm_c.mjs +192 -0
- package/dist/{send-TicMA6nJ.mjs → send-BBRG1CKC.mjs} +2 -2
- package/dist/sig/accept.test.mjs +1 -1
- package/dist/sig/http.test.mjs +5 -5
- package/dist/sig/key.test.mjs +3 -3
- package/dist/sig/ld.test.mjs +4 -4
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +4 -4
- package/dist/sig/proof.test.mjs +78 -5
- package/dist/{std__assert-Duiq_YC9.mjs → std__assert-CRDpx_HF.mjs} +3 -38
- package/dist/testing/mod.d.mts +22 -0
- package/dist/utils/docloader.test.mjs +4 -4
- package/dist/utils/kv-cache.test.mjs +1 -1
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +5 -5
- /package/dist/{accept-Dd__NiUL.mjs → accept-CPkZzmGN.mjs} +0 -0
- /package/dist/{activity-listener-Ck3JZ_hR.mjs → activity-listener-ell7W1s9.mjs} +0 -0
- /package/dist/{assert-ddO5KLpe.mjs → assert-DikXweDx.mjs} +0 -0
- /package/dist/{client-DEpOVgY1.mjs → client-D_1QpnWt.mjs} +0 -0
- /package/dist/{collection-BD6-SZ6O.mjs → collection-D-HqUuA2.mjs} +0 -0
- /package/dist/{keycache-CCSwkQcY.mjs → keycache-EGATflN-.mjs} +0 -0
- /package/dist/{keys-BAK-tUlf.mjs → keys-DGu1NFwu.mjs} +0 -0
- /package/dist/{kv-cache-B01V7s3h.mjs → kv-cache-U__xU4qR.mjs} +0 -0
- /package/dist/{kv-tL2TOE9X.mjs → kv-rV3vodCc.mjs} +0 -0
- /package/dist/{negotiation-DnsfFF8I.mjs → negotiation-SQvQgUqe.mjs} +0 -0
- /package/dist/{retry-B_E3V_Dx.mjs → retry-bMXBL97A.mjs} +0 -0
- /package/dist/{types-DCP0WLdt.mjs → types-J53Kw7so.mjs} +0 -0
|
@@ -2,23 +2,24 @@ import { Temporal } from "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { n as RouterError } from "./router-CrMLXoOr.mjs";
|
|
5
|
-
import { n as version, t as name } from "./deno-
|
|
6
|
-
import { t as formatAcceptSignature } from "./accept-
|
|
7
|
-
import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-
|
|
8
|
-
import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-
|
|
9
|
-
import { t as getAuthenticatedDocumentLoader } from "./docloader-
|
|
10
|
-
import { n as kvCache } from "./kv-cache-
|
|
11
|
-
import { a as signJsonLd, i as hasSignatureLike, o as verifyJsonLd, r as detachSignature } from "./ld-
|
|
12
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import { t as
|
|
21
|
-
import {
|
|
5
|
+
import { n as version, t as name } from "./deno-BYRjHaeb.mjs";
|
|
6
|
+
import { t as formatAcceptSignature } from "./accept-CPkZzmGN.mjs";
|
|
7
|
+
import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-cK-YTNKa.mjs";
|
|
8
|
+
import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-BrVfkREl.mjs";
|
|
9
|
+
import { t as getAuthenticatedDocumentLoader } from "./docloader-CuVh02a1.mjs";
|
|
10
|
+
import { n as kvCache } from "./kv-cache-U__xU4qR.mjs";
|
|
11
|
+
import { a as signJsonLd, i as hasSignatureLike, o as verifyJsonLd, r as detachSignature } from "./ld-SXDkzuUo.mjs";
|
|
12
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-Cudh-ej0.mjs";
|
|
13
|
+
import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-CNmZLixq.mjs";
|
|
14
|
+
import { i as verifyObject, n as hasProofLike, r as signObject } from "./proof-DC69vtxY.mjs";
|
|
15
|
+
import { t as getNodeInfo } from "./client-D_1QpnWt.mjs";
|
|
16
|
+
import { t as nodeInfoToJson } from "./types-J53Kw7so.mjs";
|
|
17
|
+
import { t as FederationBuilderImpl } from "./builder-OFkoAQ85.mjs";
|
|
18
|
+
import { t as buildCollectionSynchronizationHeader } from "./collection-D-HqUuA2.mjs";
|
|
19
|
+
import { t as KvKeyCache } from "./keycache-EGATflN-.mjs";
|
|
20
|
+
import { t as acceptsJsonLd } from "./negotiation-SQvQgUqe.mjs";
|
|
21
|
+
import { t as createExponentialBackoffPolicy } from "./retry-bMXBL97A.mjs";
|
|
22
|
+
import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-BBRG1CKC.mjs";
|
|
22
23
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, Tombstone, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
23
24
|
import { lookupWebFinger } from "@fedify/webfinger";
|
|
24
25
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
@@ -1951,6 +1952,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
1951
1952
|
await this.sendActivity(keys, message.inboxes, activity, {
|
|
1952
1953
|
collectionSync: message.collectionSync,
|
|
1953
1954
|
orderingKey: message.orderingKey,
|
|
1955
|
+
normalizeExistingProofs: message.normalizeExistingProofs,
|
|
1954
1956
|
context
|
|
1955
1957
|
});
|
|
1956
1958
|
}
|
|
@@ -2235,6 +2237,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2235
2237
|
else if (keys.length < 1) throw new TypeError("The keys must not be empty.");
|
|
2236
2238
|
const contextLoader = this.contextLoaderFactory(this.#getLoaderOptions(ctx.origin));
|
|
2237
2239
|
const activityId = activity.id.href;
|
|
2240
|
+
let hasProof = false;
|
|
2238
2241
|
let proofCreated = false;
|
|
2239
2242
|
let rsaKey = null;
|
|
2240
2243
|
for (const { keyId, privateKey } of keys) {
|
|
@@ -2245,15 +2248,16 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2245
2248
|
};
|
|
2246
2249
|
}
|
|
2247
2250
|
for await (const _ of activity.getProofs({ contextLoader })) {
|
|
2248
|
-
|
|
2251
|
+
hasProof = true;
|
|
2249
2252
|
break;
|
|
2250
2253
|
}
|
|
2251
|
-
if (!
|
|
2254
|
+
if (!hasProof) {
|
|
2252
2255
|
for (const { keyId, privateKey } of keys) if (privateKey.algorithm.name === "Ed25519") {
|
|
2253
2256
|
activity = await signObject(activity, privateKey, keyId, {
|
|
2254
2257
|
contextLoader,
|
|
2255
2258
|
tracerProvider: this.tracerProvider
|
|
2256
2259
|
});
|
|
2260
|
+
hasProof = true;
|
|
2257
2261
|
proofCreated = true;
|
|
2258
2262
|
}
|
|
2259
2263
|
}
|
|
@@ -2261,6 +2265,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2261
2265
|
format: "compact",
|
|
2262
2266
|
contextLoader
|
|
2263
2267
|
});
|
|
2268
|
+
if (proofCreated || !hasProof || options.normalizeExistingProofs) jsonLd = await normalizeOutgoingActivityJsonLd(jsonLd, contextLoader);
|
|
2264
2269
|
if (rsaKey == null) logger.warn("No supported key found to create a Linked Data signature for the activity {activityId}. The activity will be sent without a Linked Data signature. In order to create a Linked Data signature, at least one RSASSA-PKCS1-v1_5 key must be provided.", {
|
|
2265
2270
|
activityId,
|
|
2266
2271
|
keys: keys.map((pair) => ({
|
|
@@ -2272,7 +2277,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2272
2277
|
contextLoader,
|
|
2273
2278
|
tracerProvider: this.tracerProvider
|
|
2274
2279
|
});
|
|
2275
|
-
if (!
|
|
2280
|
+
if (!hasProof) logger.warn("No supported key found to create a proof for the activity {activityId}. The activity will be sent without a proof. In order to create a proof, at least one Ed25519 key must be provided.", {
|
|
2276
2281
|
activityId,
|
|
2277
2282
|
keys: keys.map((pair) => ({
|
|
2278
2283
|
keyId: pair.keyId.href,
|
|
@@ -3069,7 +3074,8 @@ var ContextImpl = class ContextImpl {
|
|
|
3069
3074
|
context: this,
|
|
3070
3075
|
orderingKey: options.orderingKey,
|
|
3071
3076
|
collectionSync,
|
|
3072
|
-
immediate: options.immediate
|
|
3077
|
+
immediate: options.immediate,
|
|
3078
|
+
normalizeExistingProofs: options.normalizeExistingProofs
|
|
3073
3079
|
};
|
|
3074
3080
|
span.setAttribute("activitypub.inboxes", expandedRecipients.length);
|
|
3075
3081
|
for (const activityTransformer of this.federation.activityTransformers) activity = activityTransformer(activity, this);
|
|
@@ -3081,6 +3087,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3081
3087
|
});
|
|
3082
3088
|
throw new TypeError("The activity to send must have at least one actor property.");
|
|
3083
3089
|
}
|
|
3090
|
+
let proofCreated = false;
|
|
3084
3091
|
if (actorKeyPairs != null) {
|
|
3085
3092
|
const contextLoader = this.contextLoader;
|
|
3086
3093
|
for (const kp of actorKeyPairs) {
|
|
@@ -3089,6 +3096,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3089
3096
|
contextLoader,
|
|
3090
3097
|
tracerProvider: this.tracerProvider
|
|
3091
3098
|
});
|
|
3099
|
+
proofCreated = true;
|
|
3092
3100
|
}
|
|
3093
3101
|
}
|
|
3094
3102
|
const inboxes = extractInboxes({
|
|
@@ -3109,7 +3117,10 @@ var ContextImpl = class ContextImpl {
|
|
|
3109
3117
|
activity
|
|
3110
3118
|
});
|
|
3111
3119
|
if (this.federation.fanoutQueue == null || options.immediate || options.fanout === "skip" || (options.fanout ?? "auto") === "auto" && globalThis.Object.keys(inboxes).length < FANOUT_THRESHOLD) {
|
|
3112
|
-
await this.federation.sendActivity(keys, inboxes, activity,
|
|
3120
|
+
await this.federation.sendActivity(keys, inboxes, activity, {
|
|
3121
|
+
...opts,
|
|
3122
|
+
normalizeExistingProofs: proofCreated || options.normalizeExistingProofs
|
|
3123
|
+
});
|
|
3113
3124
|
return true;
|
|
3114
3125
|
}
|
|
3115
3126
|
const keyJwkPairs = await Promise.all(keys.map(async ({ keyId, privateKey }) => ({
|
|
@@ -3135,6 +3146,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3135
3146
|
activityType: getTypeId(activity).href,
|
|
3136
3147
|
collectionSync: opts.collectionSync,
|
|
3137
3148
|
orderingKey: options.orderingKey,
|
|
3149
|
+
normalizeExistingProofs: proofCreated || options.normalizeExistingProofs,
|
|
3138
3150
|
traceContext: carrier
|
|
3139
3151
|
};
|
|
3140
3152
|
if (!this.federation.manuallyStartQueue) this.federation._startQueueInternal(this.data);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
|
-
const require_middleware = require("./middleware-
|
|
3
|
+
const require_middleware = require("./middleware-TZHT1gKk.cjs");
|
|
4
4
|
exports.FederationImpl = require_middleware.FederationImpl;
|
|
@@ -2,10 +2,10 @@ const { Temporal } = require("@js-temporal/polyfill");
|
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
require("./chunk-DDcVe30Y.cjs");
|
|
4
4
|
const require_transformers = require("./transformers-NeAONrAq.cjs");
|
|
5
|
-
const require_http = require("./http-
|
|
6
|
-
const require_proof = require("./proof-
|
|
5
|
+
const require_http = require("./http-H-4FzBb3.cjs");
|
|
6
|
+
const require_proof = require("./proof-CFERN43j.cjs");
|
|
7
7
|
const require_types = require("./types-KC4QAoxe.cjs");
|
|
8
|
-
const require_kv_cache = require("./kv-cache-
|
|
8
|
+
const require_kv_cache = require("./kv-cache-NgzTkTjv.cjs");
|
|
9
9
|
let _logtape_logtape = require("@logtape/logtape");
|
|
10
10
|
let _fedify_vocab = require("@fedify/vocab");
|
|
11
11
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
@@ -210,7 +210,7 @@ var FederationBuilderImpl = class {
|
|
|
210
210
|
this.collectionTypeIds = {};
|
|
211
211
|
}
|
|
212
212
|
async build(options) {
|
|
213
|
-
const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-
|
|
213
|
+
const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-CXhCkBG4.cjs"));
|
|
214
214
|
const f = new FederationImpl(options);
|
|
215
215
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
216
216
|
f.router = this.router.clone();
|
|
@@ -2973,6 +2973,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2973
2973
|
await this.sendActivity(keys, message.inboxes, activity, {
|
|
2974
2974
|
collectionSync: message.collectionSync,
|
|
2975
2975
|
orderingKey: message.orderingKey,
|
|
2976
|
+
normalizeExistingProofs: message.normalizeExistingProofs,
|
|
2976
2977
|
context
|
|
2977
2978
|
});
|
|
2978
2979
|
}
|
|
@@ -3257,6 +3258,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
3257
3258
|
else if (keys.length < 1) throw new TypeError("The keys must not be empty.");
|
|
3258
3259
|
const contextLoader = this.contextLoaderFactory(this.#getLoaderOptions(ctx.origin));
|
|
3259
3260
|
const activityId = activity.id.href;
|
|
3261
|
+
let hasProof = false;
|
|
3260
3262
|
let proofCreated = false;
|
|
3261
3263
|
let rsaKey = null;
|
|
3262
3264
|
for (const { keyId, privateKey } of keys) {
|
|
@@ -3267,15 +3269,16 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
3267
3269
|
};
|
|
3268
3270
|
}
|
|
3269
3271
|
for await (const _ of activity.getProofs({ contextLoader })) {
|
|
3270
|
-
|
|
3272
|
+
hasProof = true;
|
|
3271
3273
|
break;
|
|
3272
3274
|
}
|
|
3273
|
-
if (!
|
|
3275
|
+
if (!hasProof) {
|
|
3274
3276
|
for (const { keyId, privateKey } of keys) if (privateKey.algorithm.name === "Ed25519") {
|
|
3275
3277
|
activity = await require_proof.signObject(activity, privateKey, keyId, {
|
|
3276
3278
|
contextLoader,
|
|
3277
3279
|
tracerProvider: this.tracerProvider
|
|
3278
3280
|
});
|
|
3281
|
+
hasProof = true;
|
|
3279
3282
|
proofCreated = true;
|
|
3280
3283
|
}
|
|
3281
3284
|
}
|
|
@@ -3283,6 +3286,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
3283
3286
|
format: "compact",
|
|
3284
3287
|
contextLoader
|
|
3285
3288
|
});
|
|
3289
|
+
if (proofCreated || !hasProof || options.normalizeExistingProofs) jsonLd = await require_proof.normalizeOutgoingActivityJsonLd(jsonLd, contextLoader);
|
|
3286
3290
|
if (rsaKey == null) logger.warn("No supported key found to create a Linked Data signature for the activity {activityId}. The activity will be sent without a Linked Data signature. In order to create a Linked Data signature, at least one RSASSA-PKCS1-v1_5 key must be provided.", {
|
|
3287
3291
|
activityId,
|
|
3288
3292
|
keys: keys.map((pair) => ({
|
|
@@ -3294,7 +3298,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
3294
3298
|
contextLoader,
|
|
3295
3299
|
tracerProvider: this.tracerProvider
|
|
3296
3300
|
});
|
|
3297
|
-
if (!
|
|
3301
|
+
if (!hasProof) logger.warn("No supported key found to create a proof for the activity {activityId}. The activity will be sent without a proof. In order to create a proof, at least one Ed25519 key must be provided.", {
|
|
3298
3302
|
activityId,
|
|
3299
3303
|
keys: keys.map((pair) => ({
|
|
3300
3304
|
keyId: pair.keyId.href,
|
|
@@ -4091,7 +4095,8 @@ var ContextImpl = class ContextImpl {
|
|
|
4091
4095
|
context: this,
|
|
4092
4096
|
orderingKey: options.orderingKey,
|
|
4093
4097
|
collectionSync,
|
|
4094
|
-
immediate: options.immediate
|
|
4098
|
+
immediate: options.immediate,
|
|
4099
|
+
normalizeExistingProofs: options.normalizeExistingProofs
|
|
4095
4100
|
};
|
|
4096
4101
|
span.setAttribute("activitypub.inboxes", expandedRecipients.length);
|
|
4097
4102
|
for (const activityTransformer of this.federation.activityTransformers) activity = activityTransformer(activity, this);
|
|
@@ -4103,6 +4108,7 @@ var ContextImpl = class ContextImpl {
|
|
|
4103
4108
|
});
|
|
4104
4109
|
throw new TypeError("The activity to send must have at least one actor property.");
|
|
4105
4110
|
}
|
|
4111
|
+
let proofCreated = false;
|
|
4106
4112
|
if (actorKeyPairs != null) {
|
|
4107
4113
|
const contextLoader = this.contextLoader;
|
|
4108
4114
|
for (const kp of actorKeyPairs) {
|
|
@@ -4111,6 +4117,7 @@ var ContextImpl = class ContextImpl {
|
|
|
4111
4117
|
contextLoader,
|
|
4112
4118
|
tracerProvider: this.tracerProvider
|
|
4113
4119
|
});
|
|
4120
|
+
proofCreated = true;
|
|
4114
4121
|
}
|
|
4115
4122
|
}
|
|
4116
4123
|
const inboxes = extractInboxes({
|
|
@@ -4131,7 +4138,10 @@ var ContextImpl = class ContextImpl {
|
|
|
4131
4138
|
activity
|
|
4132
4139
|
});
|
|
4133
4140
|
if (this.federation.fanoutQueue == null || options.immediate || options.fanout === "skip" || (options.fanout ?? "auto") === "auto" && globalThis.Object.keys(inboxes).length < FANOUT_THRESHOLD) {
|
|
4134
|
-
await this.federation.sendActivity(keys, inboxes, activity,
|
|
4141
|
+
await this.federation.sendActivity(keys, inboxes, activity, {
|
|
4142
|
+
...opts,
|
|
4143
|
+
normalizeExistingProofs: proofCreated || options.normalizeExistingProofs
|
|
4144
|
+
});
|
|
4135
4145
|
return true;
|
|
4136
4146
|
}
|
|
4137
4147
|
const keyJwkPairs = await Promise.all(keys.map(async ({ keyId, privateKey }) => ({
|
|
@@ -4157,6 +4167,7 @@ var ContextImpl = class ContextImpl {
|
|
|
4157
4167
|
activityType: (0, _fedify_vocab.getTypeId)(activity).href,
|
|
4158
4168
|
collectionSync: opts.collectionSync,
|
|
4159
4169
|
orderingKey: options.orderingKey,
|
|
4170
|
+
normalizeExistingProofs: proofCreated || options.normalizeExistingProofs,
|
|
4160
4171
|
traceContext: carrier
|
|
4161
4172
|
};
|
|
4162
4173
|
if (!this.federation.manuallyStartQueue) this.federation._startQueueInternal(this.data);
|
|
@@ -2,10 +2,10 @@ import { Temporal } from "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
import { t as __exportAll } from "./chunk-nlSIicah.js";
|
|
4
4
|
import { r as getDefaultActivityTransformers } from "./transformers-ve6e2xcg.js";
|
|
5
|
-
import { _ as version, a as verifyRequestDetailed, d as validateCryptoKey, f as formatAcceptSignature, g as name, i as verifyRequest, n as parseRfc9421SignatureInput, o as exportJwk, t as doubleKnock, u as importJwk } from "./http-
|
|
6
|
-
import { d as
|
|
5
|
+
import { _ as version, a as verifyRequestDetailed, d as validateCryptoKey, f as formatAcceptSignature, g as name, i as verifyRequest, n as parseRfc9421SignatureInput, o as exportJwk, t as doubleKnock, u as importJwk } from "./http-pZce7PcA.js";
|
|
6
|
+
import { c as getKeyOwner, d as detachSignature, f as hasSignatureLike, i as verifyObject, m as verifyJsonLd, n as hasProofLike, o as normalizeOutgoingActivityJsonLd, p as signJsonLd, r as signObject, s as doesActorOwnKey } from "./proof-BJrEACyu.js";
|
|
7
7
|
import { n as getNodeInfo, t as nodeInfoToJson } from "./types-hvL8ElAs.js";
|
|
8
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
8
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CjweM0Am.js";
|
|
9
9
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
10
10
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, Tombstone, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
11
11
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
@@ -2981,6 +2981,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2981
2981
|
await this.sendActivity(keys, message.inboxes, activity, {
|
|
2982
2982
|
collectionSync: message.collectionSync,
|
|
2983
2983
|
orderingKey: message.orderingKey,
|
|
2984
|
+
normalizeExistingProofs: message.normalizeExistingProofs,
|
|
2984
2985
|
context
|
|
2985
2986
|
});
|
|
2986
2987
|
}
|
|
@@ -3265,6 +3266,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
3265
3266
|
else if (keys.length < 1) throw new TypeError("The keys must not be empty.");
|
|
3266
3267
|
const contextLoader = this.contextLoaderFactory(this.#getLoaderOptions(ctx.origin));
|
|
3267
3268
|
const activityId = activity.id.href;
|
|
3269
|
+
let hasProof = false;
|
|
3268
3270
|
let proofCreated = false;
|
|
3269
3271
|
let rsaKey = null;
|
|
3270
3272
|
for (const { keyId, privateKey } of keys) {
|
|
@@ -3275,15 +3277,16 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
3275
3277
|
};
|
|
3276
3278
|
}
|
|
3277
3279
|
for await (const _ of activity.getProofs({ contextLoader })) {
|
|
3278
|
-
|
|
3280
|
+
hasProof = true;
|
|
3279
3281
|
break;
|
|
3280
3282
|
}
|
|
3281
|
-
if (!
|
|
3283
|
+
if (!hasProof) {
|
|
3282
3284
|
for (const { keyId, privateKey } of keys) if (privateKey.algorithm.name === "Ed25519") {
|
|
3283
3285
|
activity = await signObject(activity, privateKey, keyId, {
|
|
3284
3286
|
contextLoader,
|
|
3285
3287
|
tracerProvider: this.tracerProvider
|
|
3286
3288
|
});
|
|
3289
|
+
hasProof = true;
|
|
3287
3290
|
proofCreated = true;
|
|
3288
3291
|
}
|
|
3289
3292
|
}
|
|
@@ -3291,6 +3294,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
3291
3294
|
format: "compact",
|
|
3292
3295
|
contextLoader
|
|
3293
3296
|
});
|
|
3297
|
+
if (proofCreated || !hasProof || options.normalizeExistingProofs) jsonLd = await normalizeOutgoingActivityJsonLd(jsonLd, contextLoader);
|
|
3294
3298
|
if (rsaKey == null) logger.warn("No supported key found to create a Linked Data signature for the activity {activityId}. The activity will be sent without a Linked Data signature. In order to create a Linked Data signature, at least one RSASSA-PKCS1-v1_5 key must be provided.", {
|
|
3295
3299
|
activityId,
|
|
3296
3300
|
keys: keys.map((pair) => ({
|
|
@@ -3302,7 +3306,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
3302
3306
|
contextLoader,
|
|
3303
3307
|
tracerProvider: this.tracerProvider
|
|
3304
3308
|
});
|
|
3305
|
-
if (!
|
|
3309
|
+
if (!hasProof) logger.warn("No supported key found to create a proof for the activity {activityId}. The activity will be sent without a proof. In order to create a proof, at least one Ed25519 key must be provided.", {
|
|
3306
3310
|
activityId,
|
|
3307
3311
|
keys: keys.map((pair) => ({
|
|
3308
3312
|
keyId: pair.keyId.href,
|
|
@@ -4099,7 +4103,8 @@ var ContextImpl = class ContextImpl {
|
|
|
4099
4103
|
context: this,
|
|
4100
4104
|
orderingKey: options.orderingKey,
|
|
4101
4105
|
collectionSync,
|
|
4102
|
-
immediate: options.immediate
|
|
4106
|
+
immediate: options.immediate,
|
|
4107
|
+
normalizeExistingProofs: options.normalizeExistingProofs
|
|
4103
4108
|
};
|
|
4104
4109
|
span.setAttribute("activitypub.inboxes", expandedRecipients.length);
|
|
4105
4110
|
for (const activityTransformer of this.federation.activityTransformers) activity = activityTransformer(activity, this);
|
|
@@ -4111,6 +4116,7 @@ var ContextImpl = class ContextImpl {
|
|
|
4111
4116
|
});
|
|
4112
4117
|
throw new TypeError("The activity to send must have at least one actor property.");
|
|
4113
4118
|
}
|
|
4119
|
+
let proofCreated = false;
|
|
4114
4120
|
if (actorKeyPairs != null) {
|
|
4115
4121
|
const contextLoader = this.contextLoader;
|
|
4116
4122
|
for (const kp of actorKeyPairs) {
|
|
@@ -4119,6 +4125,7 @@ var ContextImpl = class ContextImpl {
|
|
|
4119
4125
|
contextLoader,
|
|
4120
4126
|
tracerProvider: this.tracerProvider
|
|
4121
4127
|
});
|
|
4128
|
+
proofCreated = true;
|
|
4122
4129
|
}
|
|
4123
4130
|
}
|
|
4124
4131
|
const inboxes = extractInboxes({
|
|
@@ -4139,7 +4146,10 @@ var ContextImpl = class ContextImpl {
|
|
|
4139
4146
|
activity
|
|
4140
4147
|
});
|
|
4141
4148
|
if (this.federation.fanoutQueue == null || options.immediate || options.fanout === "skip" || (options.fanout ?? "auto") === "auto" && globalThis.Object.keys(inboxes).length < FANOUT_THRESHOLD) {
|
|
4142
|
-
await this.federation.sendActivity(keys, inboxes, activity,
|
|
4149
|
+
await this.federation.sendActivity(keys, inboxes, activity, {
|
|
4150
|
+
...opts,
|
|
4151
|
+
normalizeExistingProofs: proofCreated || options.normalizeExistingProofs
|
|
4152
|
+
});
|
|
4143
4153
|
return true;
|
|
4144
4154
|
}
|
|
4145
4155
|
const keyJwkPairs = await Promise.all(keys.map(async ({ keyId, privateKey }) => ({
|
|
@@ -4165,6 +4175,7 @@ var ContextImpl = class ContextImpl {
|
|
|
4165
4175
|
activityType: getTypeId(activity).href,
|
|
4166
4176
|
collectionSync: opts.collectionSync,
|
|
4167
4177
|
orderingKey: options.orderingKey,
|
|
4178
|
+
normalizeExistingProofs: proofCreated || options.normalizeExistingProofs,
|
|
4168
4179
|
traceContext: carrier
|
|
4169
4180
|
};
|
|
4170
4181
|
if (!this.federation.manuallyStartQueue) this.federation._startQueueInternal(this.data);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { $ as ActorAliasMapper, St as WebFingerLinksDispatcher, et as ActorDispatcher, l as RequestContext, tt as ActorHandleMapper } from "./context-
|
|
3
|
+
import { $ as ActorAliasMapper, St as WebFingerLinksDispatcher, et as ActorDispatcher, l as RequestContext, tt as ActorHandleMapper } from "./context-BzH2-ajs.js";
|
|
4
4
|
import { Span, Tracer } from "@opentelemetry/api";
|
|
5
5
|
|
|
6
6
|
//#region src/federation/webfinger.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as ActorAliasMapper, St as WebFingerLinksDispatcher, et as ActorDispatcher, l as RequestContext, tt as ActorHandleMapper } from "./context-
|
|
1
|
+
import { $ as ActorAliasMapper, St as WebFingerLinksDispatcher, et as ActorDispatcher, l as RequestContext, tt as ActorHandleMapper } from "./context-DJGagtNd.cjs";
|
|
2
2
|
import { Span, Tracer } from "@opentelemetry/api";
|
|
3
3
|
|
|
4
4
|
//#region src/federation/webfinger.d.ts
|
package/dist/mod.cjs
CHANGED
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
4
4
|
require("./chunk-DDcVe30Y.cjs");
|
|
5
5
|
const require_transformers = require("./transformers-NeAONrAq.cjs");
|
|
6
6
|
require("./compat/mod.cjs");
|
|
7
|
-
const require_http = require("./http-
|
|
8
|
-
const require_middleware = require("./middleware-
|
|
9
|
-
const require_proof = require("./proof-
|
|
7
|
+
const require_http = require("./http-H-4FzBb3.cjs");
|
|
8
|
+
const require_middleware = require("./middleware-TZHT1gKk.cjs");
|
|
9
|
+
const require_proof = require("./proof-CFERN43j.cjs");
|
|
10
10
|
const require_types = require("./types-KC4QAoxe.cjs");
|
|
11
|
-
const require_kv_cache = require("./kv-cache-
|
|
11
|
+
const require_kv_cache = require("./kv-cache-NgzTkTjv.cjs");
|
|
12
12
|
const require_federation_mod = require("./federation/mod.cjs");
|
|
13
13
|
require("./nodeinfo/mod.cjs");
|
|
14
14
|
require("./runtime/mod.cjs");
|
package/dist/mod.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-z-8dc-e1.cjs";
|
|
2
2
|
import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-CrGuipxe.cjs";
|
|
3
3
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-CptqhsOy.cjs";
|
|
4
|
-
import { $ as ActorAliasMapper, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as SendActivityError, D as ObjectCallbackSetters, Dt as digest, E as InboxListenerSetters, Et as buildCollectionSynchronizationHeader, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as ActivityTransformer, P as CreateExponentialBackoffPolicyOptions, Q as ParallelMessageQueue, R as Message, S as FederationStartQueueOptions, St as WebFingerLinksDispatcher, T as InboxChallengePolicy, Tt as PageItems, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueEnqueueOptions, Y as MessageQueue, Z as MessageQueueListenOptions, _ as Federatable, _t as OutboxListenerErrorHandler, a as GetSignedKeyOptions, at as CollectionCursor, b as FederationFetchOptions, bt as UnverifiedActivityHandler, c as ParseUriResult, ct as CustomCollectionCursor, d as SendActivityOptions, dt as InboxListener, et as ActorDispatcher, f as SendActivityOptionsForCollection, ft as NodeInfoDispatcher, g as CustomCollectionCallbackSetters, gt as OutboxListener, h as ConstructorWithTypeId, ht as OutboxErrorHandler, i as GetActorOptions, it as CollectionCounter, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as CustomCollectionDispatcher, m as CollectionCallbackSetters, mt as ObjectDispatcher, n as Context, nt as ActorKeyPairsDispatcher, o as InboxContext, ot as CollectionDispatcher, p as ActorCallbackSetters, pt as ObjectAuthorizePredicate, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as AuthorizePredicate, s as OutboxContext, st as CustomCollectionCounter, t as ActorKeyPair, tt as ActorHandleMapper, u as RouteActivityOptions, ut as InboxErrorHandler, v as Federation, vt as OutboxPermanentFailureHandler, w as IdempotencyStrategy, wt as SenderKeyPair, x as FederationOptions, xt as UnverifiedActivityReason, y as FederationBuilder, yt as SharedInboxKeyDispatcher, z as createFederationBuilder } from "./context-
|
|
4
|
+
import { $ as ActorAliasMapper, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as SendActivityError, D as ObjectCallbackSetters, Dt as digest, E as InboxListenerSetters, Et as buildCollectionSynchronizationHeader, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as ActivityTransformer, P as CreateExponentialBackoffPolicyOptions, Q as ParallelMessageQueue, R as Message, S as FederationStartQueueOptions, St as WebFingerLinksDispatcher, T as InboxChallengePolicy, Tt as PageItems, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueEnqueueOptions, Y as MessageQueue, Z as MessageQueueListenOptions, _ as Federatable, _t as OutboxListenerErrorHandler, a as GetSignedKeyOptions, at as CollectionCursor, b as FederationFetchOptions, bt as UnverifiedActivityHandler, c as ParseUriResult, ct as CustomCollectionCursor, d as SendActivityOptions, dt as InboxListener, et as ActorDispatcher, f as SendActivityOptionsForCollection, ft as NodeInfoDispatcher, g as CustomCollectionCallbackSetters, gt as OutboxListener, h as ConstructorWithTypeId, ht as OutboxErrorHandler, i as GetActorOptions, it as CollectionCounter, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as CustomCollectionDispatcher, m as CollectionCallbackSetters, mt as ObjectDispatcher, n as Context, nt as ActorKeyPairsDispatcher, o as InboxContext, ot as CollectionDispatcher, p as ActorCallbackSetters, pt as ObjectAuthorizePredicate, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as AuthorizePredicate, s as OutboxContext, st as CustomCollectionCounter, t as ActorKeyPair, tt as ActorHandleMapper, u as RouteActivityOptions, ut as InboxErrorHandler, v as Federation, vt as OutboxPermanentFailureHandler, w as IdempotencyStrategy, wt as SenderKeyPair, x as FederationOptions, xt as UnverifiedActivityReason, y as FederationBuilder, yt as SharedInboxKeyDispatcher, z as createFederationBuilder } from "./context-DJGagtNd.cjs";
|
|
5
5
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-CbLNp3zQ.cjs";
|
|
6
6
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
|
|
7
|
-
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-
|
|
7
|
+
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-D35TRn09.cjs";
|
|
8
8
|
import { _ as hasSignatureLike, a as createProof, b as verifySignature, c as verifyObject, d as SignJsonLdOptions, f as VerifyJsonLdOptions, g as detachSignature, h as createSignature, i as VerifyProofOptions, l as verifyProof, m as attachSignature, n as SignObjectOptions, o as hasProofLike, p as VerifySignatureOptions, r as VerifyObjectOptions, s as signObject, t as CreateProofOptions, u as CreateSignatureOptions, v as signJsonLd, y as verifyJsonLd } from "./mod-Cr3f-ACa.cjs";
|
|
9
9
|
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-CMEbIaNh.cjs";
|
|
10
10
|
export * from "@fedify/vocab-runtime";
|
package/dist/mod.d.ts
CHANGED
|
@@ -3,10 +3,10 @@ import { URLPattern } from "urlpattern-polyfill";
|
|
|
3
3
|
import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-AtlibPOU.js";
|
|
4
4
|
import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-aQzN9Ayi.js";
|
|
5
5
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-74ARJ5TL.js";
|
|
6
|
-
import { $ as ActorAliasMapper, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as SendActivityError, D as ObjectCallbackSetters, Dt as digest, E as InboxListenerSetters, Et as buildCollectionSynchronizationHeader, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as ActivityTransformer, P as CreateExponentialBackoffPolicyOptions, Q as ParallelMessageQueue, R as Message, S as FederationStartQueueOptions, St as WebFingerLinksDispatcher, T as InboxChallengePolicy, Tt as PageItems, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueEnqueueOptions, Y as MessageQueue, Z as MessageQueueListenOptions, _ as Federatable, _t as OutboxListenerErrorHandler, a as GetSignedKeyOptions, at as CollectionCursor, b as FederationFetchOptions, bt as UnverifiedActivityHandler, c as ParseUriResult, ct as CustomCollectionCursor, d as SendActivityOptions, dt as InboxListener, et as ActorDispatcher, f as SendActivityOptionsForCollection, ft as NodeInfoDispatcher, g as CustomCollectionCallbackSetters, gt as OutboxListener, h as ConstructorWithTypeId, ht as OutboxErrorHandler, i as GetActorOptions, it as CollectionCounter, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as CustomCollectionDispatcher, m as CollectionCallbackSetters, mt as ObjectDispatcher, n as Context, nt as ActorKeyPairsDispatcher, o as InboxContext, ot as CollectionDispatcher, p as ActorCallbackSetters, pt as ObjectAuthorizePredicate, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as AuthorizePredicate, s as OutboxContext, st as CustomCollectionCounter, t as ActorKeyPair, tt as ActorHandleMapper, u as RouteActivityOptions, ut as InboxErrorHandler, v as Federation, vt as OutboxPermanentFailureHandler, w as IdempotencyStrategy, wt as SenderKeyPair, x as FederationOptions, xt as UnverifiedActivityReason, y as FederationBuilder, yt as SharedInboxKeyDispatcher, z as createFederationBuilder } from "./context-
|
|
6
|
+
import { $ as ActorAliasMapper, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as SendActivityError, D as ObjectCallbackSetters, Dt as digest, E as InboxListenerSetters, Et as buildCollectionSynchronizationHeader, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as ActivityTransformer, P as CreateExponentialBackoffPolicyOptions, Q as ParallelMessageQueue, R as Message, S as FederationStartQueueOptions, St as WebFingerLinksDispatcher, T as InboxChallengePolicy, Tt as PageItems, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueEnqueueOptions, Y as MessageQueue, Z as MessageQueueListenOptions, _ as Federatable, _t as OutboxListenerErrorHandler, a as GetSignedKeyOptions, at as CollectionCursor, b as FederationFetchOptions, bt as UnverifiedActivityHandler, c as ParseUriResult, ct as CustomCollectionCursor, d as SendActivityOptions, dt as InboxListener, et as ActorDispatcher, f as SendActivityOptionsForCollection, ft as NodeInfoDispatcher, g as CustomCollectionCallbackSetters, gt as OutboxListener, h as ConstructorWithTypeId, ht as OutboxErrorHandler, i as GetActorOptions, it as CollectionCounter, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as CustomCollectionDispatcher, m as CollectionCallbackSetters, mt as ObjectDispatcher, n as Context, nt as ActorKeyPairsDispatcher, o as InboxContext, ot as CollectionDispatcher, p as ActorCallbackSetters, pt as ObjectAuthorizePredicate, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as AuthorizePredicate, s as OutboxContext, st as CustomCollectionCounter, t as ActorKeyPair, tt as ActorHandleMapper, u as RouteActivityOptions, ut as InboxErrorHandler, v as Federation, vt as OutboxPermanentFailureHandler, w as IdempotencyStrategy, wt as SenderKeyPair, x as FederationOptions, xt as UnverifiedActivityReason, y as FederationBuilder, yt as SharedInboxKeyDispatcher, z as createFederationBuilder } from "./context-BzH2-ajs.js";
|
|
7
7
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-GFYnFoOl.js";
|
|
8
8
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.js";
|
|
9
|
-
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-
|
|
9
|
+
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-2d12ffz3.js";
|
|
10
10
|
import { _ as hasSignatureLike, a as createProof, b as verifySignature, c as verifyObject, d as SignJsonLdOptions, f as VerifyJsonLdOptions, g as detachSignature, h as createSignature, i as VerifyProofOptions, l as verifyProof, m as attachSignature, n as SignObjectOptions, o as hasProofLike, p as VerifySignatureOptions, r as VerifyObjectOptions, s as signObject, t as CreateProofOptions, u as CreateSignatureOptions, v as signJsonLd, y as verifyJsonLd } from "./mod-CR8soWa9.js";
|
|
11
11
|
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-CLgIXe9w.js";
|
|
12
12
|
export * from "@fedify/vocab-runtime";
|
package/dist/mod.js
CHANGED
|
@@ -3,11 +3,11 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
import "./chunk-nlSIicah.js";
|
|
4
4
|
import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-ve6e2xcg.js";
|
|
5
5
|
import "./compat/mod.js";
|
|
6
|
-
import { a as verifyRequestDetailed, c as fetchKeyDetailed, f as formatAcceptSignature, h as validateAcceptSignature, i as verifyRequest, l as generateCryptoKeyPair, m as parseAcceptSignature, o as exportJwk, p as fulfillAcceptSignature, r as signRequest, s as fetchKey, u as importJwk } from "./http-
|
|
7
|
-
import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "./middleware-
|
|
8
|
-
import { a as verifyProof, c as
|
|
6
|
+
import { a as verifyRequestDetailed, c as fetchKeyDetailed, f as formatAcceptSignature, h as validateAcceptSignature, i as verifyRequest, l as generateCryptoKeyPair, m as parseAcceptSignature, o as exportJwk, p as fulfillAcceptSignature, r as signRequest, s as fetchKey, u as importJwk } from "./http-pZce7PcA.js";
|
|
7
|
+
import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "./middleware-YcQIUUHs.js";
|
|
8
|
+
import { a as verifyProof, c as getKeyOwner, d as detachSignature, f as hasSignatureLike, h as verifySignature, i as verifyObject, l as attachSignature, m as verifyJsonLd, n as hasProofLike, p as signJsonLd, r as signObject, s as doesActorOwnKey, t as createProof, u as createSignature } from "./proof-BJrEACyu.js";
|
|
9
9
|
import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-hvL8ElAs.js";
|
|
10
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CjweM0Am.js";
|
|
11
11
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation/mod.js";
|
|
12
12
|
import "./nodeinfo/mod.js";
|
|
13
13
|
import "./runtime/mod.js";
|
|
@@ -3,8 +3,8 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as esm_default } from "../esm-DVILvP5e.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
|
-
import "../std__assert-
|
|
7
|
-
import { a as parseProtocol, c as parseUsage, i as parseOutboundService, n as parseInboundService, o as parseServices, r as parseNodeInfo, s as parseSoftware, t as getNodeInfo } from "../client-
|
|
6
|
+
import "../std__assert-CRDpx_HF.mjs";
|
|
7
|
+
import { a as parseProtocol, c as parseUsage, i as parseOutboundService, n as parseInboundService, o as parseServices, r as parseNodeInfo, s as parseSoftware, t as getNodeInfo } from "../client-D_1QpnWt.mjs";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
//#region src/nodeinfo/client.test.ts
|
|
10
10
|
test("getNodeInfo()", async (t) => {
|
|
@@ -3,9 +3,9 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { r as createRequestContext } from "../context-Dk_tacqz.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
|
-
import "../std__assert-
|
|
7
|
-
import { t as MemoryKvStore } from "../kv-
|
|
8
|
-
import { _ as handleNodeInfoJrd, g as handleNodeInfo, o as createFederation } from "../middleware-
|
|
6
|
+
import "../std__assert-CRDpx_HF.mjs";
|
|
7
|
+
import { t as MemoryKvStore } from "../kv-rV3vodCc.mjs";
|
|
8
|
+
import { _ as handleNodeInfoJrd, g as handleNodeInfo, o as createFederation } from "../middleware-BMePykoo.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
//#region src/nodeinfo/handler.test.ts
|
|
11
11
|
test("handleNodeInfo()", async () => {
|
|
@@ -2,9 +2,9 @@ import "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
|
-
import "../std__assert-
|
|
5
|
+
import "../std__assert-CRDpx_HF.mjs";
|
|
6
6
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
7
|
-
import { t as nodeInfoToJson } from "../types-
|
|
7
|
+
import { t as nodeInfoToJson } from "../types-J53Kw7so.mjs";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
//#region src/nodeinfo/types.test.ts
|
|
10
10
|
test("nodeInfoToJson()", () => {
|
|
@@ -2,8 +2,8 @@ import { Temporal } from "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
|
-
import "../std__assert-
|
|
6
|
-
import { t as MemoryKvStore } from "../kv-
|
|
5
|
+
import "../std__assert-CRDpx_HF.mjs";
|
|
6
|
+
import { t as MemoryKvStore } from "../kv-rV3vodCc.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
import { SpanKind, SpanStatusCode, TraceFlags } from "@opentelemetry/api";
|
|
9
9
|
import { getLogger } from "@logtape/logtape";
|