@fedify/fedify 2.0.0-dev.241 → 2.0.0-dev.279
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/{builder-CR-ZQZJR.js → builder-B7WWCOdc.js} +3 -3
- package/dist/compat/mod.d.cts +2 -2
- package/dist/compat/mod.d.ts +2 -2
- package/dist/compat/transformers.test.js +11 -11
- package/dist/{context-C7vzWilY.d.ts → context-BNNWbaZL.d.ts} +51 -8
- package/dist/{context-Bns6uTJq.js → context-CZ5llAss.js} +12 -12
- package/dist/{context-CrB9RFy5.d.cts → context-D7JEVvXJ.d.cts} +51 -8
- package/dist/{deno-DOeSTfhz.js → deno-fe0u4LiE.js} +8 -2
- package/dist/{docloader-C1AGOQQm.js → docloader-C9Dmxf-K.js} +2 -2
- package/dist/federation/builder.test.js +3 -3
- package/dist/federation/handler.test.js +12 -12
- package/dist/federation/idempotency.test.js +11 -11
- package/dist/federation/inbox.test.js +2 -2
- package/dist/federation/middleware.test.js +63 -11
- package/dist/federation/mod.cjs +5 -5
- package/dist/federation/mod.d.cts +2 -2
- package/dist/federation/mod.d.ts +2 -2
- package/dist/federation/mod.js +5 -5
- package/dist/federation/mq.test.js +162 -10
- package/dist/federation/send.test.js +5 -5
- package/dist/federation/webfinger.test.js +12 -12
- package/dist/{federation-B431K2gm.cjs → federation-CE0CJ_0G.cjs} +94 -10
- package/dist/{federation-BbZwNNWj.js → federation-D6FVaeAR.js} +94 -10
- package/dist/{http-i8VdY2df.js → http-7r8B3dF_.js} +8 -2
- package/dist/{http-C1LrW2D3.cjs → http-DMi5iyiI.cjs} +8 -2
- package/dist/{http-DGkEl4mw.js → http-oCBlFLKT.js} +2 -2
- package/dist/{inbox-Cp87HRVs.js → inbox-Dm1rfkdg.js} +1 -1
- package/dist/{key-3_vbTfr8.js → key-BGzsKfpZ.js} +1 -1
- package/dist/{kv-cache-DOgKf8lH.cjs → kv-cache-C0AvpI7U.cjs} +1 -1
- package/dist/{kv-cache-B4CFgxYq.js → kv-cache-CETRZwoP.js} +1 -1
- package/dist/{ld-BQxhMgOJ.js → ld-BaO1-A5Y.js} +2 -2
- package/dist/{middleware-C52jAnyA.js → middleware-BDJNulB_.js} +4 -4
- package/dist/{middleware-DbwwSEOr.js → middleware-BlOT9luD.js} +65 -22
- package/dist/{middleware-D4Eexdig.cjs → middleware-C0Vj7vNo.cjs} +59 -16
- package/dist/{middleware-DZ-OdkE6.js → middleware-CnGBoMop.js} +11 -11
- package/dist/middleware-DT3JkH-g.cjs +12 -0
- package/dist/{middleware-ixha9m0b.js → middleware-R0w-WauH.js} +59 -16
- package/dist/{mod-0qnPv4EC.d.cts → mod-054TSUXs.d.cts} +1 -1
- package/dist/{mod-C3SOvTD1.d.ts → mod-BhDb3RBS.d.ts} +1 -1
- package/dist/{mod-D6pS5_xJ.d.cts → mod-C74sRHP8.d.cts} +1 -1
- package/dist/{mod-waqu-BL_.d.ts → mod-YpmzboJc.d.ts} +1 -1
- package/dist/mod.cjs +5 -5
- package/dist/mod.d.cts +3 -3
- package/dist/mod.d.ts +3 -3
- package/dist/mod.js +5 -5
- package/dist/nodeinfo/handler.test.js +12 -12
- package/dist/{owner-Bod8mCab.js → owner-BqIhDQWW.js} +1 -1
- package/dist/{proof-vG4ePLF2.js → proof-Cg6AAAWI.js} +1 -1
- package/dist/{proof--60Adidu.js → proof-DoHt7qrS.js} +2 -2
- package/dist/{proof-C8MAHWxQ.cjs → proof-vSvvLbTh.cjs} +1 -1
- package/dist/{send-B3fWpYN9.js → send-CO2ZYT96.js} +2 -2
- package/dist/sig/http.test.js +3 -3
- package/dist/sig/key.test.js +2 -2
- package/dist/sig/ld.test.js +3 -3
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.js +3 -3
- package/dist/sig/proof.test.js +3 -3
- package/dist/testing/mod.d.ts +23 -7
- package/dist/testing/mod.js +1 -1
- package/dist/utils/docloader.test.js +4 -4
- package/dist/utils/mod.cjs +2 -2
- package/dist/utils/mod.js +2 -2
- package/package.json +10 -8
- package/dist/middleware-XsmW-sAa.cjs +0 -12
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
const require_chunk = require('./chunk-DqRYRqnO.cjs');
|
|
6
6
|
const require_transformers = require('./transformers-BjBg6Lag.cjs');
|
|
7
|
-
const require_http = require('./http-
|
|
8
|
-
const require_proof = require('./proof-
|
|
7
|
+
const require_http = require('./http-DMi5iyiI.cjs');
|
|
8
|
+
const require_proof = require('./proof-vSvvLbTh.cjs');
|
|
9
9
|
const require_types = require('./types-B6z6CqIz.cjs');
|
|
10
|
-
const require_kv_cache = require('./kv-cache-
|
|
10
|
+
const require_kv_cache = require('./kv-cache-C0AvpI7U.cjs');
|
|
11
11
|
const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
|
12
12
|
const __fedify_vocab = require_chunk.__toESM(require("@fedify/vocab"));
|
|
13
13
|
const __opentelemetry_api = require_chunk.__toESM(require("@opentelemetry/api"));
|
|
@@ -338,7 +338,7 @@ var FederationBuilderImpl = class {
|
|
|
338
338
|
this.collectionTypeIds = {};
|
|
339
339
|
}
|
|
340
340
|
async build(options) {
|
|
341
|
-
const { FederationImpl: FederationImpl$1 } = await Promise.resolve().then(() => require("./middleware-
|
|
341
|
+
const { FederationImpl: FederationImpl$1 } = await Promise.resolve().then(() => require("./middleware-DT3JkH-g.cjs"));
|
|
342
342
|
const f = new FederationImpl$1(options);
|
|
343
343
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
344
344
|
f.router = this.router.clone();
|
|
@@ -2561,6 +2561,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2561
2561
|
}) });
|
|
2562
2562
|
await this.sendActivity(keys, message.inboxes, activity, {
|
|
2563
2563
|
collectionSync: message.collectionSync,
|
|
2564
|
+
orderingKey: message.orderingKey,
|
|
2564
2565
|
context: context$2
|
|
2565
2566
|
});
|
|
2566
2567
|
}
|
|
@@ -2809,7 +2810,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2809
2810
|
"federation",
|
|
2810
2811
|
"outbox"
|
|
2811
2812
|
]);
|
|
2812
|
-
const { immediate, collectionSync, context: ctx } = options;
|
|
2813
|
+
const { immediate, collectionSync, orderingKey, context: ctx } = options;
|
|
2813
2814
|
if (activity.id == null) throw new TypeError("The activity to send must have an id.");
|
|
2814
2815
|
if (activity.actorId == null) throw new TypeError("The activity to send must have at least one actor property.");
|
|
2815
2816
|
else if (keys.length < 1) throw new TypeError("The keys must not be empty.");
|
|
@@ -2897,6 +2898,8 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2897
2898
|
__opentelemetry_api.propagation.inject(__opentelemetry_api.context.active(), carrier);
|
|
2898
2899
|
const messages = [];
|
|
2899
2900
|
for (const inbox in inboxes) {
|
|
2901
|
+
const inboxOrigin = new URL(inbox).origin;
|
|
2902
|
+
const messageOrderingKey = orderingKey == null ? void 0 : `${orderingKey}\n${inboxOrigin}`;
|
|
2900
2903
|
const message = {
|
|
2901
2904
|
type: "outbox",
|
|
2902
2905
|
id: crypto.randomUUID(),
|
|
@@ -2910,13 +2913,29 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2910
2913
|
started: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2911
2914
|
attempt: 0,
|
|
2912
2915
|
headers: collectionSync == null ? {} : { "Collection-Synchronization": await buildCollectionSynchronizationHeader(collectionSync, inboxes[inbox].actorIds) },
|
|
2916
|
+
orderingKey: messageOrderingKey,
|
|
2913
2917
|
traceContext: carrier
|
|
2914
2918
|
};
|
|
2915
|
-
messages.push(
|
|
2919
|
+
messages.push({
|
|
2920
|
+
message,
|
|
2921
|
+
orderingKey: messageOrderingKey
|
|
2922
|
+
});
|
|
2916
2923
|
}
|
|
2917
2924
|
const { outboxQueue } = this;
|
|
2918
2925
|
if (outboxQueue.enqueueMany == null) {
|
|
2919
|
-
const promises = messages.map((m) => outboxQueue.enqueue(m));
|
|
2926
|
+
const promises = messages.map((m) => outboxQueue.enqueue(m.message, { orderingKey: m.orderingKey }));
|
|
2927
|
+
const results = await Promise.allSettled(promises);
|
|
2928
|
+
const errors = results.filter((r) => r.status === "rejected").map((r) => r.reason);
|
|
2929
|
+
if (errors.length > 0) {
|
|
2930
|
+
logger$1.error("Failed to enqueue activity {activityId} to send later: {errors}", {
|
|
2931
|
+
activityId: activity.id.href,
|
|
2932
|
+
errors
|
|
2933
|
+
});
|
|
2934
|
+
if (errors.length > 1) throw new AggregateError(errors, `Failed to enqueue activity ${activityId} to send later.`);
|
|
2935
|
+
throw errors[0];
|
|
2936
|
+
}
|
|
2937
|
+
} else if (orderingKey != null) {
|
|
2938
|
+
const promises = messages.map((m) => outboxQueue.enqueue(m.message, { orderingKey: m.orderingKey }));
|
|
2920
2939
|
const results = await Promise.allSettled(promises);
|
|
2921
2940
|
const errors = results.filter((r) => r.status === "rejected").map((r) => r.reason);
|
|
2922
2941
|
if (errors.length > 0) {
|
|
@@ -2928,7 +2947,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2928
2947
|
throw errors[0];
|
|
2929
2948
|
}
|
|
2930
2949
|
} else try {
|
|
2931
|
-
await outboxQueue.enqueueMany(messages);
|
|
2950
|
+
await outboxQueue.enqueueMany(messages.map((m) => m.message));
|
|
2932
2951
|
} catch (error) {
|
|
2933
2952
|
logger$1.error("Failed to enqueue activity {activityId} to send later: {error}", {
|
|
2934
2953
|
activityId: activity.id.href,
|
|
@@ -3644,20 +3663,25 @@ var ContextImpl = class ContextImpl {
|
|
|
3644
3663
|
} else keys = [sender];
|
|
3645
3664
|
if (keys.length < 1) throw new TypeError("The sender's keys must not be empty.");
|
|
3646
3665
|
for (const { privateKey } of keys) require_http.validateCryptoKey(privateKey, "private");
|
|
3647
|
-
const opts = { context: this };
|
|
3648
3666
|
let expandedRecipients;
|
|
3667
|
+
let collectionSync;
|
|
3649
3668
|
if (Array.isArray(recipients)) expandedRecipients = recipients;
|
|
3650
3669
|
else if (recipients === "followers") {
|
|
3651
3670
|
if (identifier == null) throw new Error("If recipients is \"followers\", sender must be an actor identifier or username.");
|
|
3652
3671
|
expandedRecipients = [];
|
|
3653
3672
|
for await (const recipient of this.getFollowers(identifier)) expandedRecipients.push(recipient);
|
|
3654
3673
|
if (options.syncCollection) try {
|
|
3655
|
-
|
|
3674
|
+
collectionSync = this.getFollowersUri(identifier).href;
|
|
3656
3675
|
} catch (error) {
|
|
3657
|
-
if (error instanceof RouterError)
|
|
3658
|
-
else throw error;
|
|
3676
|
+
if (!(error instanceof RouterError)) throw error;
|
|
3659
3677
|
}
|
|
3660
3678
|
} else expandedRecipients = [recipients];
|
|
3679
|
+
const opts = {
|
|
3680
|
+
context: this,
|
|
3681
|
+
orderingKey: options.orderingKey,
|
|
3682
|
+
collectionSync,
|
|
3683
|
+
immediate: options.immediate
|
|
3684
|
+
};
|
|
3661
3685
|
span.setAttribute("activitypub.inboxes", expandedRecipients.length);
|
|
3662
3686
|
for (const activityTransformer of this.federation.activityTransformers) activity = activityTransformer(activity, this);
|
|
3663
3687
|
span?.setAttribute("activitypub.activity.id", activity?.id?.href ?? "");
|
|
@@ -3704,10 +3728,11 @@ var ContextImpl = class ContextImpl {
|
|
|
3704
3728
|
activityId: activity.id?.href,
|
|
3705
3729
|
activityType: (0, __fedify_vocab.getTypeId)(activity).href,
|
|
3706
3730
|
collectionSync: opts.collectionSync,
|
|
3731
|
+
orderingKey: options.orderingKey,
|
|
3707
3732
|
traceContext: carrier
|
|
3708
3733
|
};
|
|
3709
3734
|
if (!this.federation.manuallyStartQueue) this.federation._startQueueInternal(this.data);
|
|
3710
|
-
this.federation.fanoutQueue.enqueue(message);
|
|
3735
|
+
this.federation.fanoutQueue.enqueue(message, { orderingKey: options.orderingKey });
|
|
3711
3736
|
}
|
|
3712
3737
|
async *getFollowers(identifier) {
|
|
3713
3738
|
if (this.federation.followersCallbacks == null) throw new Error("No followers collection dispatcher registered.");
|
|
@@ -4059,8 +4084,10 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
4059
4084
|
}
|
|
4060
4085
|
const carrier = {};
|
|
4061
4086
|
__opentelemetry_api.propagation.inject(__opentelemetry_api.context.active(), carrier);
|
|
4087
|
+
const orderingKey = options?.orderingKey;
|
|
4062
4088
|
const messages = [];
|
|
4063
4089
|
for (const inbox in inboxes) {
|
|
4090
|
+
const inboxUrl = new URL(inbox);
|
|
4064
4091
|
const message = {
|
|
4065
4092
|
type: "outbox",
|
|
4066
4093
|
id: crypto.randomUUID(),
|
|
@@ -4074,13 +4101,29 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
4074
4101
|
started: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4075
4102
|
attempt: 0,
|
|
4076
4103
|
headers: {},
|
|
4104
|
+
orderingKey: orderingKey == null ? void 0 : `${orderingKey}\n${inboxUrl.origin}`,
|
|
4077
4105
|
traceContext: carrier
|
|
4078
4106
|
};
|
|
4079
|
-
messages.push(
|
|
4107
|
+
messages.push({
|
|
4108
|
+
message,
|
|
4109
|
+
orderingKey: message.orderingKey
|
|
4110
|
+
});
|
|
4080
4111
|
}
|
|
4081
4112
|
const { outboxQueue } = this.federation;
|
|
4082
4113
|
if (outboxQueue.enqueueMany == null) {
|
|
4083
|
-
const promises = messages.map((m) => outboxQueue.enqueue(m));
|
|
4114
|
+
const promises = messages.map((m) => outboxQueue.enqueue(m.message, { orderingKey: m.orderingKey }));
|
|
4115
|
+
const results = await Promise.allSettled(promises);
|
|
4116
|
+
const errors = results.filter((r) => r.status === "rejected").map((r) => r.reason);
|
|
4117
|
+
if (errors.length > 0) {
|
|
4118
|
+
logger$1.error("Failed to enqueue activity {activityId} to forward later:\n{errors}", {
|
|
4119
|
+
activityId: this.activityId,
|
|
4120
|
+
errors
|
|
4121
|
+
});
|
|
4122
|
+
if (errors.length > 1) throw new AggregateError(errors, `Failed to enqueue activity ${this.activityId} to forward later.`);
|
|
4123
|
+
throw errors[0];
|
|
4124
|
+
}
|
|
4125
|
+
} else if (orderingKey != null) {
|
|
4126
|
+
const promises = messages.map((m) => outboxQueue.enqueue(m.message, { orderingKey: m.orderingKey }));
|
|
4084
4127
|
const results = await Promise.allSettled(promises);
|
|
4085
4128
|
const errors = results.filter((r) => r.status === "rejected").map((r) => r.reason);
|
|
4086
4129
|
if (errors.length > 0) {
|
|
@@ -4092,7 +4135,7 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
4092
4135
|
throw errors[0];
|
|
4093
4136
|
}
|
|
4094
4137
|
} else try {
|
|
4095
|
-
await outboxQueue.enqueueMany(messages);
|
|
4138
|
+
await outboxQueue.enqueueMany(messages.map((m) => m.message));
|
|
4096
4139
|
} catch (error) {
|
|
4097
4140
|
logger$1.error("Failed to enqueue activity {activityId} to forward later:\n{error}", {
|
|
4098
4141
|
activityId: this.activityId,
|
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "./deno-
|
|
7
|
-
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-
|
|
6
|
+
import "./deno-fe0u4LiE.js";
|
|
7
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-BlOT9luD.js";
|
|
8
8
|
import "./client-Dg7OfUDA.js";
|
|
9
9
|
import "./router-D9eI0s4b.js";
|
|
10
10
|
import "./types-CPz01LGH.js";
|
|
11
|
-
import "./key-
|
|
12
|
-
import "./http-
|
|
13
|
-
import "./ld-
|
|
14
|
-
import "./owner-
|
|
15
|
-
import "./proof
|
|
16
|
-
import "./docloader-
|
|
11
|
+
import "./key-BGzsKfpZ.js";
|
|
12
|
+
import "./http-oCBlFLKT.js";
|
|
13
|
+
import "./ld-BaO1-A5Y.js";
|
|
14
|
+
import "./owner-BqIhDQWW.js";
|
|
15
|
+
import "./proof-DoHt7qrS.js";
|
|
16
|
+
import "./docloader-C9Dmxf-K.js";
|
|
17
17
|
import "./kv-cache-B__dHl7g.js";
|
|
18
|
-
import "./inbox-
|
|
19
|
-
import "./builder-
|
|
18
|
+
import "./inbox-Dm1rfkdg.js";
|
|
19
|
+
import "./builder-B7WWCOdc.js";
|
|
20
20
|
import "./collection-CcnIw1qY.js";
|
|
21
21
|
import "./keycache-DRxpZ5r9.js";
|
|
22
22
|
import "./negotiation-5NPJL6zp.js";
|
|
23
23
|
import "./retry-D4GJ670a.js";
|
|
24
|
-
import "./send-
|
|
24
|
+
import "./send-CO2ZYT96.js";
|
|
25
25
|
|
|
26
26
|
export { FederationImpl };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
|
3
|
+
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
|
+
|
|
5
|
+
require('./transformers-BjBg6Lag.cjs');
|
|
6
|
+
require('./http-DMi5iyiI.cjs');
|
|
7
|
+
const require_middleware = require('./middleware-C0Vj7vNo.cjs');
|
|
8
|
+
require('./proof-vSvvLbTh.cjs');
|
|
9
|
+
require('./types-B6z6CqIz.cjs');
|
|
10
|
+
require('./kv-cache-C0AvpI7U.cjs');
|
|
11
|
+
|
|
12
|
+
exports.FederationImpl = require_middleware.FederationImpl;
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
5
|
import { getDefaultActivityTransformers } from "./transformers-N_ip_y4P.js";
|
|
6
|
-
import { deno_default, doubleKnock, exportJwk, importJwk, validateCryptoKey, verifyRequest } from "./http-
|
|
7
|
-
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-
|
|
6
|
+
import { deno_default, doubleKnock, exportJwk, importJwk, validateCryptoKey, verifyRequest } from "./http-7r8B3dF_.js";
|
|
7
|
+
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-Cg6AAAWI.js";
|
|
8
8
|
import { getNodeInfo, nodeInfoToJson } from "./types-8l28uC8o.js";
|
|
9
|
-
import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-
|
|
9
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-CETRZwoP.js";
|
|
10
10
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
11
11
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
12
12
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
@@ -337,7 +337,7 @@ var FederationBuilderImpl = class {
|
|
|
337
337
|
this.collectionTypeIds = {};
|
|
338
338
|
}
|
|
339
339
|
async build(options) {
|
|
340
|
-
const { FederationImpl: FederationImpl$1 } = await import("./middleware-
|
|
340
|
+
const { FederationImpl: FederationImpl$1 } = await import("./middleware-BDJNulB_.js");
|
|
341
341
|
const f = new FederationImpl$1(options);
|
|
342
342
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
343
343
|
f.router = this.router.clone();
|
|
@@ -2560,6 +2560,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2560
2560
|
}) });
|
|
2561
2561
|
await this.sendActivity(keys, message.inboxes, activity, {
|
|
2562
2562
|
collectionSync: message.collectionSync,
|
|
2563
|
+
orderingKey: message.orderingKey,
|
|
2563
2564
|
context: context$1
|
|
2564
2565
|
});
|
|
2565
2566
|
}
|
|
@@ -2808,7 +2809,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2808
2809
|
"federation",
|
|
2809
2810
|
"outbox"
|
|
2810
2811
|
]);
|
|
2811
|
-
const { immediate, collectionSync, context: ctx } = options;
|
|
2812
|
+
const { immediate, collectionSync, orderingKey, context: ctx } = options;
|
|
2812
2813
|
if (activity.id == null) throw new TypeError("The activity to send must have an id.");
|
|
2813
2814
|
if (activity.actorId == null) throw new TypeError("The activity to send must have at least one actor property.");
|
|
2814
2815
|
else if (keys.length < 1) throw new TypeError("The keys must not be empty.");
|
|
@@ -2896,6 +2897,8 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2896
2897
|
propagation.inject(context.active(), carrier);
|
|
2897
2898
|
const messages = [];
|
|
2898
2899
|
for (const inbox in inboxes) {
|
|
2900
|
+
const inboxOrigin = new URL(inbox).origin;
|
|
2901
|
+
const messageOrderingKey = orderingKey == null ? void 0 : `${orderingKey}\n${inboxOrigin}`;
|
|
2899
2902
|
const message = {
|
|
2900
2903
|
type: "outbox",
|
|
2901
2904
|
id: crypto.randomUUID(),
|
|
@@ -2909,13 +2912,29 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2909
2912
|
started: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2910
2913
|
attempt: 0,
|
|
2911
2914
|
headers: collectionSync == null ? {} : { "Collection-Synchronization": await buildCollectionSynchronizationHeader(collectionSync, inboxes[inbox].actorIds) },
|
|
2915
|
+
orderingKey: messageOrderingKey,
|
|
2912
2916
|
traceContext: carrier
|
|
2913
2917
|
};
|
|
2914
|
-
messages.push(
|
|
2918
|
+
messages.push({
|
|
2919
|
+
message,
|
|
2920
|
+
orderingKey: messageOrderingKey
|
|
2921
|
+
});
|
|
2915
2922
|
}
|
|
2916
2923
|
const { outboxQueue } = this;
|
|
2917
2924
|
if (outboxQueue.enqueueMany == null) {
|
|
2918
|
-
const promises = messages.map((m) => outboxQueue.enqueue(m));
|
|
2925
|
+
const promises = messages.map((m) => outboxQueue.enqueue(m.message, { orderingKey: m.orderingKey }));
|
|
2926
|
+
const results = await Promise.allSettled(promises);
|
|
2927
|
+
const errors = results.filter((r) => r.status === "rejected").map((r) => r.reason);
|
|
2928
|
+
if (errors.length > 0) {
|
|
2929
|
+
logger$1.error("Failed to enqueue activity {activityId} to send later: {errors}", {
|
|
2930
|
+
activityId: activity.id.href,
|
|
2931
|
+
errors
|
|
2932
|
+
});
|
|
2933
|
+
if (errors.length > 1) throw new AggregateError(errors, `Failed to enqueue activity ${activityId} to send later.`);
|
|
2934
|
+
throw errors[0];
|
|
2935
|
+
}
|
|
2936
|
+
} else if (orderingKey != null) {
|
|
2937
|
+
const promises = messages.map((m) => outboxQueue.enqueue(m.message, { orderingKey: m.orderingKey }));
|
|
2919
2938
|
const results = await Promise.allSettled(promises);
|
|
2920
2939
|
const errors = results.filter((r) => r.status === "rejected").map((r) => r.reason);
|
|
2921
2940
|
if (errors.length > 0) {
|
|
@@ -2927,7 +2946,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2927
2946
|
throw errors[0];
|
|
2928
2947
|
}
|
|
2929
2948
|
} else try {
|
|
2930
|
-
await outboxQueue.enqueueMany(messages);
|
|
2949
|
+
await outboxQueue.enqueueMany(messages.map((m) => m.message));
|
|
2931
2950
|
} catch (error) {
|
|
2932
2951
|
logger$1.error("Failed to enqueue activity {activityId} to send later: {error}", {
|
|
2933
2952
|
activityId: activity.id.href,
|
|
@@ -3643,20 +3662,25 @@ var ContextImpl = class ContextImpl {
|
|
|
3643
3662
|
} else keys = [sender];
|
|
3644
3663
|
if (keys.length < 1) throw new TypeError("The sender's keys must not be empty.");
|
|
3645
3664
|
for (const { privateKey } of keys) validateCryptoKey(privateKey, "private");
|
|
3646
|
-
const opts = { context: this };
|
|
3647
3665
|
let expandedRecipients;
|
|
3666
|
+
let collectionSync;
|
|
3648
3667
|
if (Array.isArray(recipients)) expandedRecipients = recipients;
|
|
3649
3668
|
else if (recipients === "followers") {
|
|
3650
3669
|
if (identifier == null) throw new Error("If recipients is \"followers\", sender must be an actor identifier or username.");
|
|
3651
3670
|
expandedRecipients = [];
|
|
3652
3671
|
for await (const recipient of this.getFollowers(identifier)) expandedRecipients.push(recipient);
|
|
3653
3672
|
if (options.syncCollection) try {
|
|
3654
|
-
|
|
3673
|
+
collectionSync = this.getFollowersUri(identifier).href;
|
|
3655
3674
|
} catch (error) {
|
|
3656
|
-
if (error instanceof RouterError)
|
|
3657
|
-
else throw error;
|
|
3675
|
+
if (!(error instanceof RouterError)) throw error;
|
|
3658
3676
|
}
|
|
3659
3677
|
} else expandedRecipients = [recipients];
|
|
3678
|
+
const opts = {
|
|
3679
|
+
context: this,
|
|
3680
|
+
orderingKey: options.orderingKey,
|
|
3681
|
+
collectionSync,
|
|
3682
|
+
immediate: options.immediate
|
|
3683
|
+
};
|
|
3660
3684
|
span.setAttribute("activitypub.inboxes", expandedRecipients.length);
|
|
3661
3685
|
for (const activityTransformer of this.federation.activityTransformers) activity = activityTransformer(activity, this);
|
|
3662
3686
|
span?.setAttribute("activitypub.activity.id", activity?.id?.href ?? "");
|
|
@@ -3703,10 +3727,11 @@ var ContextImpl = class ContextImpl {
|
|
|
3703
3727
|
activityId: activity.id?.href,
|
|
3704
3728
|
activityType: getTypeId(activity).href,
|
|
3705
3729
|
collectionSync: opts.collectionSync,
|
|
3730
|
+
orderingKey: options.orderingKey,
|
|
3706
3731
|
traceContext: carrier
|
|
3707
3732
|
};
|
|
3708
3733
|
if (!this.federation.manuallyStartQueue) this.federation._startQueueInternal(this.data);
|
|
3709
|
-
this.federation.fanoutQueue.enqueue(message);
|
|
3734
|
+
this.federation.fanoutQueue.enqueue(message, { orderingKey: options.orderingKey });
|
|
3710
3735
|
}
|
|
3711
3736
|
async *getFollowers(identifier) {
|
|
3712
3737
|
if (this.federation.followersCallbacks == null) throw new Error("No followers collection dispatcher registered.");
|
|
@@ -4058,8 +4083,10 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
4058
4083
|
}
|
|
4059
4084
|
const carrier = {};
|
|
4060
4085
|
propagation.inject(context.active(), carrier);
|
|
4086
|
+
const orderingKey = options?.orderingKey;
|
|
4061
4087
|
const messages = [];
|
|
4062
4088
|
for (const inbox in inboxes) {
|
|
4089
|
+
const inboxUrl = new URL(inbox);
|
|
4063
4090
|
const message = {
|
|
4064
4091
|
type: "outbox",
|
|
4065
4092
|
id: crypto.randomUUID(),
|
|
@@ -4073,13 +4100,29 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
4073
4100
|
started: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4074
4101
|
attempt: 0,
|
|
4075
4102
|
headers: {},
|
|
4103
|
+
orderingKey: orderingKey == null ? void 0 : `${orderingKey}\n${inboxUrl.origin}`,
|
|
4076
4104
|
traceContext: carrier
|
|
4077
4105
|
};
|
|
4078
|
-
messages.push(
|
|
4106
|
+
messages.push({
|
|
4107
|
+
message,
|
|
4108
|
+
orderingKey: message.orderingKey
|
|
4109
|
+
});
|
|
4079
4110
|
}
|
|
4080
4111
|
const { outboxQueue } = this.federation;
|
|
4081
4112
|
if (outboxQueue.enqueueMany == null) {
|
|
4082
|
-
const promises = messages.map((m) => outboxQueue.enqueue(m));
|
|
4113
|
+
const promises = messages.map((m) => outboxQueue.enqueue(m.message, { orderingKey: m.orderingKey }));
|
|
4114
|
+
const results = await Promise.allSettled(promises);
|
|
4115
|
+
const errors = results.filter((r) => r.status === "rejected").map((r) => r.reason);
|
|
4116
|
+
if (errors.length > 0) {
|
|
4117
|
+
logger$1.error("Failed to enqueue activity {activityId} to forward later:\n{errors}", {
|
|
4118
|
+
activityId: this.activityId,
|
|
4119
|
+
errors
|
|
4120
|
+
});
|
|
4121
|
+
if (errors.length > 1) throw new AggregateError(errors, `Failed to enqueue activity ${this.activityId} to forward later.`);
|
|
4122
|
+
throw errors[0];
|
|
4123
|
+
}
|
|
4124
|
+
} else if (orderingKey != null) {
|
|
4125
|
+
const promises = messages.map((m) => outboxQueue.enqueue(m.message, { orderingKey: m.orderingKey }));
|
|
4083
4126
|
const results = await Promise.allSettled(promises);
|
|
4084
4127
|
const errors = results.filter((r) => r.status === "rejected").map((r) => r.reason);
|
|
4085
4128
|
if (errors.length > 0) {
|
|
@@ -4091,7 +4134,7 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
4091
4134
|
throw errors[0];
|
|
4092
4135
|
}
|
|
4093
4136
|
} else try {
|
|
4094
|
-
await outboxQueue.enqueueMany(messages);
|
|
4137
|
+
await outboxQueue.enqueueMany(messages.map((m) => m.message));
|
|
4095
4138
|
} catch (error) {
|
|
4096
4139
|
logger$1.error("Failed to enqueue activity {activityId} to forward later:\n{error}", {
|
|
4097
4140
|
activityId: this.activityId,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActorAliasMapper, ActorDispatcher, ActorHandleMapper, RequestContext, WebFingerLinksDispatcher } from "./context-
|
|
1
|
+
import { ActorAliasMapper, ActorDispatcher, ActorHandleMapper, RequestContext, WebFingerLinksDispatcher } from "./context-D7JEVvXJ.cjs";
|
|
2
2
|
import { Span, Tracer } from "@opentelemetry/api";
|
|
3
3
|
|
|
4
4
|
//#region src/federation/webfinger.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { ActorAliasMapper, ActorDispatcher, ActorHandleMapper, RequestContext, WebFingerLinksDispatcher } from "./context-
|
|
3
|
+
import { ActorAliasMapper, ActorDispatcher, ActorHandleMapper, RequestContext, WebFingerLinksDispatcher } from "./context-BNNWbaZL.js";
|
|
4
4
|
import { Span, Tracer } from "@opentelemetry/api";
|
|
5
5
|
|
|
6
6
|
//#region src/federation/webfinger.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { ActivityTransformer, Context } from "./context-
|
|
3
|
+
import { ActivityTransformer, Context } from "./context-BNNWbaZL.js";
|
|
4
4
|
import { Activity } from "@fedify/vocab";
|
|
5
5
|
|
|
6
6
|
//#region src/compat/transformers.d.ts
|
package/dist/mod.cjs
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
const require_transformers = require('./transformers-BjBg6Lag.cjs');
|
|
6
6
|
require('./compat-DmDDELst.cjs');
|
|
7
|
-
const require_http = require('./http-
|
|
8
|
-
const require_middleware = require('./middleware-
|
|
9
|
-
const require_proof = require('./proof-
|
|
10
|
-
const require_federation = require('./federation-
|
|
7
|
+
const require_http = require('./http-DMi5iyiI.cjs');
|
|
8
|
+
const require_middleware = require('./middleware-C0Vj7vNo.cjs');
|
|
9
|
+
const require_proof = require('./proof-vSvvLbTh.cjs');
|
|
10
|
+
const require_federation = require('./federation-CE0CJ_0G.cjs');
|
|
11
11
|
const require_types = require('./types-B6z6CqIz.cjs');
|
|
12
|
-
const require_kv_cache = require('./kv-cache-
|
|
12
|
+
const require_kv_cache = require('./kv-cache-C0AvpI7U.cjs');
|
|
13
13
|
require('./nodeinfo-DuMYTpbZ.cjs');
|
|
14
14
|
require('./sig-DeXX2xnj.cjs');
|
|
15
15
|
require('./utils-Db0ZmjcD.cjs');
|
package/dist/mod.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo } from "./client-by-PEGAJ.cjs";
|
|
2
2
|
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-ClB3pLcL.cjs";
|
|
3
3
|
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-C-zfmVAD.cjs";
|
|
4
|
-
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-
|
|
4
|
+
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-D7JEVvXJ.cjs";
|
|
5
5
|
import { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore } from "./kv-B4vFhIYL.cjs";
|
|
6
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-
|
|
7
|
-
import { WebFingerHandlerParameters, handleWebFinger } from "./mod-
|
|
6
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-C74sRHP8.cjs";
|
|
7
|
+
import { WebFingerHandlerParameters, handleWebFinger } from "./mod-054TSUXs.cjs";
|
|
8
8
|
import "./mod-C81L6_lQ.cjs";
|
|
9
9
|
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-BrS8tiad.cjs";
|
|
10
10
|
import { getAuthenticatedDocumentLoader, kvCache } from "./mod-BHXq4Q3x.cjs";
|
package/dist/mod.d.ts
CHANGED
|
@@ -3,10 +3,10 @@ import { URLPattern } from "urlpattern-polyfill";
|
|
|
3
3
|
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo } from "./client-CUTUGgvJ.js";
|
|
4
4
|
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-DLBDPal9.js";
|
|
5
5
|
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-BgI8C-VY.js";
|
|
6
|
-
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-
|
|
6
|
+
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-BNNWbaZL.js";
|
|
7
7
|
import { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore } from "./kv-CYySNrsn.js";
|
|
8
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-
|
|
9
|
-
import { WebFingerHandlerParameters, handleWebFinger } from "./mod-
|
|
8
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-YpmzboJc.js";
|
|
9
|
+
import { WebFingerHandlerParameters, handleWebFinger } from "./mod-BhDb3RBS.js";
|
|
10
10
|
import "./mod-1E3W847c.js";
|
|
11
11
|
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-jOa7W503.js";
|
|
12
12
|
import { getAuthenticatedDocumentLoader, kvCache } from "./mod-DZmuPaKv.js";
|
package/dist/mod.js
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./transformers-N_ip_y4P.js";
|
|
6
6
|
import "./compat-nxUqe4Z-.js";
|
|
7
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-
|
|
8
|
-
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-
|
|
9
|
-
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-
|
|
10
|
-
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-
|
|
7
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-7r8B3dF_.js";
|
|
8
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-R0w-WauH.js";
|
|
9
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-Cg6AAAWI.js";
|
|
10
|
+
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-D6FVaeAR.js";
|
|
11
11
|
import { getNodeInfo, nodeInfoToJson, parseNodeInfo } from "./types-8l28uC8o.js";
|
|
12
|
-
import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-
|
|
12
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-CETRZwoP.js";
|
|
13
13
|
import "./nodeinfo-BlLsRSiT.js";
|
|
14
14
|
import "./sig-CwuONEzF.js";
|
|
15
15
|
import "./utils-Wranxuoe.js";
|
|
@@ -8,30 +8,30 @@ 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-QzKcOQgP.js";
|
|
11
|
-
import "../deno-
|
|
12
|
-
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-
|
|
11
|
+
import "../deno-fe0u4LiE.js";
|
|
12
|
+
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-BlOT9luD.js";
|
|
13
13
|
import "../client-Dg7OfUDA.js";
|
|
14
14
|
import "../router-D9eI0s4b.js";
|
|
15
15
|
import "../types-CPz01LGH.js";
|
|
16
|
-
import "../key-
|
|
17
|
-
import "../http-
|
|
18
|
-
import "../ld-
|
|
19
|
-
import "../owner-
|
|
20
|
-
import "../proof
|
|
21
|
-
import "../docloader-
|
|
16
|
+
import "../key-BGzsKfpZ.js";
|
|
17
|
+
import "../http-oCBlFLKT.js";
|
|
18
|
+
import "../ld-BaO1-A5Y.js";
|
|
19
|
+
import "../owner-BqIhDQWW.js";
|
|
20
|
+
import "../proof-DoHt7qrS.js";
|
|
21
|
+
import "../docloader-C9Dmxf-K.js";
|
|
22
22
|
import "../kv-cache-B__dHl7g.js";
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
23
|
+
import "../inbox-Dm1rfkdg.js";
|
|
24
|
+
import "../builder-B7WWCOdc.js";
|
|
25
25
|
import "../collection-CcnIw1qY.js";
|
|
26
26
|
import "../keycache-DRxpZ5r9.js";
|
|
27
27
|
import "../negotiation-5NPJL6zp.js";
|
|
28
28
|
import "../retry-D4GJ670a.js";
|
|
29
|
-
import "../send-
|
|
29
|
+
import "../send-CO2ZYT96.js";
|
|
30
30
|
import "../std__assert-DWivtrGR.js";
|
|
31
31
|
import "../assert_rejects-Ce45JcFg.js";
|
|
32
32
|
import "../assert_throws-BNXdRGWP.js";
|
|
33
33
|
import "../assert_not_equals-C80BG-_5.js";
|
|
34
|
-
import { createRequestContext } from "../context-
|
|
34
|
+
import { createRequestContext } from "../context-CZ5llAss.js";
|
|
35
35
|
|
|
36
36
|
//#region src/nodeinfo/handler.test.ts
|
|
37
37
|
test("handleNodeInfo()", async () => {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./deno-
|
|
6
|
+
import { deno_default } from "./deno-fe0u4LiE.js";
|
|
7
7
|
import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
8
8
|
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { deno_default, fetchKey, validateCryptoKey } from "./http-
|
|
5
|
+
import { deno_default, fetchKey, validateCryptoKey } from "./http-7r8B3dF_.js";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "@fedify/vocab";
|
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./deno-
|
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
|
6
|
+
import { deno_default } from "./deno-fe0u4LiE.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-BGzsKfpZ.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
|
|
10
10
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
5
|
const require_chunk = require('./chunk-DqRYRqnO.cjs');
|
|
6
|
-
const require_http = require('./http-
|
|
6
|
+
const require_http = require('./http-DMi5iyiI.cjs');
|
|
7
7
|
const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
|
8
8
|
const __fedify_vocab = require_chunk.__toESM(require("@fedify/vocab"));
|
|
9
9
|
const __opentelemetry_api = require_chunk.__toESM(require("@opentelemetry/api"));
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./deno-
|
|
7
|
-
import { doubleKnock } from "./http-
|
|
6
|
+
import { deno_default } from "./deno-fe0u4LiE.js";
|
|
7
|
+
import { doubleKnock } from "./http-oCBlFLKT.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
|