@fedify/fedify 2.0.11 → 2.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{builder-CIb6F5Wv.mjs → builder-DKltqf8y.mjs} +3 -3
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{context-Dyg7P1qW.d.ts → context-DKccFiYD.d.ts} +4 -1
- package/dist/{context-CNIt-Qn7.d.cts → context-Kt2s6UWW.d.cts} +4 -1
- package/dist/{deno-CuY29iN3.mjs → deno-BIx-_zvq.mjs} +1 -1
- package/dist/{docloader-BeuTyGFV.mjs → docloader-yP54jSav.mjs} +2 -2
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/handler.test.mjs +3 -3
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/inbox.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +35 -29
- 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/send.test.mjs +3 -3
- package/dist/federation/webfinger.test.mjs +1 -1
- package/dist/{http-7zzau1-8.js → http-D8rvMr4M.js} +1 -1
- package/dist/{http-BccMLQ1v.cjs → http-DNrAbUAq.cjs} +1 -1
- package/dist/{http-BqOMEhZK.mjs → http-T5geHJZX.mjs} +2 -2
- package/dist/{inbox-CPIYFOXX.mjs → inbox-Bzg6bZOM.mjs} +1 -1
- package/dist/{key-dIW2UI_X.mjs → key-qU9Zi2Ui.mjs} +1 -1
- package/dist/{kv-cache-BbkP57DU.cjs → kv-cache-CYbRULNv.cjs} +1 -1
- package/dist/{kv-cache-QS8kqCpL.js → kv-cache-NUvGSdiX.js} +1 -1
- package/dist/{ld-C3rn9Nyy.mjs → ld-zCUbbVV5.mjs} +2 -2
- package/dist/{middleware-BNFJSAty.cjs → middleware-Br8eGgWB.cjs} +42 -17
- package/dist/{middleware-xCG_szhd.mjs → middleware-C_Q-50Ih.mjs} +48 -23
- package/dist/{middleware-01pJzy3g.mjs → middleware-DACLzMAj.mjs} +1 -1
- package/dist/{middleware-DVQ7VXp4.js → middleware-DwxnGrIS.js} +41 -16
- package/dist/{middleware-CL2JvGua.cjs → middleware-tdNBgDKC.cjs} +1 -1
- package/dist/{mod-BnAKGh2w.d.ts → mod-Cwmyxyoc.d.ts} +1 -1
- package/dist/{mod-DWoQffTD.d.cts → mod-DiGQkv-4.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/handler.test.mjs +1 -1
- package/dist/{owner-6fJFxJAB.mjs → owner-CarLgGMM.mjs} +2 -2
- package/dist/{proof-D4hhf1tl.cjs → proof-Bf-LMGzT.cjs} +1 -1
- package/dist/{proof-t299-ds7.js → proof-CHkVaDwS.js} +1 -1
- package/dist/{proof-CMXM2yCy.mjs → proof-CkuSEndi.mjs} +2 -2
- package/dist/{send-oAd_rIY9.mjs → send-7574c5T8.mjs} +2 -2
- package/dist/sig/http.test.mjs +2 -2
- package/dist/sig/key.test.mjs +1 -1
- package/dist/sig/ld.test.mjs +2 -2
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/proof.test.mjs +1 -1
- package/dist/testing/mod.d.mts +4 -1
- package/dist/utils/docloader.test.mjs +2 -2
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +5 -5
|
@@ -2,8 +2,8 @@ import "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { n as RouterError, t as Router } from "./router-CrMLXoOr.mjs";
|
|
5
|
-
import { n as version, t as name } from "./deno-
|
|
6
|
-
import { t as InboxListenerSet } from "./inbox-
|
|
5
|
+
import { n as version, t as name } from "./deno-BIx-_zvq.mjs";
|
|
6
|
+
import { t as InboxListenerSet } from "./inbox-Bzg6bZOM.mjs";
|
|
7
7
|
import { getTypeId } from "@fedify/vocab";
|
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -42,7 +42,7 @@ var FederationBuilderImpl = class {
|
|
|
42
42
|
this.collectionTypeIds = {};
|
|
43
43
|
}
|
|
44
44
|
async build(options) {
|
|
45
|
-
const { FederationImpl } = await import("./middleware-
|
|
45
|
+
const { FederationImpl } = await import("./middleware-DACLzMAj.mjs");
|
|
46
46
|
const f = new FederationImpl(options);
|
|
47
47
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
48
48
|
f.router = this.router.clone();
|
package/dist/compat/mod.d.cts
CHANGED
package/dist/compat/mod.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { bt as ActivityTransformer, n as Context } from "../context-
|
|
3
|
+
import { bt as ActivityTransformer, n as Context } from "../context-DKccFiYD.js";
|
|
4
4
|
import { Activity } from "@fedify/vocab";
|
|
5
5
|
|
|
6
6
|
//#region src/compat/transformers.d.ts
|
|
@@ -5,7 +5,7 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
|
5
5
|
import { t as assertInstanceOf } from "../assert_instance_of-C4Ri6VuN.mjs";
|
|
6
6
|
import { t as assert } from "../assert-ddO5KLpe.mjs";
|
|
7
7
|
import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
|
|
8
|
-
import { _ as autoIdAssigner, g as actorDehydrator, n as FederationImpl } from "../middleware-
|
|
8
|
+
import { _ as autoIdAssigner, g as actorDehydrator, n as FederationImpl } from "../middleware-C_Q-50Ih.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
import { Follow, Person } from "@fedify/vocab";
|
|
11
11
|
//#region src/compat/transformers.test.ts
|
|
@@ -2471,7 +2471,10 @@ interface GetSignedKeyOptions {
|
|
|
2471
2471
|
*/
|
|
2472
2472
|
interface ActorKeyPair extends CryptoKeyPair {
|
|
2473
2473
|
/**
|
|
2474
|
-
* The URI of the public key, which is used for
|
|
2474
|
+
* The URI of the public key for {@link CryptographicKey}, which is used for
|
|
2475
|
+
* verifying HTTP Signatures and Linked Data Signatures. Note that this is
|
|
2476
|
+
* the ID of the {@link cryptographicKey}, not of the {@link multikey};
|
|
2477
|
+
* the {@link Multikey} instance has a distinct ID of its own.
|
|
2475
2478
|
*/
|
|
2476
2479
|
readonly keyId: URL;
|
|
2477
2480
|
/**
|
|
@@ -2469,7 +2469,10 @@ interface GetSignedKeyOptions {
|
|
|
2469
2469
|
*/
|
|
2470
2470
|
interface ActorKeyPair extends CryptoKeyPair {
|
|
2471
2471
|
/**
|
|
2472
|
-
* The URI of the public key, which is used for
|
|
2472
|
+
* The URI of the public key for {@link CryptographicKey}, which is used for
|
|
2473
|
+
* verifying HTTP Signatures and Linked Data Signatures. Note that this is
|
|
2474
|
+
* the ID of the {@link cryptographicKey}, not of the {@link multikey};
|
|
2475
|
+
* the {@link Multikey} instance has a distinct ID of its own.
|
|
2473
2476
|
*/
|
|
2474
2477
|
readonly keyId: URL;
|
|
2475
2478
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { a as validateCryptoKey } from "./key-
|
|
5
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { a as validateCryptoKey } from "./key-qU9Zi2Ui.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-T5geHJZX.mjs";
|
|
6
6
|
import { curry } from "es-toolkit";
|
|
7
7
|
import { UrlError, createActivityPubRequest, getRemoteDocument, logRequest, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -5,7 +5,7 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
|
5
5
|
import { a as assertExists } from "../std__assert-Duiq_YC9.mjs";
|
|
6
6
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
7
7
|
import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
|
|
8
|
-
import { n as createFederationBuilder } from "../builder-
|
|
8
|
+
import { n as createFederationBuilder } from "../builder-DKltqf8y.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
import { Activity, Note, Person } from "@fedify/vocab";
|
|
11
11
|
//#region src/federation/builder.test.ts
|
|
@@ -5,11 +5,11 @@ import { n as createRequestContext, t as createInboxContext } from "../context-J
|
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-Duiq_YC9.mjs";
|
|
7
7
|
import { t as assert } from "../assert-ddO5KLpe.mjs";
|
|
8
|
-
import { s as signRequest } from "../http-
|
|
8
|
+
import { s as signRequest } from "../http-T5geHJZX.mjs";
|
|
9
9
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-CtZLJq76.mjs";
|
|
10
10
|
import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
|
|
11
|
-
import { a as createFederation, c as handleCollection, d as handleObject, f as respondWithObject, l as handleCustomCollection, p as respondWithObjectIfAcceptable, s as handleActor, u as handleInbox } from "../middleware-
|
|
12
|
-
import { t as InboxListenerSet } from "../inbox-
|
|
11
|
+
import { a as createFederation, c as handleCollection, d as handleObject, f as respondWithObject, l as handleCustomCollection, p as respondWithObjectIfAcceptable, s as handleActor, u as handleInbox } from "../middleware-C_Q-50Ih.mjs";
|
|
12
|
+
import { t as InboxListenerSet } from "../inbox-Bzg6bZOM.mjs";
|
|
13
13
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
14
14
|
import { Create, Note, Person } from "@fedify/vocab";
|
|
15
15
|
//#region src/federation/handler.test.ts
|
|
@@ -4,9 +4,9 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import "../std__assert-Duiq_YC9.mjs";
|
|
6
6
|
import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
7
|
-
import { n as signObject } from "../proof-
|
|
7
|
+
import { n as signObject } from "../proof-CkuSEndi.mjs";
|
|
8
8
|
import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
|
|
9
|
-
import { a as createFederation } from "../middleware-
|
|
9
|
+
import { a as createFederation } from "../middleware-C_Q-50Ih.mjs";
|
|
10
10
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
11
11
|
import { Create, Follow, Person } from "@fedify/vocab";
|
|
12
12
|
//#region src/federation/idempotency.test.ts
|
|
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
6
|
-
import { t as InboxListenerSet } from "../inbox-
|
|
6
|
+
import { t as InboxListenerSet } from "../inbox-Bzg6bZOM.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
import { Activity, Create, Invite, Offer, Update } from "@fedify/vocab";
|
|
9
9
|
//#region src/federation/inbox.test.ts
|
|
@@ -10,14 +10,14 @@ import { t as assertInstanceOf } from "../assert_instance_of-C4Ri6VuN.mjs";
|
|
|
10
10
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
11
11
|
import { t as assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
|
|
12
12
|
import { t as assert } from "../assert-ddO5KLpe.mjs";
|
|
13
|
-
import { l as verifyRequest, s as signRequest } from "../http-
|
|
13
|
+
import { l as verifyRequest, s as signRequest } from "../http-T5geHJZX.mjs";
|
|
14
14
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
15
|
-
import { t as getAuthenticatedDocumentLoader } from "../docloader-
|
|
16
|
-
import { a as signJsonLd, o as verifyJsonLd, r as detachSignature } from "../ld-
|
|
17
|
-
import { t as doesActorOwnKey } from "../owner-
|
|
18
|
-
import { n as signObject, r as verifyObject } from "../proof-
|
|
15
|
+
import { t as getAuthenticatedDocumentLoader } from "../docloader-yP54jSav.mjs";
|
|
16
|
+
import { a as signJsonLd, o as verifyJsonLd, r as detachSignature } from "../ld-zCUbbVV5.mjs";
|
|
17
|
+
import { t as doesActorOwnKey } from "../owner-CarLgGMM.mjs";
|
|
18
|
+
import { n as signObject, r as verifyObject } from "../proof-CkuSEndi.mjs";
|
|
19
19
|
import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
|
|
20
|
-
import { a as createFederation, i as KvSpecDeterminer, n as FederationImpl, r as InboxContextImpl, t as ContextImpl } from "../middleware-
|
|
20
|
+
import { a as createFederation, i as KvSpecDeterminer, n as FederationImpl, r as InboxContextImpl, t as ContextImpl } from "../middleware-C_Q-50Ih.mjs";
|
|
21
21
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
22
22
|
import * as vocab from "@fedify/vocab";
|
|
23
23
|
import { getTypeId, lookupObject } from "@fedify/vocab";
|
|
@@ -285,7 +285,7 @@ test({
|
|
|
285
285
|
owner: new URL("https://example.com/users/handle")
|
|
286
286
|
}),
|
|
287
287
|
multikey: new vocab.Multikey({
|
|
288
|
-
id: new URL("https://example.com/users/handle#
|
|
288
|
+
id: new URL("https://example.com/users/handle#multikey-1"),
|
|
289
289
|
controller: new URL("https://example.com/users/handle"),
|
|
290
290
|
publicKey: rsaPublicKey2.publicKey
|
|
291
291
|
})
|
|
@@ -298,7 +298,7 @@ test({
|
|
|
298
298
|
owner: new URL("https://example.com/users/handle")
|
|
299
299
|
}),
|
|
300
300
|
multikey: new vocab.Multikey({
|
|
301
|
-
id: new URL("https://example.com/users/handle#
|
|
301
|
+
id: new URL("https://example.com/users/handle#multikey-2"),
|
|
302
302
|
controller: new URL("https://example.com/users/handle"),
|
|
303
303
|
publicKey: ed25519PublicKey.publicKey
|
|
304
304
|
})
|
|
@@ -1529,8 +1529,10 @@ test("ContextImpl.sendActivity()", async (t) => {
|
|
|
1529
1529
|
keyCache: {
|
|
1530
1530
|
async get(keyId) {
|
|
1531
1531
|
const keys = await federation.createContext(new URL("https://example.com/"), void 0).getActorKeyPairs("1");
|
|
1532
|
-
for (const key of keys)
|
|
1533
|
-
|
|
1532
|
+
for (const key of keys) {
|
|
1533
|
+
if (key.keyId.href === keyId.href) return key.cryptographicKey;
|
|
1534
|
+
if (key.multikey.id?.href === keyId.href) return key.multikey;
|
|
1535
|
+
}
|
|
1534
1536
|
},
|
|
1535
1537
|
async set(_keyId, _key) {}
|
|
1536
1538
|
}
|
|
@@ -1696,25 +1698,29 @@ test("ContextImpl.sendActivity()", async (t) => {
|
|
|
1696
1698
|
id: new URL("https://example.com/recipient"),
|
|
1697
1699
|
inboxId: new URL("https://example.com/inbox")
|
|
1698
1700
|
}, activity, { fanout: "force" });
|
|
1699
|
-
assertEquals(queue.messages,
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
}
|
|
1701
|
+
assertEquals(queue.messages.length, 1);
|
|
1702
|
+
assert(queue.messages[0].type === "fanout");
|
|
1703
|
+
const fanoutMsg = queue.messages[0];
|
|
1704
|
+
assertEquals(fanoutMsg.activityId, "https://example.com/activity/1");
|
|
1705
|
+
assertEquals(fanoutMsg.activityType, "https://www.w3.org/ns/activitystreams#Create");
|
|
1706
|
+
assertEquals(fanoutMsg.baseUrl, "https://example.com");
|
|
1707
|
+
assertEquals(fanoutMsg.collectionSync, void 0);
|
|
1708
|
+
assertEquals(fanoutMsg.orderingKey, void 0);
|
|
1709
|
+
assertEquals(fanoutMsg.inboxes, { "https://example.com/inbox": {
|
|
1710
|
+
actorIds: ["https://example.com/recipient"],
|
|
1711
|
+
sharedInbox: false
|
|
1712
|
+
} });
|
|
1713
|
+
const signedActivity = await vocab.Create.fromJsonLd(fanoutMsg.activity, {
|
|
1714
|
+
contextLoader: documentLoader,
|
|
1715
|
+
documentLoader
|
|
1716
|
+
});
|
|
1717
|
+
assertEquals(signedActivity.id?.href, "https://example.com/activity/1");
|
|
1718
|
+
let proofCount = 0;
|
|
1719
|
+
for await (const proof of signedActivity.getProofs({ contextLoader: documentLoader })) {
|
|
1720
|
+
assertEquals(proof.verificationMethodId?.href, "https://example.com/john#multikey-2");
|
|
1721
|
+
proofCount++;
|
|
1722
|
+
}
|
|
1723
|
+
assertEquals(proofCount, 1);
|
|
1718
1724
|
});
|
|
1719
1725
|
queue.clear();
|
|
1720
1726
|
await t.step("fanout: \"skip\"", async () => {
|
package/dist/federation/mod.cjs
CHANGED
|
@@ -2,7 +2,7 @@ const { Temporal } = require("@js-temporal/polyfill");
|
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
require("../chunk-DDcVe30Y.cjs");
|
|
5
|
-
const require_middleware = require("../middleware-
|
|
5
|
+
const require_middleware = require("../middleware-Br8eGgWB.cjs");
|
|
6
6
|
let es_toolkit = require("es-toolkit");
|
|
7
7
|
//#region src/federation/kv.ts
|
|
8
8
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "../context-
|
|
1
|
+
import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "../context-Kt2s6UWW.cjs";
|
|
2
2
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-CbLNp3zQ.cjs";
|
|
3
|
-
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-
|
|
3
|
+
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-DiGQkv-4.cjs";
|
|
4
4
|
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
|
package/dist/federation/mod.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "../context-
|
|
3
|
+
import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "../context-DKccFiYD.js";
|
|
4
4
|
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "../kv-GFYnFoOl.js";
|
|
5
|
-
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-
|
|
5
|
+
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-Cwmyxyoc.js";
|
|
6
6
|
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
|
package/dist/federation/mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
|
-
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-
|
|
3
|
+
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-DwxnGrIS.js";
|
|
4
4
|
import { isEqual } from "es-toolkit";
|
|
5
5
|
//#region src/federation/kv.ts
|
|
6
6
|
/**
|
|
@@ -8,10 +8,10 @@ import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z
|
|
|
8
8
|
import { t as assertInstanceOf } from "../assert_instance_of-C4Ri6VuN.mjs";
|
|
9
9
|
import { t as assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
|
|
10
10
|
import { t as assert } from "../assert-ddO5KLpe.mjs";
|
|
11
|
-
import { l as verifyRequest } from "../http-
|
|
11
|
+
import { l as verifyRequest } from "../http-T5geHJZX.mjs";
|
|
12
12
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
13
|
-
import { t as doesActorOwnKey } from "../owner-
|
|
14
|
-
import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "../send-
|
|
13
|
+
import { t as doesActorOwnKey } from "../owner-CarLgGMM.mjs";
|
|
14
|
+
import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "../send-7574c5T8.mjs";
|
|
15
15
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
16
16
|
import { Activity, Application, Endpoints, Group, Person, Service } from "@fedify/vocab";
|
|
17
17
|
//#region src/federation/send.test.ts
|
|
@@ -5,7 +5,7 @@ import { n as createRequestContext } from "../context-Juj6bdHC.mjs";
|
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-Duiq_YC9.mjs";
|
|
7
7
|
import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
|
|
8
|
-
import { a as createFederation, o as handleWebFinger } from "../middleware-
|
|
8
|
+
import { a as createFederation, o as handleWebFinger } from "../middleware-C_Q-50Ih.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
import { Image, Link, Person } from "@fedify/vocab";
|
|
11
11
|
//#region src/federation/webfinger.test.ts
|
|
@@ -10,7 +10,7 @@ import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
|
|
10
10
|
import { Item, decodeDict, encodeItem } from "structured-field-values";
|
|
11
11
|
//#region deno.json
|
|
12
12
|
var name = "@fedify/fedify";
|
|
13
|
-
var version = "2.0.
|
|
13
|
+
var version = "2.0.13";
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/sig/key.ts
|
|
16
16
|
/**
|
|
@@ -11,7 +11,7 @@ let byte_encodings_base64 = require("byte-encodings/base64");
|
|
|
11
11
|
let structured_field_values = require("structured-field-values");
|
|
12
12
|
//#region deno.json
|
|
13
13
|
var name = "@fedify/fedify";
|
|
14
|
-
var version = "2.0.
|
|
14
|
+
var version = "2.0.13";
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region src/sig/key.ts
|
|
17
17
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { a as validateCryptoKey, n as fetchKey } from "./key-
|
|
4
|
+
import { n as version, t as name } from "./deno-BIx-_zvq.mjs";
|
|
5
|
+
import { a as validateCryptoKey, n as fetchKey } from "./key-qU9Zi2Ui.mjs";
|
|
6
6
|
import { CryptographicKey } from "@fedify/vocab";
|
|
7
7
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { FetchError } from "@fedify/vocab-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
4
|
+
import { n as version, t as name } from "./deno-BIx-_zvq.mjs";
|
|
5
5
|
import { Activity, getTypeId } from "@fedify/vocab";
|
|
6
6
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
4
|
+
import { n as version, t as name } from "./deno-BIx-_zvq.mjs";
|
|
5
5
|
import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
6
6
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
7
7
|
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
require("./chunk-DDcVe30Y.cjs");
|
|
4
|
-
const require_http = require("./http-
|
|
4
|
+
const require_http = require("./http-DNrAbUAq.cjs");
|
|
5
5
|
let _logtape_logtape = require("@logtape/logtape");
|
|
6
6
|
let es_toolkit = require("es-toolkit");
|
|
7
7
|
let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { c as validateCryptoKey, t as doubleKnock } from "./http-
|
|
3
|
+
import { c as validateCryptoKey, t as doubleKnock } from "./http-D8rvMr4M.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { curry } from "es-toolkit";
|
|
6
6
|
import { UrlError, createActivityPubRequest, getRemoteDocument, logRequest, preloadedContexts, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { a as validateCryptoKey, n as fetchKey } from "./key-
|
|
4
|
+
import { n as version, t as name } from "./deno-BIx-_zvq.mjs";
|
|
5
|
+
import { a as validateCryptoKey, n as fetchKey } from "./key-qU9Zi2Ui.mjs";
|
|
6
6
|
import { Activity, CryptographicKey, Object as Object$1, getTypeId } from "@fedify/vocab";
|
|
7
7
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
@@ -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-DNrAbUAq.cjs");
|
|
6
|
+
const require_proof = require("./proof-Bf-LMGzT.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-CYbRULNv.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");
|
|
@@ -330,7 +330,7 @@ var FederationBuilderImpl = class {
|
|
|
330
330
|
this.collectionTypeIds = {};
|
|
331
331
|
}
|
|
332
332
|
async build(options) {
|
|
333
|
-
const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-
|
|
333
|
+
const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-tdNBgDKC.cjs"));
|
|
334
334
|
const f = new FederationImpl(options);
|
|
335
335
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
336
336
|
f.router = this.router.clone();
|
|
@@ -2798,14 +2798,17 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2798
2798
|
let rsaKey = null;
|
|
2799
2799
|
for (const { keyId, privateKey } of keys) {
|
|
2800
2800
|
require_http.validateCryptoKey(privateKey, "private");
|
|
2801
|
-
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2801
|
+
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") rsaKey = {
|
|
2802
|
+
keyId,
|
|
2803
|
+
privateKey
|
|
2804
|
+
};
|
|
2805
|
+
}
|
|
2806
|
+
for await (const _ of activity.getProofs({ contextLoader })) {
|
|
2807
|
+
proofCreated = true;
|
|
2808
|
+
break;
|
|
2809
|
+
}
|
|
2810
|
+
if (!proofCreated) {
|
|
2811
|
+
for (const { keyId, privateKey } of keys) if (privateKey.algorithm.name === "Ed25519") {
|
|
2809
2812
|
activity = await require_proof.signObject(activity, privateKey, keyId, {
|
|
2810
2813
|
contextLoader,
|
|
2811
2814
|
tracerProvider: this.tracerProvider
|
|
@@ -3395,6 +3398,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3395
3398
|
}
|
|
3396
3399
|
const owner = this.getActorUri(identifier);
|
|
3397
3400
|
const result = [];
|
|
3401
|
+
let i = 1;
|
|
3398
3402
|
for (const keyPair of keyPairs) {
|
|
3399
3403
|
const newPair = {
|
|
3400
3404
|
...keyPair,
|
|
@@ -3404,12 +3408,13 @@ var ContextImpl = class ContextImpl {
|
|
|
3404
3408
|
publicKey: keyPair.publicKey
|
|
3405
3409
|
}),
|
|
3406
3410
|
multikey: new _fedify_vocab.Multikey({
|
|
3407
|
-
id:
|
|
3411
|
+
id: new URL(`#multikey-${i}`, owner),
|
|
3408
3412
|
controller: owner,
|
|
3409
3413
|
publicKey: keyPair.publicKey
|
|
3410
3414
|
})
|
|
3411
3415
|
};
|
|
3412
3416
|
result.push(newPair);
|
|
3417
|
+
i++;
|
|
3413
3418
|
}
|
|
3414
3419
|
return result;
|
|
3415
3420
|
}
|
|
@@ -3547,6 +3552,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3547
3552
|
]);
|
|
3548
3553
|
let keys;
|
|
3549
3554
|
let identifier = null;
|
|
3555
|
+
let actorKeyPairs = null;
|
|
3550
3556
|
if ("identifier" in sender || "username" in sender) {
|
|
3551
3557
|
if ("identifier" in sender) identifier = sender.identifier;
|
|
3552
3558
|
else {
|
|
@@ -3559,8 +3565,13 @@ var ContextImpl = class ContextImpl {
|
|
|
3559
3565
|
}
|
|
3560
3566
|
}
|
|
3561
3567
|
span.setAttribute("fedify.actor.identifier", identifier);
|
|
3562
|
-
|
|
3563
|
-
|
|
3568
|
+
if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
|
|
3569
|
+
actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
3570
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
3571
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
3572
|
+
keyId: kp.keyId,
|
|
3573
|
+
privateKey: kp.privateKey
|
|
3574
|
+
}));
|
|
3564
3575
|
} else if (Array.isArray(sender)) {
|
|
3565
3576
|
if (sender.length < 1) throw new Error("The sender's key pairs are empty.");
|
|
3566
3577
|
keys = sender;
|
|
@@ -3596,6 +3607,16 @@ var ContextImpl = class ContextImpl {
|
|
|
3596
3607
|
});
|
|
3597
3608
|
throw new TypeError("The activity to send must have at least one actor property.");
|
|
3598
3609
|
}
|
|
3610
|
+
if (actorKeyPairs != null) {
|
|
3611
|
+
const contextLoader = this.contextLoader;
|
|
3612
|
+
for (const kp of actorKeyPairs) {
|
|
3613
|
+
if (kp.privateKey.algorithm.name !== "Ed25519" || kp.multikey.id == null) continue;
|
|
3614
|
+
activity = await require_proof.signObject(activity, kp.privateKey, kp.multikey.id, {
|
|
3615
|
+
contextLoader,
|
|
3616
|
+
tracerProvider: this.tracerProvider
|
|
3617
|
+
});
|
|
3618
|
+
}
|
|
3619
|
+
}
|
|
3599
3620
|
const inboxes = extractInboxes({
|
|
3600
3621
|
recipients: expandedRecipients,
|
|
3601
3622
|
preferSharedInbox: options.preferSharedInbox,
|
|
@@ -3913,8 +3934,12 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
3913
3934
|
identifier = mapped;
|
|
3914
3935
|
}
|
|
3915
3936
|
}
|
|
3916
|
-
|
|
3917
|
-
if (
|
|
3937
|
+
const actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
3938
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
3939
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
3940
|
+
keyId: kp.keyId,
|
|
3941
|
+
privateKey: kp.privateKey
|
|
3942
|
+
}));
|
|
3918
3943
|
} else if (Array.isArray(forwarder)) {
|
|
3919
3944
|
if (forwarder.length < 1) throw new Error("The forwarder's key pairs are empty.");
|
|
3920
3945
|
keys = forwarder;
|
|
@@ -2,23 +2,23 @@ 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 { a as validateCryptoKey, i as importJwk, t as exportJwk } from "./key-
|
|
7
|
-
import { l as verifyRequest } from "./http-
|
|
8
|
-
import { t as getAuthenticatedDocumentLoader } from "./docloader-
|
|
5
|
+
import { n as version, t as name } from "./deno-BIx-_zvq.mjs";
|
|
6
|
+
import { a as validateCryptoKey, i as importJwk, t as exportJwk } from "./key-qU9Zi2Ui.mjs";
|
|
7
|
+
import { l as verifyRequest } from "./http-T5geHJZX.mjs";
|
|
8
|
+
import { t as getAuthenticatedDocumentLoader } from "./docloader-yP54jSav.mjs";
|
|
9
9
|
import { n as kvCache } from "./kv-cache-OWmRLHir.mjs";
|
|
10
|
-
import { a as signJsonLd, i as hasSignature, o as verifyJsonLd, r as detachSignature } from "./ld-
|
|
11
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-
|
|
12
|
-
import { n as signObject, r as verifyObject } from "./proof-
|
|
10
|
+
import { a as signJsonLd, i as hasSignature, o as verifyJsonLd, r as detachSignature } from "./ld-zCUbbVV5.mjs";
|
|
11
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-CarLgGMM.mjs";
|
|
12
|
+
import { n as signObject, r as verifyObject } from "./proof-CkuSEndi.mjs";
|
|
13
13
|
import { t as getNodeInfo } from "./client-A1UrnX6I.mjs";
|
|
14
14
|
import { t as nodeInfoToJson } from "./types-C37hquWI.mjs";
|
|
15
|
-
import { n as routeActivity } from "./inbox-
|
|
16
|
-
import { t as FederationBuilderImpl } from "./builder-
|
|
15
|
+
import { n as routeActivity } from "./inbox-Bzg6bZOM.mjs";
|
|
16
|
+
import { t as FederationBuilderImpl } from "./builder-DKltqf8y.mjs";
|
|
17
17
|
import { t as buildCollectionSynchronizationHeader } from "./collection-ChgDTHLz.mjs";
|
|
18
18
|
import { t as KvKeyCache } from "./keycache-DaQ3ndaJ.mjs";
|
|
19
19
|
import { t as acceptsJsonLd } from "./negotiation-BehA2uul.mjs";
|
|
20
20
|
import { t as createExponentialBackoffPolicy } from "./retry-Ddbq3AcK.mjs";
|
|
21
|
-
import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-
|
|
21
|
+
import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-7574c5T8.mjs";
|
|
22
22
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
23
23
|
import { lookupWebFinger } from "@fedify/webfinger";
|
|
24
24
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
@@ -1740,14 +1740,17 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
1740
1740
|
let rsaKey = null;
|
|
1741
1741
|
for (const { keyId, privateKey } of keys) {
|
|
1742
1742
|
validateCryptoKey(privateKey, "private");
|
|
1743
|
-
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1743
|
+
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") rsaKey = {
|
|
1744
|
+
keyId,
|
|
1745
|
+
privateKey
|
|
1746
|
+
};
|
|
1747
|
+
}
|
|
1748
|
+
for await (const _ of activity.getProofs({ contextLoader })) {
|
|
1749
|
+
proofCreated = true;
|
|
1750
|
+
break;
|
|
1751
|
+
}
|
|
1752
|
+
if (!proofCreated) {
|
|
1753
|
+
for (const { keyId, privateKey } of keys) if (privateKey.algorithm.name === "Ed25519") {
|
|
1751
1754
|
activity = await signObject(activity, privateKey, keyId, {
|
|
1752
1755
|
contextLoader,
|
|
1753
1756
|
tracerProvider: this.tracerProvider
|
|
@@ -2337,6 +2340,7 @@ var ContextImpl = class ContextImpl {
|
|
|
2337
2340
|
}
|
|
2338
2341
|
const owner = this.getActorUri(identifier);
|
|
2339
2342
|
const result = [];
|
|
2343
|
+
let i = 1;
|
|
2340
2344
|
for (const keyPair of keyPairs) {
|
|
2341
2345
|
const newPair = {
|
|
2342
2346
|
...keyPair,
|
|
@@ -2346,12 +2350,13 @@ var ContextImpl = class ContextImpl {
|
|
|
2346
2350
|
publicKey: keyPair.publicKey
|
|
2347
2351
|
}),
|
|
2348
2352
|
multikey: new Multikey({
|
|
2349
|
-
id:
|
|
2353
|
+
id: new URL(`#multikey-${i}`, owner),
|
|
2350
2354
|
controller: owner,
|
|
2351
2355
|
publicKey: keyPair.publicKey
|
|
2352
2356
|
})
|
|
2353
2357
|
};
|
|
2354
2358
|
result.push(newPair);
|
|
2359
|
+
i++;
|
|
2355
2360
|
}
|
|
2356
2361
|
return result;
|
|
2357
2362
|
}
|
|
@@ -2489,6 +2494,7 @@ var ContextImpl = class ContextImpl {
|
|
|
2489
2494
|
]);
|
|
2490
2495
|
let keys;
|
|
2491
2496
|
let identifier = null;
|
|
2497
|
+
let actorKeyPairs = null;
|
|
2492
2498
|
if ("identifier" in sender || "username" in sender) {
|
|
2493
2499
|
if ("identifier" in sender) identifier = sender.identifier;
|
|
2494
2500
|
else {
|
|
@@ -2501,8 +2507,13 @@ var ContextImpl = class ContextImpl {
|
|
|
2501
2507
|
}
|
|
2502
2508
|
}
|
|
2503
2509
|
span.setAttribute("fedify.actor.identifier", identifier);
|
|
2504
|
-
|
|
2505
|
-
|
|
2510
|
+
if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
|
|
2511
|
+
actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
2512
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
2513
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
2514
|
+
keyId: kp.keyId,
|
|
2515
|
+
privateKey: kp.privateKey
|
|
2516
|
+
}));
|
|
2506
2517
|
} else if (Array.isArray(sender)) {
|
|
2507
2518
|
if (sender.length < 1) throw new Error("The sender's key pairs are empty.");
|
|
2508
2519
|
keys = sender;
|
|
@@ -2538,6 +2549,16 @@ var ContextImpl = class ContextImpl {
|
|
|
2538
2549
|
});
|
|
2539
2550
|
throw new TypeError("The activity to send must have at least one actor property.");
|
|
2540
2551
|
}
|
|
2552
|
+
if (actorKeyPairs != null) {
|
|
2553
|
+
const contextLoader = this.contextLoader;
|
|
2554
|
+
for (const kp of actorKeyPairs) {
|
|
2555
|
+
if (kp.privateKey.algorithm.name !== "Ed25519" || kp.multikey.id == null) continue;
|
|
2556
|
+
activity = await signObject(activity, kp.privateKey, kp.multikey.id, {
|
|
2557
|
+
contextLoader,
|
|
2558
|
+
tracerProvider: this.tracerProvider
|
|
2559
|
+
});
|
|
2560
|
+
}
|
|
2561
|
+
}
|
|
2541
2562
|
const inboxes = extractInboxes({
|
|
2542
2563
|
recipients: expandedRecipients,
|
|
2543
2564
|
preferSharedInbox: options.preferSharedInbox,
|
|
@@ -2855,8 +2876,12 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
2855
2876
|
identifier = mapped;
|
|
2856
2877
|
}
|
|
2857
2878
|
}
|
|
2858
|
-
|
|
2859
|
-
if (
|
|
2879
|
+
const actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
2880
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
2881
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
2882
|
+
keyId: kp.keyId,
|
|
2883
|
+
privateKey: kp.privateKey
|
|
2884
|
+
}));
|
|
2860
2885
|
} else if (Array.isArray(forwarder)) {
|
|
2861
2886
|
if (forwarder.length < 1) throw new Error("The forwarder's key pairs are empty.");
|
|
2862
2887
|
keys = forwarder;
|
|
@@ -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 { c as validateCryptoKey, i as exportJwk, l as name, r as verifyRequest, s as importJwk, t as doubleKnock, u as version } from "./http-
|
|
6
|
-
import { a as doesActorOwnKey, d as signJsonLd, f as verifyJsonLd, l as detachSignature, n as signObject, o as getKeyOwner, r as verifyObject, u as hasSignature } from "./proof-
|
|
5
|
+
import { c as validateCryptoKey, i as exportJwk, l as name, r as verifyRequest, s as importJwk, t as doubleKnock, u as version } from "./http-D8rvMr4M.js";
|
|
6
|
+
import { a as doesActorOwnKey, d as signJsonLd, f as verifyJsonLd, l as detachSignature, n as signObject, o as getKeyOwner, r as verifyObject, u as hasSignature } from "./proof-CHkVaDwS.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-NUvGSdiX.js";
|
|
9
9
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
10
10
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
11
11
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
@@ -2805,14 +2805,17 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2805
2805
|
let rsaKey = null;
|
|
2806
2806
|
for (const { keyId, privateKey } of keys) {
|
|
2807
2807
|
validateCryptoKey(privateKey, "private");
|
|
2808
|
-
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2808
|
+
if (rsaKey == null && privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") rsaKey = {
|
|
2809
|
+
keyId,
|
|
2810
|
+
privateKey
|
|
2811
|
+
};
|
|
2812
|
+
}
|
|
2813
|
+
for await (const _ of activity.getProofs({ contextLoader })) {
|
|
2814
|
+
proofCreated = true;
|
|
2815
|
+
break;
|
|
2816
|
+
}
|
|
2817
|
+
if (!proofCreated) {
|
|
2818
|
+
for (const { keyId, privateKey } of keys) if (privateKey.algorithm.name === "Ed25519") {
|
|
2816
2819
|
activity = await signObject(activity, privateKey, keyId, {
|
|
2817
2820
|
contextLoader,
|
|
2818
2821
|
tracerProvider: this.tracerProvider
|
|
@@ -3402,6 +3405,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3402
3405
|
}
|
|
3403
3406
|
const owner = this.getActorUri(identifier);
|
|
3404
3407
|
const result = [];
|
|
3408
|
+
let i = 1;
|
|
3405
3409
|
for (const keyPair of keyPairs) {
|
|
3406
3410
|
const newPair = {
|
|
3407
3411
|
...keyPair,
|
|
@@ -3411,12 +3415,13 @@ var ContextImpl = class ContextImpl {
|
|
|
3411
3415
|
publicKey: keyPair.publicKey
|
|
3412
3416
|
}),
|
|
3413
3417
|
multikey: new Multikey({
|
|
3414
|
-
id:
|
|
3418
|
+
id: new URL(`#multikey-${i}`, owner),
|
|
3415
3419
|
controller: owner,
|
|
3416
3420
|
publicKey: keyPair.publicKey
|
|
3417
3421
|
})
|
|
3418
3422
|
};
|
|
3419
3423
|
result.push(newPair);
|
|
3424
|
+
i++;
|
|
3420
3425
|
}
|
|
3421
3426
|
return result;
|
|
3422
3427
|
}
|
|
@@ -3554,6 +3559,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3554
3559
|
]);
|
|
3555
3560
|
let keys;
|
|
3556
3561
|
let identifier = null;
|
|
3562
|
+
let actorKeyPairs = null;
|
|
3557
3563
|
if ("identifier" in sender || "username" in sender) {
|
|
3558
3564
|
if ("identifier" in sender) identifier = sender.identifier;
|
|
3559
3565
|
else {
|
|
@@ -3566,8 +3572,13 @@ var ContextImpl = class ContextImpl {
|
|
|
3566
3572
|
}
|
|
3567
3573
|
}
|
|
3568
3574
|
span.setAttribute("fedify.actor.identifier", identifier);
|
|
3569
|
-
|
|
3570
|
-
|
|
3575
|
+
if (this.federation.actorCallbacks?.keyPairsDispatcher == null) throw new Error("No actor key pairs dispatcher registered.");
|
|
3576
|
+
actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
3577
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
3578
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
3579
|
+
keyId: kp.keyId,
|
|
3580
|
+
privateKey: kp.privateKey
|
|
3581
|
+
}));
|
|
3571
3582
|
} else if (Array.isArray(sender)) {
|
|
3572
3583
|
if (sender.length < 1) throw new Error("The sender's key pairs are empty.");
|
|
3573
3584
|
keys = sender;
|
|
@@ -3603,6 +3614,16 @@ var ContextImpl = class ContextImpl {
|
|
|
3603
3614
|
});
|
|
3604
3615
|
throw new TypeError("The activity to send must have at least one actor property.");
|
|
3605
3616
|
}
|
|
3617
|
+
if (actorKeyPairs != null) {
|
|
3618
|
+
const contextLoader = this.contextLoader;
|
|
3619
|
+
for (const kp of actorKeyPairs) {
|
|
3620
|
+
if (kp.privateKey.algorithm.name !== "Ed25519" || kp.multikey.id == null) continue;
|
|
3621
|
+
activity = await signObject(activity, kp.privateKey, kp.multikey.id, {
|
|
3622
|
+
contextLoader,
|
|
3623
|
+
tracerProvider: this.tracerProvider
|
|
3624
|
+
});
|
|
3625
|
+
}
|
|
3626
|
+
}
|
|
3606
3627
|
const inboxes = extractInboxes({
|
|
3607
3628
|
recipients: expandedRecipients,
|
|
3608
3629
|
preferSharedInbox: options.preferSharedInbox,
|
|
@@ -3920,8 +3941,12 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
3920
3941
|
identifier = mapped;
|
|
3921
3942
|
}
|
|
3922
3943
|
}
|
|
3923
|
-
|
|
3924
|
-
if (
|
|
3944
|
+
const actorKeyPairs = await this.getActorKeyPairs(identifier);
|
|
3945
|
+
if (actorKeyPairs.length < 1) throw new Error(`No key pair found for actor ${JSON.stringify(identifier)}.`);
|
|
3946
|
+
keys = actorKeyPairs.map((kp) => ({
|
|
3947
|
+
keyId: kp.keyId,
|
|
3948
|
+
privateKey: kp.privateKey
|
|
3949
|
+
}));
|
|
3925
3950
|
} else if (Array.isArray(forwarder)) {
|
|
3926
3951
|
if (forwarder.length < 1) throw new Error("The forwarder's key pairs are empty.");
|
|
3927
3952
|
keys = forwarder;
|
|
@@ -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-Br8eGgWB.cjs");
|
|
4
4
|
exports.FederationImpl = require_middleware.FederationImpl;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-
|
|
3
|
+
import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-DKccFiYD.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 { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-
|
|
1
|
+
import { X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, mt as WebFingerLinksDispatcher, s as RequestContext } from "./context-Kt2s6UWW.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-DNrAbUAq.cjs");
|
|
8
|
+
const require_middleware = require("./middleware-Br8eGgWB.cjs");
|
|
9
|
+
const require_proof = require("./proof-Bf-LMGzT.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-CYbRULNv.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 { a as signRequest, c as FetchKeyResult, d as fetchKey, f as generateCryptoKeyPair, i as VerifyRequestOptions, l as KeyCache, n as HttpMessageSignaturesSpecDeterminer, o as verifyRequest, p as importJwk, r as SignRequestOptions, s as FetchKeyOptions, t as HttpMessageSignaturesSpec, u as exportJwk } from "./http-C_tEAiZj.cjs";
|
|
3
3
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-CptqhsOy.cjs";
|
|
4
|
-
import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-
|
|
4
|
+
import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-Kt2s6UWW.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-DiGQkv-4.cjs";
|
|
8
8
|
import { _ as verifyJsonLd, a as createProof, c as verifyProof, d as VerifyJsonLdOptions, f as VerifySignatureOptions, g as signJsonLd, h as detachSignature, i as VerifyProofOptions, l as CreateSignatureOptions, m as createSignature, n as SignObjectOptions, o as signObject, p as attachSignature, r as VerifyObjectOptions, s as verifyObject, t as CreateProofOptions, u as SignJsonLdOptions, v as verifySignature } from "./mod-1xhgsHef.cjs";
|
|
9
9
|
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-Bld7oeqf.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 { a as signRequest, c as FetchKeyResult, d as fetchKey, f as generateCryptoKeyPair, i as VerifyRequestOptions, l as KeyCache, n as HttpMessageSignaturesSpecDeterminer, o as verifyRequest, p as importJwk, r as SignRequestOptions, s as FetchKeyOptions, t as HttpMessageSignaturesSpec, u as exportJwk } from "./http-B2wiNmSo.js";
|
|
5
5
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-74ARJ5TL.js";
|
|
6
|
-
import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-
|
|
6
|
+
import { $ as AuthorizePredicate, A as CreateExponentialBackoffPolicyOptions, B as RespondWithObjectOptions, C as InboxListenerSetters, D as FederationOrigin, E as FederationKvPrefixes, F as createFederationBuilder, G as MessageQueue, H as respondWithObjectIfAcceptable, I as Router, J as ParallelMessageQueue, K as MessageQueueEnqueueOptions, L as RouterError, M as RetryPolicy, N as createExponentialBackoffPolicy, O as FederationQueueOptions, P as Message, Q as ActorKeyPairsDispatcher, R as RouterOptions, S as IdempotencyStrategy, T as Rfc6570Expression, U as InProcessMessageQueue, V as respondWithObject, W as InProcessMessageQueueOptions, X as ActorDispatcher, Y as ActorAliasMapper, Z as ActorHandleMapper, _ as FederationBuilder, _t as PageItems, a as InboxContext, at as CustomCollectionDispatcher, b as FederationStartQueueOptions, bt as ActivityTransformer, c as RouteActivityOptions, ct as NodeInfoDispatcher, d as ActorCallbackSetters, dt as OutboxErrorHandler, et as CollectionCounter, f as CollectionCallbackSetters, ft as OutboxPermanentFailureHandler, g as Federation, gt as SenderKeyPair, h as Federatable, ht as SendActivityError, i as GetSignedKeyOptions, it as CustomCollectionCursor, j as RetryContext, k as createFederation, l as SendActivityOptions, lt as ObjectAuthorizePredicate, m as CustomCollectionCallbackSetters, mt as WebFingerLinksDispatcher, n as Context, nt as CollectionDispatcher, o as ParseUriResult, ot as InboxErrorHandler, p as ConstructorWithTypeId, pt as SharedInboxKeyDispatcher, q as MessageQueueListenOptions, r as ForwardActivityOptions, rt as CustomCollectionCounter, s as RequestContext, st as InboxListener, t as ActorKeyPair, tt as CollectionCursor, u as SendActivityOptionsForCollection, ut as ObjectDispatcher, v as FederationFetchOptions, vt as buildCollectionSynchronizationHeader, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, yt as digest, z as RouterRouteResult } from "./context-DKccFiYD.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-Cwmyxyoc.js";
|
|
10
10
|
import { _ as verifyJsonLd, a as createProof, c as verifyProof, d as VerifyJsonLdOptions, f as VerifySignatureOptions, g as signJsonLd, h as detachSignature, i as VerifyProofOptions, l as CreateSignatureOptions, m as createSignature, n as SignObjectOptions, o as signObject, p as attachSignature, r as VerifyObjectOptions, s as verifyObject, t as CreateProofOptions, u as SignJsonLdOptions, v as verifySignature } from "./mod-BGtYJZKu.js";
|
|
11
11
|
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-DTOUyCce.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 fetchKey, i as exportJwk, n as signRequest, o as generateCryptoKeyPair, r as verifyRequest, s 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 doesActorOwnKey, c as createSignature, d as signJsonLd, f as verifyJsonLd, i as verifyProof, l as detachSignature, n as signObject, o as getKeyOwner, p as verifySignature, r as verifyObject, s as attachSignature, t as createProof } from "./proof-
|
|
6
|
+
import { a as fetchKey, i as exportJwk, n as signRequest, o as generateCryptoKeyPair, r as verifyRequest, s as importJwk } from "./http-D8rvMr4M.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-DwxnGrIS.js";
|
|
8
|
+
import { a as doesActorOwnKey, c as createSignature, d as signJsonLd, f as verifyJsonLd, i as verifyProof, l as detachSignature, n as signObject, o as getKeyOwner, p as verifySignature, r as verifyObject, s as attachSignature, t as createProof } from "./proof-CHkVaDwS.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-NUvGSdiX.js";
|
|
11
11
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation/mod.js";
|
|
12
12
|
import "./nodeinfo/mod.js";
|
|
13
13
|
import "./runtime/mod.js";
|
|
@@ -5,7 +5,7 @@ import { n as createRequestContext } from "../context-Juj6bdHC.mjs";
|
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-Duiq_YC9.mjs";
|
|
7
7
|
import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
|
|
8
|
-
import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-
|
|
8
|
+
import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-C_Q-50Ih.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
//#region src/nodeinfo/handler.test.ts
|
|
11
11
|
test("handleNodeInfo()", async () => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import "./key-
|
|
4
|
+
import { n as version, t as name } from "./deno-BIx-_zvq.mjs";
|
|
5
|
+
import "./key-qU9Zi2Ui.mjs";
|
|
6
6
|
import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
const require_chunk = require("./chunk-DDcVe30Y.cjs");
|
|
4
|
-
const require_http = require("./http-
|
|
4
|
+
const require_http = require("./http-DNrAbUAq.cjs");
|
|
5
5
|
let _logtape_logtape = require("@logtape/logtape");
|
|
6
6
|
let _fedify_vocab = require("@fedify/vocab");
|
|
7
7
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
|
-
import { a as fetchKey, c as validateCryptoKey, l as name, u as version } from "./http-
|
|
3
|
+
import { a as fetchKey, c as validateCryptoKey, l as name, u as version } from "./http-D8rvMr4M.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "@fedify/vocab";
|
|
6
6
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { a as validateCryptoKey, n as fetchKey } from "./key-
|
|
4
|
+
import { n as version, t as name } from "./deno-BIx-_zvq.mjs";
|
|
5
|
+
import { a as validateCryptoKey, n as fetchKey } from "./key-qU9Zi2Ui.mjs";
|
|
6
6
|
import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
|
|
7
7
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { n as version, t as name } from "./deno-BIx-_zvq.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-T5geHJZX.mjs";
|
|
6
6
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
//#region src/federation/send.ts
|
package/dist/sig/http.test.mjs
CHANGED
|
@@ -7,8 +7,8 @@ import { a as assertExists, t as assertStringIncludes } from "../std__assert-Dui
|
|
|
7
7
|
import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
8
8
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
9
9
|
import { t as assert } from "../assert-ddO5KLpe.mjs";
|
|
10
|
-
import { t as exportJwk } from "../key-
|
|
11
|
-
import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase } from "../http-
|
|
10
|
+
import { t as exportJwk } from "../key-qU9Zi2Ui.mjs";
|
|
11
|
+
import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase } from "../http-T5geHJZX.mjs";
|
|
12
12
|
import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-CtZLJq76.mjs";
|
|
13
13
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
14
14
|
import { exportSpki } from "@fedify/vocab-runtime";
|
package/dist/sig/key.test.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
|
5
5
|
import "../std__assert-Duiq_YC9.mjs";
|
|
6
6
|
import { t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
7
7
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
8
|
-
import { a as validateCryptoKey, i as importJwk, n as fetchKey, r as generateCryptoKeyPair, t as exportJwk } from "../key-
|
|
8
|
+
import { a as validateCryptoKey, i as importJwk, n as fetchKey, r as generateCryptoKeyPair, t as exportJwk } from "../key-qU9Zi2Ui.mjs";
|
|
9
9
|
import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
10
10
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
11
11
|
import { CryptographicKey, Multikey } from "@fedify/vocab";
|
package/dist/sig/ld.test.mjs
CHANGED
|
@@ -5,9 +5,9 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
|
5
5
|
import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
6
6
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
7
7
|
import { t as assert } from "../assert-ddO5KLpe.mjs";
|
|
8
|
-
import { r as generateCryptoKeyPair } from "../key-
|
|
8
|
+
import { r as generateCryptoKeyPair } from "../key-qU9Zi2Ui.mjs";
|
|
9
9
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
10
|
-
import { a as signJsonLd, n as createSignature, o as verifyJsonLd, r as detachSignature, s as verifySignature, t as attachSignature } from "../ld-
|
|
10
|
+
import { a as signJsonLd, n as createSignature, o as verifyJsonLd, r as detachSignature, s as verifySignature, t as attachSignature } from "../ld-zCUbbVV5.mjs";
|
|
11
11
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
12
12
|
import { CryptographicKey } from "@fedify/vocab";
|
|
13
13
|
import { encodeBase64 } from "byte-encodings/base64";
|
package/dist/sig/mod.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const require_http = require("../http-
|
|
5
|
-
const require_proof = require("../proof-
|
|
4
|
+
const require_http = require("../http-DNrAbUAq.cjs");
|
|
5
|
+
const require_proof = require("../proof-Bf-LMGzT.cjs");
|
|
6
6
|
exports.attachSignature = require_proof.attachSignature;
|
|
7
7
|
exports.createProof = require_proof.createProof;
|
|
8
8
|
exports.createSignature = require_proof.createSignature;
|
package/dist/sig/mod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
|
-
import { a as fetchKey, i as exportJwk, n as signRequest, o as generateCryptoKeyPair, r as verifyRequest, s as importJwk } from "../http-
|
|
4
|
-
import { a as doesActorOwnKey, c as createSignature, d as signJsonLd, f as verifyJsonLd, i as verifyProof, l as detachSignature, n as signObject, o as getKeyOwner, p as verifySignature, r as verifyObject, s as attachSignature, t as createProof } from "../proof-
|
|
3
|
+
import { a as fetchKey, i as exportJwk, n as signRequest, o as generateCryptoKeyPair, r as verifyRequest, s as importJwk } from "../http-D8rvMr4M.js";
|
|
4
|
+
import { a as doesActorOwnKey, c as createSignature, d as signJsonLd, f as verifyJsonLd, i as verifyProof, l as detachSignature, n as signObject, o as getKeyOwner, p as verifySignature, r as verifyObject, s as attachSignature, t as createProof } from "../proof-CHkVaDwS.js";
|
|
5
5
|
export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getKeyOwner, importJwk, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|
package/dist/sig/owner.test.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import "../std__assert-Duiq_YC9.mjs";
|
|
|
6
6
|
import { n as assertFalse } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
7
7
|
import { t as assert } from "../assert-ddO5KLpe.mjs";
|
|
8
8
|
import { o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-CtZLJq76.mjs";
|
|
9
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-
|
|
9
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-CarLgGMM.mjs";
|
|
10
10
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
11
11
|
import { Create, CryptographicKey, lookupObject } from "@fedify/vocab";
|
|
12
12
|
//#region src/sig/owner.test.ts
|
package/dist/sig/proof.test.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import "../std__assert-Duiq_YC9.mjs";
|
|
|
6
6
|
import { t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
7
7
|
import { t as assertInstanceOf } from "../assert_instance_of-C4Ri6VuN.mjs";
|
|
8
8
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
9
|
-
import { i as verifyProof, n as signObject, r as verifyObject, t as createProof } from "../proof-
|
|
9
|
+
import { i as verifyProof, n as signObject, r as verifyObject, t as createProof } from "../proof-CkuSEndi.mjs";
|
|
10
10
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
11
11
|
import { Create, DataIntegrityProof, Multikey, Note, Place } from "@fedify/vocab";
|
|
12
12
|
import { decodeMultibase, importMultibaseKey } from "@fedify/vocab-runtime";
|
package/dist/testing/mod.d.mts
CHANGED
|
@@ -2041,7 +2041,10 @@ interface GetSignedKeyOptions {
|
|
|
2041
2041
|
*/
|
|
2042
2042
|
interface ActorKeyPair extends CryptoKeyPair {
|
|
2043
2043
|
/**
|
|
2044
|
-
* The URI of the public key, which is used for
|
|
2044
|
+
* The URI of the public key for {@link CryptographicKey}, which is used for
|
|
2045
|
+
* verifying HTTP Signatures and Linked Data Signatures. Note that this is
|
|
2046
|
+
* the ID of the {@link cryptographicKey}, not of the {@link multikey};
|
|
2047
|
+
* the {@link Multikey} instance has a distinct ID of its own.
|
|
2045
2048
|
*/
|
|
2046
2049
|
readonly keyId: URL;
|
|
2047
2050
|
/**
|
|
@@ -5,9 +5,9 @@ import { t as esm_default } from "../esm-DVILvP5e.mjs";
|
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-Duiq_YC9.mjs";
|
|
7
7
|
import { t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
8
|
-
import { l as verifyRequest } from "../http-
|
|
8
|
+
import { l as verifyRequest } from "../http-T5geHJZX.mjs";
|
|
9
9
|
import { i as rsaPrivateKey2 } from "../keys-CtZLJq76.mjs";
|
|
10
|
-
import { t as getAuthenticatedDocumentLoader } from "../docloader-
|
|
10
|
+
import { t as getAuthenticatedDocumentLoader } from "../docloader-yP54jSav.mjs";
|
|
11
11
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
12
12
|
import { UrlError } from "@fedify/vocab-runtime";
|
|
13
13
|
//#region src/utils/docloader.test.ts
|
package/dist/utils/mod.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const require_kv_cache = require("../kv-cache-
|
|
4
|
+
const require_kv_cache = require("../kv-cache-CYbRULNv.cjs");
|
|
5
5
|
exports.getAuthenticatedDocumentLoader = require_kv_cache.getAuthenticatedDocumentLoader;
|
|
6
6
|
exports.kvCache = require_kv_cache.kvCache;
|
package/dist/utils/mod.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "../kv-cache-
|
|
3
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "../kv-cache-NUvGSdiX.js";
|
|
4
4
|
export { getAuthenticatedDocumentLoader, kvCache };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/fedify",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.13",
|
|
4
4
|
"description": "An ActivityPub server framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ActivityPub",
|
|
@@ -144,9 +144,9 @@
|
|
|
144
144
|
"uri-template-router": "^1.0.0",
|
|
145
145
|
"url-template": "^3.1.1",
|
|
146
146
|
"urlpattern-polyfill": "^10.1.0",
|
|
147
|
-
"@fedify/
|
|
148
|
-
"@fedify/
|
|
149
|
-
"@fedify/vocab
|
|
147
|
+
"@fedify/webfinger": "2.0.13",
|
|
148
|
+
"@fedify/vocab-runtime": "2.0.13",
|
|
149
|
+
"@fedify/vocab": "2.0.13"
|
|
150
150
|
},
|
|
151
151
|
"devDependencies": {
|
|
152
152
|
"@std/assert": "npm:@jsr/std__assert@^0.226.0",
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"tsx": "^4.19.4",
|
|
159
159
|
"typescript": "^5.9.2",
|
|
160
160
|
"wrangler": "^4.17.0",
|
|
161
|
-
"@fedify/vocab-tools": "^2.0.
|
|
161
|
+
"@fedify/vocab-tools": "^2.0.13",
|
|
162
162
|
"@fedify/fixture": "2.0.0"
|
|
163
163
|
},
|
|
164
164
|
"scripts": {
|