@fedify/fedify 2.3.0-dev.1013 → 2.3.0-dev.1021

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.
Files changed (54) hide show
  1. package/dist/{builder-CROLcFVM.mjs → builder-Nn2r1dKd.mjs} +13 -3
  2. package/dist/compat/mod.d.cts +1 -1
  3. package/dist/compat/mod.d.ts +1 -1
  4. package/dist/compat/transformers.test.mjs +1 -1
  5. package/dist/{context-BDl7Y6f-.d.cts → context-Bxs4cdIZ.d.cts} +12 -0
  6. package/dist/{context-zTZAI3KP.d.ts → context-CVNXcFHR.d.ts} +12 -0
  7. package/dist/{deno-Ctd-K-t6.mjs → deno-BnQyJ03o.mjs} +1 -1
  8. package/dist/{docloader-q9QT51g3.mjs → docloader-mEJ3hsMB.mjs} +2 -2
  9. package/dist/federation/builder.test.mjs +7 -2
  10. package/dist/federation/handler.test.mjs +2 -2
  11. package/dist/federation/idempotency.test.mjs +2 -2
  12. package/dist/federation/middleware.test.mjs +41 -9
  13. package/dist/federation/mod.cjs +1 -1
  14. package/dist/federation/mod.d.cts +2 -2
  15. package/dist/federation/mod.d.ts +2 -2
  16. package/dist/federation/mod.js +1 -1
  17. package/dist/federation/send.test.mjs +3 -3
  18. package/dist/federation/webfinger.test.mjs +1 -1
  19. package/dist/{http-1NL30qCe.js → http-BJ-t29n_.js} +1 -1
  20. package/dist/{http-CX_zHeOD.mjs → http-CfToB_iu.mjs} +2 -2
  21. package/dist/{http-Du1Jgf2P.cjs → http-D4xMqSqO.cjs} +1 -1
  22. package/dist/{key-C1Oto4it.mjs → key-CeANlo1H.mjs} +1 -1
  23. package/dist/{kv-cache-CsC3P4uu.js → kv-cache-B142kDZL.js} +1 -1
  24. package/dist/{kv-cache-aGOwL6Vj.cjs → kv-cache-DRwOjOkl.cjs} +1 -1
  25. package/dist/{ld-Dl1HIB1a.mjs → ld-CUlVC-TS.mjs} +2 -2
  26. package/dist/{middleware-BwC5U8zJ.cjs → middleware-ASvK22Do.cjs} +1 -1
  27. package/dist/{middleware-CEWDB8EB.mjs → middleware-BPZEcrMG.mjs} +17 -14
  28. package/dist/{middleware-C1cf3_6V.mjs → middleware-Cgy7UwfR.mjs} +1 -1
  29. package/dist/{middleware-CKJC8DRf.js → middleware-CysDkaXo.js} +21 -8
  30. package/dist/{middleware-BiFLcrEX.cjs → middleware-I5XEZ_pZ.cjs} +22 -9
  31. package/dist/{mod-ckCOmoCz.d.ts → mod-Bc6p4npy.d.ts} +1 -1
  32. package/dist/{mod-BghZgD_U.d.cts → mod-zA6NZHUG.d.cts} +1 -1
  33. package/dist/mod.cjs +4 -4
  34. package/dist/mod.d.cts +2 -2
  35. package/dist/mod.d.ts +2 -2
  36. package/dist/mod.js +4 -4
  37. package/dist/nodeinfo/handler.test.mjs +1 -1
  38. package/dist/{owner-CEWFJlqo.mjs → owner-CuW0S2XY.mjs} +2 -2
  39. package/dist/{proof-BFyPVl1r.mjs → proof-CFPGr1xC.mjs} +2 -2
  40. package/dist/{proof-Dedf8md5.js → proof-CtMmqa09.js} +1 -1
  41. package/dist/{proof-CDA3f-i5.cjs → proof-oGiWJkX0.cjs} +1 -1
  42. package/dist/{send-BJickEP4.mjs → send-dhl-s8G0.mjs} +2 -2
  43. package/dist/sig/http.test.mjs +2 -2
  44. package/dist/sig/key.test.mjs +1 -1
  45. package/dist/sig/ld.test.mjs +2 -2
  46. package/dist/sig/mod.cjs +2 -2
  47. package/dist/sig/mod.js +2 -2
  48. package/dist/sig/owner.test.mjs +1 -1
  49. package/dist/sig/proof.test.mjs +1 -1
  50. package/dist/testing/mod.d.mts +12 -0
  51. package/dist/utils/docloader.test.mjs +2 -2
  52. package/dist/utils/mod.cjs +1 -1
  53. package/dist/utils/mod.js +1 -1
  54. package/package.json +5 -5
@@ -2,12 +2,13 @@ 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-Ctd-K-t6.mjs";
5
+ import { n as version, t as name } from "./deno-BnQyJ03o.mjs";
6
6
  import { t as ActivityListenerSet } from "./activity-listener-ell7W1s9.mjs";
7
7
  import { Tombstone, getTypeId } from "@fedify/vocab";
8
8
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
9
9
  import { getLogger } from "@logtape/logtape";
10
10
  //#region src/federation/builder.ts
11
+ const ACTOR_ALIAS_PREFIX = "actorAlias:";
11
12
  function validateSingleIdentifierVariablePath(path, errorMessage) {
12
13
  const operatorMatches = globalThis.Array.from(path.matchAll(/{([+#./;?&]?)([A-Za-z_][A-Za-z0-9_]*)}/g));
13
14
  if (operatorMatches.length !== 1 || operatorMatches[0]?.[2] !== "identifier") throw new RouterError(errorMessage);
@@ -58,7 +59,7 @@ var FederationBuilderImpl = class {
58
59
  this.collectionTypeIds = {};
59
60
  }
60
61
  async build(options) {
61
- const { FederationImpl } = await import("./middleware-C1cf3_6V.mjs");
62
+ const { FederationImpl } = await import("./middleware-Cgy7UwfR.mjs");
62
63
  const f = new FederationImpl(options);
63
64
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
64
65
  f.router = this.router.clone();
@@ -194,6 +195,15 @@ var FederationBuilderImpl = class {
194
195
  callbacks.aliasMapper = mapper;
195
196
  return setters;
196
197
  },
198
+ mapActorAlias: (path, identifier) => {
199
+ if (identifier === "") throw new RouterError("Identifier cannot be empty.");
200
+ if (this.router.has(`actorAlias:${identifier}`)) throw new RouterError(`Actor alias for "${identifier}" already set.`);
201
+ if (new Router().add(path, "temp").size > 0) throw new RouterError("Path for actor alias must have no variables.");
202
+ const existingRoute = this.router.route(path);
203
+ if (existingRoute != null) throw new RouterError(`Actor alias path "${path}" conflicts with existing route "${existingRoute.name}".`);
204
+ this.router.add(path, `${ACTOR_ALIAS_PREFIX}${identifier}`);
205
+ return setters;
206
+ },
197
207
  authorize(predicate) {
198
208
  callbacks.authorizePredicate = predicate;
199
209
  return setters;
@@ -578,4 +588,4 @@ function createFederationBuilder() {
578
588
  return new FederationBuilderImpl();
579
589
  }
580
590
  //#endregion
581
- export { createFederationBuilder as n, FederationBuilderImpl as t };
591
+ export { FederationBuilderImpl as n, createFederationBuilder as r, ACTOR_ALIAS_PREFIX as t };
@@ -1,4 +1,4 @@
1
- import { kt as ActivityTransformer, n as Context } from "../context-BDl7Y6f-.cjs";
1
+ import { kt as ActivityTransformer, n as Context } from "../context-Bxs4cdIZ.cjs";
2
2
  import { Activity } from "@fedify/vocab";
3
3
 
4
4
  //#region src/compat/transformers.d.ts
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { kt as ActivityTransformer, n as Context } from "../context-zTZAI3KP.js";
3
+ import { kt as ActivityTransformer, n as Context } from "../context-CVNXcFHR.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-DikXweDx.mjs";
7
7
  import { t as MemoryKvStore } from "../kv-rV3vodCc.mjs";
8
- import { n as FederationImpl, v as actorDehydrator, y as autoIdAssigner } from "../middleware-CEWDB8EB.mjs";
8
+ import { n as FederationImpl, v as actorDehydrator, y as autoIdAssigner } from "../middleware-BPZEcrMG.mjs";
9
9
  import { test } from "@fedify/fixture";
10
10
  import { Follow, Person } from "@fedify/vocab";
11
11
  //#region src/compat/transformers.test.ts
@@ -1681,6 +1681,18 @@ interface ActorCallbackSetters<TContextData> {
1681
1681
  */
1682
1682
  mapAlias(mapper: ActorAliasMapper<TContextData>): ActorCallbackSetters<TContextData>;
1683
1683
  /**
1684
+ * Maps a fixed path to a sentinel identifier. It is useful for exposing
1685
+ * a single, instance-level actor at a fixed path, such as `/actor` for
1686
+ * a relay or `/bot` for a bot.
1687
+ * @param path The fixed path to map to the identifier.
1688
+ * @param identifier The sentinel identifier to map the path to.
1689
+ * @returns The setters object so that settings can be chained.
1690
+ * @throws {RouterError} If the provided path or identifier is invalid or fails
1691
+ * runtime validation.
1692
+ * @since 2.3.0
1693
+ */
1694
+ mapActorAlias(path: `/${string}`, identifier: string): ActorCallbackSetters<TContextData>;
1695
+ /**
1684
1696
  * Specifies the conditions under which requests are authorized.
1685
1697
  * @param predicate A callback that returns whether a request is authorized.
1686
1698
  * @returns The setters object so that settings can be chained.
@@ -1683,6 +1683,18 @@ interface ActorCallbackSetters<TContextData> {
1683
1683
  */
1684
1684
  mapAlias(mapper: ActorAliasMapper<TContextData>): ActorCallbackSetters<TContextData>;
1685
1685
  /**
1686
+ * Maps a fixed path to a sentinel identifier. It is useful for exposing
1687
+ * a single, instance-level actor at a fixed path, such as `/actor` for
1688
+ * a relay or `/bot` for a bot.
1689
+ * @param path The fixed path to map to the identifier.
1690
+ * @param identifier The sentinel identifier to map the path to.
1691
+ * @returns The setters object so that settings can be chained.
1692
+ * @throws {RouterError} If the provided path or identifier is invalid or fails
1693
+ * runtime validation.
1694
+ * @since 2.3.0
1695
+ */
1696
+ mapActorAlias(path: `/${string}`, identifier: string): ActorCallbackSetters<TContextData>;
1697
+ /**
1686
1698
  * Specifies the conditions under which requests are authorized.
1687
1699
  * @param predicate A callback that returns whether a request is authorized.
1688
1700
  * @returns The setters object so that settings can be chained.
@@ -3,6 +3,6 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  //#region deno.json
5
5
  var name = "@fedify/fedify";
6
- var version = "2.3.0-dev.1013+4aa6a88c";
6
+ var version = "2.3.0-dev.1021+ab2fa4a9";
7
7
  //#endregion
8
8
  export { version as n, name as t };
@@ -1,8 +1,8 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { o as validateCryptoKey } from "./key-C1Oto4it.mjs";
5
- import { n as doubleKnock } from "./http-CX_zHeOD.mjs";
4
+ import { o as validateCryptoKey } from "./key-CeANlo1H.mjs";
5
+ import { n as doubleKnock } from "./http-CfToB_iu.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";
@@ -6,7 +6,7 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
6
  import { i as assertExists } from "../std__assert-CRDpx_HF.mjs";
7
7
  import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
8
8
  import { t as MemoryKvStore } from "../kv-rV3vodCc.mjs";
9
- import { n as createFederationBuilder } from "../builder-CROLcFVM.mjs";
9
+ import { r as createFederationBuilder } from "../builder-Nn2r1dKd.mjs";
10
10
  import { test } from "@fedify/fixture";
11
11
  import { Activity, Note, Person } from "@fedify/vocab";
12
12
  //#region src/federation/builder.test.ts
@@ -17,7 +17,11 @@ test("FederationBuilder", async (t) => {
17
17
  const actorDispatcher = (_ctx, _identifier) => {
18
18
  return null;
19
19
  };
20
- builder.setActorDispatcher("/users/{identifier}", actorDispatcher);
20
+ assertThrows(() => createFederationBuilder().setActorDispatcher("/users/{identifier}", actorDispatcher).mapActorAlias("/actor/{id}", "instance"), RouterError, "Path for actor alias must have no variables.");
21
+ assertThrows(() => createFederationBuilder().setActorDispatcher("/users/{identifier}", actorDispatcher).mapActorAlias("/actor", "instance").mapActorAlias("/bot", "instance"), RouterError, "Actor alias for \"instance\" already set.");
22
+ assertThrows(() => createFederationBuilder().setActorDispatcher("/users/{identifier}", actorDispatcher).mapActorAlias("/actor", "instance").mapActorAlias("/actor", "bot"), RouterError, "Actor alias path \"/actor\" conflicts with existing route \"actorAlias:instance\".");
23
+ assertThrows(() => createFederationBuilder().setActorDispatcher("/users/{identifier}", actorDispatcher).mapActorAlias("/actor", ""), RouterError, "Identifier cannot be empty.");
24
+ builder.setActorDispatcher("/users/{identifier}", actorDispatcher).mapActorAlias("/actor", "instance");
21
25
  const inboxListener = (_ctx, _activity) => {};
22
26
  builder.setInboxListeners("/users/{identifier}/inbox").on(Activity, inboxListener);
23
27
  const outboxListener = (_ctx, _activity) => {};
@@ -52,6 +56,7 @@ test("FederationBuilder", async (t) => {
52
56
  const impl = federation;
53
57
  assertEquals(impl.router.route("/.well-known/webfinger")?.name, "webfinger");
54
58
  assertEquals(impl.router.route("/users/test123")?.name, "actor");
59
+ assertEquals(impl.router.route("/actor")?.name, "actorAlias:instance");
55
60
  assertEquals(impl.router.route("/users/test123/inbox")?.name, "inbox");
56
61
  assertEquals(impl.router.route("/users/test123/outbox")?.name, "outbox");
57
62
  assertEquals(impl.router.route("/notes/456")?.name, `object:${Note.typeId.href}`);
@@ -7,10 +7,10 @@ import "../std__assert-CRDpx_HF.mjs";
7
7
  import { t as assertInstanceOf } from "../assert_instance_of-C4Ri6VuN.mjs";
8
8
  import { t as assert } from "../assert-DikXweDx.mjs";
9
9
  import { r as parseAcceptSignature } from "../accept-CPkZzmGN.mjs";
10
- import { s as signRequest } from "../http-CX_zHeOD.mjs";
10
+ import { s as signRequest } from "../http-CfToB_iu.mjs";
11
11
  import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-DGu1NFwu.mjs";
12
12
  import { t as MemoryKvStore } from "../kv-rV3vodCc.mjs";
13
- import { c as handleActor, d as handleInbox, f as handleObject, h as respondWithObjectIfAcceptable, l as handleCollection, m as respondWithObject, o as createFederation, p as handleOutbox, u as handleCustomCollection } from "../middleware-CEWDB8EB.mjs";
13
+ import { c as handleActor, d as handleInbox, f as handleObject, h as respondWithObjectIfAcceptable, l as handleCollection, m as respondWithObject, o as createFederation, p as handleOutbox, u as handleCustomCollection } from "../middleware-BPZEcrMG.mjs";
14
14
  import { t as ActivityListenerSet } from "../activity-listener-ell7W1s9.mjs";
15
15
  import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
16
16
  import { Activity, Create, Note, Person, Tombstone } from "@fedify/vocab";
@@ -4,9 +4,9 @@ globalThis.addEventListener = () => {};
4
4
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import "../std__assert-CRDpx_HF.mjs";
6
6
  import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-DGu1NFwu.mjs";
7
- import { r as signObject } from "../proof-BFyPVl1r.mjs";
7
+ import { r as signObject } from "../proof-CFPGr1xC.mjs";
8
8
  import { t as MemoryKvStore } from "../kv-rV3vodCc.mjs";
9
- import { o as createFederation } from "../middleware-CEWDB8EB.mjs";
9
+ import { o as createFederation } from "../middleware-BPZEcrMG.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
@@ -4,21 +4,21 @@ globalThis.addEventListener = () => {};
4
4
  import { t as esm_default } from "../esm-DVILvP5e.mjs";
5
5
  import { n as RouterError } from "../router-CrMLXoOr.mjs";
6
6
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
7
- import "../std__assert-CRDpx_HF.mjs";
7
+ import { i as assertExists } from "../std__assert-CRDpx_HF.mjs";
8
8
  import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
9
9
  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 assertStrictEquals } from "../assert_strict_equals-Dmjbg-bA.mjs";
13
13
  import { t as assert } from "../assert-DikXweDx.mjs";
14
- import { l as verifyRequest, s as signRequest } from "../http-CX_zHeOD.mjs";
14
+ import { l as verifyRequest, s as signRequest } from "../http-CfToB_iu.mjs";
15
15
  import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DGu1NFwu.mjs";
16
- import { t as getAuthenticatedDocumentLoader } from "../docloader-q9QT51g3.mjs";
17
- import { a as signJsonLd, o as verifyJsonLd, r as detachSignature } from "../ld-Dl1HIB1a.mjs";
18
- import { t as doesActorOwnKey } from "../owner-CEWFJlqo.mjs";
19
- import { i as verifyObject, r as signObject } from "../proof-BFyPVl1r.mjs";
16
+ import { t as getAuthenticatedDocumentLoader } from "../docloader-mEJ3hsMB.mjs";
17
+ import { a as signJsonLd, o as verifyJsonLd, r as detachSignature } from "../ld-CUlVC-TS.mjs";
18
+ import { t as doesActorOwnKey } from "../owner-CuW0S2XY.mjs";
19
+ import { i as verifyObject, r as signObject } from "../proof-CFPGr1xC.mjs";
20
20
  import { t as MemoryKvStore } from "../kv-rV3vodCc.mjs";
21
- import { i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl } from "../middleware-CEWDB8EB.mjs";
21
+ import { i as KvSpecDeterminer, n as FederationImpl, o as createFederation, r as InboxContextImpl, t as ContextImpl } from "../middleware-BPZEcrMG.mjs";
22
22
  import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
23
23
  import * as vocab from "@fedify/vocab";
24
24
  import { getTypeId, lookupObject } from "@fedify/vocab";
@@ -270,7 +270,8 @@ test({
270
270
  }));
271
271
  ctx = federation.createContext(new URL("https://example.com/"), 123);
272
272
  assertEquals(ctx.getNodeInfoUri(), new URL("https://example.com/nodeinfo/2.1"));
273
- federation.setActorDispatcher("/users/{identifier}", () => new vocab.Person({})).setKeyPairsDispatcher(() => [{
273
+ assertThrows(() => createFederation({ kv: new MemoryKvStore() }).setActorDispatcher("/users/{identifier}", () => null).mapActorAlias("/actor/{id}", "instance"), RouterError, "Path for actor alias must have no variables.");
274
+ federation.setActorDispatcher("/users/{identifier}", () => new vocab.Person({})).mapActorAlias("/bot", "bot").setKeyPairsDispatcher(() => [{
274
275
  privateKey: rsaPrivateKey2,
275
276
  publicKey: rsaPublicKey2.publicKey
276
277
  }, {
@@ -279,11 +280,16 @@ test({
279
280
  }]).mapHandle((_, username) => username === "HANDLE" ? "handle" : null);
280
281
  ctx = federation.createContext(new URL("https://example.com/"), 123);
281
282
  assertEquals(ctx.getActorUri("handle"), new URL("https://example.com/users/handle"));
283
+ assertEquals(ctx.getActorUri("bot"), new URL("https://example.com/bot"));
282
284
  assertEquals(ctx.parseUri(new URL("https://example.com/")), null);
283
285
  assertEquals(ctx.parseUri(new URL("https://example.com/users/handle")), {
284
286
  type: "actor",
285
287
  identifier: "handle"
286
288
  });
289
+ assertEquals(ctx.parseUri(new URL("https://example.com/bot")), {
290
+ type: "actor",
291
+ identifier: "bot"
292
+ });
287
293
  assertEquals(ctx.parseUri(null), null);
288
294
  assertEquals(await ctx.getActorKeyPairs("handle"), [{
289
295
  keyId: new URL("https://example.com/users/handle#main-key"),
@@ -775,7 +781,7 @@ test("Federation.fetch()", async (t) => {
775
781
  inbox: ctx.getInboxUri(identifier),
776
782
  preferredUsername: identifier
777
783
  });
778
- }).setKeyPairsDispatcher(() => {
784
+ }).mapActorAlias("/bot", "bot").setKeyPairsDispatcher(() => {
779
785
  return [{
780
786
  privateKey: rsaPrivateKey2,
781
787
  publicKey: rsaPublicKey2.publicKey
@@ -799,6 +805,32 @@ test("Federation.fetch()", async (t) => {
799
805
  assertEquals(dispatches, []);
800
806
  assertEquals(response.status, 406);
801
807
  });
808
+ await t.step("GET actor alias", async () => {
809
+ const { federation, dispatches } = createTestContext();
810
+ const response = await federation.fetch(new Request("https://example.com/bot", {
811
+ method: "GET",
812
+ headers: { "Accept": "application/activity+json" }
813
+ }), { contextData: void 0 });
814
+ assertEquals(dispatches, ["bot"]);
815
+ assertEquals(response.status, 200);
816
+ const body = await response.json();
817
+ assertEquals(body.id, "https://example.com/bot");
818
+ assertEquals(body.preferredUsername, "bot");
819
+ });
820
+ await t.step("WebFinger for actor alias", async () => {
821
+ const { federation } = createTestContext();
822
+ const response = await federation.fetch(new Request("https://example.com/.well-known/webfinger?resource=acct:bot@example.com"), { contextData: void 0 });
823
+ assertEquals(response.status, 200);
824
+ const body = await response.json();
825
+ assertEquals(body.subject, "acct:bot@example.com");
826
+ assertExists(body.links);
827
+ assert(Array.isArray(body.links));
828
+ const selfLink = body.links.find((l) => l.rel === "self");
829
+ assertExists(selfLink);
830
+ assertEquals(selfLink.href, "https://example.com/bot");
831
+ assertExists(body.aliases);
832
+ assert(body.aliases.includes("https://example.com/bot"));
833
+ });
802
834
  await t.step("POST with application/json", async () => {
803
835
  const { federation, inbox } = createTestContext();
804
836
  const request = await signRequest(new Request("https://example.com/users/json/inbox", {
@@ -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-BiFLcrEX.cjs");
5
+ const require_middleware = require("../middleware-I5XEZ_pZ.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 ParallelMessageQueue, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as WebFingerLinksDispatcher, D as ObjectCallbackSetters, Dt as buildCollectionSynchronizationHeader, E as InboxListenerSetters, Et as PageItems, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as digest, P as CreateExponentialBackoffPolicyOptions, Q as MessageQueueListenOptions, R as Message, S as FederationStartQueueOptions, St as UnverifiedActivityReason, T as InboxChallengePolicy, Tt as SenderKeyPair, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueDepth, Y as MessageQueue, Z as MessageQueueEnqueueOptions, _ as Federatable, _t as OutboxListener, a as GetSignedKeyOptions, at as CollectionCounter, b as FederationFetchOptions, bt as SharedInboxKeyDispatcher, c as ParseUriResult, ct as CustomCollectionCounter, d as SendActivityOptions, dt as InboxErrorHandler, et as ActorAliasMapper, f as SendActivityOptionsForCollection, ft as InboxListener, g as CustomCollectionCallbackSetters, gt as OutboxErrorHandler, h as ConstructorWithTypeId, ht as ObjectDispatcher, i as GetActorOptions, it as AuthorizePredicate, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as CustomCollectionCursor, m as CollectionCallbackSetters, mt as ObjectAuthorizePredicate, n as Context, nt as ActorHandleMapper, o as InboxContext, ot as CollectionCursor, p as ActorCallbackSetters, pt as NodeInfoDispatcher, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as ActorKeyPairsDispatcher, s as OutboxContext, st as CollectionDispatcher, t as ActorKeyPair, tt as ActorDispatcher, u as RouteActivityOptions, ut as CustomCollectionDispatcher, v as Federation, vt as OutboxListenerErrorHandler, w as IdempotencyStrategy, wt as SendActivityError, x as FederationOptions, xt as UnverifiedActivityHandler, y as FederationBuilder, yt as OutboxPermanentFailureHandler, z as createFederationBuilder } from "../context-BDl7Y6f-.cjs";
1
+ import { $ as ParallelMessageQueue, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as WebFingerLinksDispatcher, D as ObjectCallbackSetters, Dt as buildCollectionSynchronizationHeader, E as InboxListenerSetters, Et as PageItems, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as digest, P as CreateExponentialBackoffPolicyOptions, Q as MessageQueueListenOptions, R as Message, S as FederationStartQueueOptions, St as UnverifiedActivityReason, T as InboxChallengePolicy, Tt as SenderKeyPair, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueDepth, Y as MessageQueue, Z as MessageQueueEnqueueOptions, _ as Federatable, _t as OutboxListener, a as GetSignedKeyOptions, at as CollectionCounter, b as FederationFetchOptions, bt as SharedInboxKeyDispatcher, c as ParseUriResult, ct as CustomCollectionCounter, d as SendActivityOptions, dt as InboxErrorHandler, et as ActorAliasMapper, f as SendActivityOptionsForCollection, ft as InboxListener, g as CustomCollectionCallbackSetters, gt as OutboxErrorHandler, h as ConstructorWithTypeId, ht as ObjectDispatcher, i as GetActorOptions, it as AuthorizePredicate, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as CustomCollectionCursor, m as CollectionCallbackSetters, mt as ObjectAuthorizePredicate, n as Context, nt as ActorHandleMapper, o as InboxContext, ot as CollectionCursor, p as ActorCallbackSetters, pt as NodeInfoDispatcher, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as ActorKeyPairsDispatcher, s as OutboxContext, st as CollectionDispatcher, t as ActorKeyPair, tt as ActorDispatcher, u as RouteActivityOptions, ut as CustomCollectionDispatcher, v as Federation, vt as OutboxListenerErrorHandler, w as IdempotencyStrategy, wt as SendActivityError, x as FederationOptions, xt as UnverifiedActivityHandler, y as FederationBuilder, yt as OutboxPermanentFailureHandler, z as createFederationBuilder } from "../context-Bxs4cdIZ.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-BghZgD_U.cjs";
3
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-zA6NZHUG.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, GetActorOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { $ as ParallelMessageQueue, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as WebFingerLinksDispatcher, D as ObjectCallbackSetters, Dt as buildCollectionSynchronizationHeader, E as InboxListenerSetters, Et as PageItems, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as digest, P as CreateExponentialBackoffPolicyOptions, Q as MessageQueueListenOptions, R as Message, S as FederationStartQueueOptions, St as UnverifiedActivityReason, T as InboxChallengePolicy, Tt as SenderKeyPair, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueDepth, Y as MessageQueue, Z as MessageQueueEnqueueOptions, _ as Federatable, _t as OutboxListener, a as GetSignedKeyOptions, at as CollectionCounter, b as FederationFetchOptions, bt as SharedInboxKeyDispatcher, c as ParseUriResult, ct as CustomCollectionCounter, d as SendActivityOptions, dt as InboxErrorHandler, et as ActorAliasMapper, f as SendActivityOptionsForCollection, ft as InboxListener, g as CustomCollectionCallbackSetters, gt as OutboxErrorHandler, h as ConstructorWithTypeId, ht as ObjectDispatcher, i as GetActorOptions, it as AuthorizePredicate, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as CustomCollectionCursor, m as CollectionCallbackSetters, mt as ObjectAuthorizePredicate, n as Context, nt as ActorHandleMapper, o as InboxContext, ot as CollectionCursor, p as ActorCallbackSetters, pt as NodeInfoDispatcher, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as ActorKeyPairsDispatcher, s as OutboxContext, st as CollectionDispatcher, t as ActorKeyPair, tt as ActorDispatcher, u as RouteActivityOptions, ut as CustomCollectionDispatcher, v as Federation, vt as OutboxListenerErrorHandler, w as IdempotencyStrategy, wt as SendActivityError, x as FederationOptions, xt as UnverifiedActivityHandler, y as FederationBuilder, yt as OutboxPermanentFailureHandler, z as createFederationBuilder } from "../context-zTZAI3KP.js";
3
+ import { $ as ParallelMessageQueue, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as WebFingerLinksDispatcher, D as ObjectCallbackSetters, Dt as buildCollectionSynchronizationHeader, E as InboxListenerSetters, Et as PageItems, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as digest, P as CreateExponentialBackoffPolicyOptions, Q as MessageQueueListenOptions, R as Message, S as FederationStartQueueOptions, St as UnverifiedActivityReason, T as InboxChallengePolicy, Tt as SenderKeyPair, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueDepth, Y as MessageQueue, Z as MessageQueueEnqueueOptions, _ as Federatable, _t as OutboxListener, a as GetSignedKeyOptions, at as CollectionCounter, b as FederationFetchOptions, bt as SharedInboxKeyDispatcher, c as ParseUriResult, ct as CustomCollectionCounter, d as SendActivityOptions, dt as InboxErrorHandler, et as ActorAliasMapper, f as SendActivityOptionsForCollection, ft as InboxListener, g as CustomCollectionCallbackSetters, gt as OutboxErrorHandler, h as ConstructorWithTypeId, ht as ObjectDispatcher, i as GetActorOptions, it as AuthorizePredicate, j as FederationOrigin, k as Rfc6570Expression, l as RequestContext, lt as CustomCollectionCursor, m as CollectionCallbackSetters, mt as ObjectAuthorizePredicate, n as Context, nt as ActorHandleMapper, o as InboxContext, ot as CollectionCursor, p as ActorCallbackSetters, pt as NodeInfoDispatcher, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as ActorKeyPairsDispatcher, s as OutboxContext, st as CollectionDispatcher, t as ActorKeyPair, tt as ActorDispatcher, u as RouteActivityOptions, ut as CustomCollectionDispatcher, v as Federation, vt as OutboxListenerErrorHandler, w as IdempotencyStrategy, wt as SendActivityError, x as FederationOptions, xt as UnverifiedActivityHandler, y as FederationBuilder, yt as OutboxPermanentFailureHandler, z as createFederationBuilder } from "../context-CVNXcFHR.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-ckCOmoCz.js";
5
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "../mod-Bc6p4npy.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, GetActorOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxChallengePolicy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueDepth, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxContext, OutboxErrorHandler, OutboxListener, OutboxListenerErrorHandler, OutboxListenerSetters, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, UnverifiedActivityHandler, UnverifiedActivityReason, WebFingerHandlerParameters, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
@@ -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-CKJC8DRf.js";
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-CysDkaXo.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-DikXweDx.mjs";
11
- import { l as verifyRequest } from "../http-CX_zHeOD.mjs";
11
+ import { l as verifyRequest } from "../http-CfToB_iu.mjs";
12
12
  import { i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DGu1NFwu.mjs";
13
- import { t as doesActorOwnKey } from "../owner-CEWFJlqo.mjs";
14
- import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "../send-BJickEP4.mjs";
13
+ import { t as doesActorOwnKey } from "../owner-CuW0S2XY.mjs";
14
+ import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "../send-dhl-s8G0.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 { r as createRequestContext } from "../context-Dk_tacqz.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
6
  import "../std__assert-CRDpx_HF.mjs";
7
7
  import { t as MemoryKvStore } from "../kv-rV3vodCc.mjs";
8
- import { o as createFederation, s as handleWebFinger } from "../middleware-CEWDB8EB.mjs";
8
+ import { o as createFederation, s as handleWebFinger } from "../middleware-BPZEcrMG.mjs";
9
9
  import { test } from "@fedify/fixture";
10
10
  import { Image, Link, Person, Tombstone } from "@fedify/vocab";
11
11
  //#region src/federation/webfinger.test.ts
@@ -10,7 +10,7 @@ import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL } fro
10
10
  import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
11
11
  //#region deno.json
12
12
  var name = "@fedify/fedify";
13
- var version = "2.3.0-dev.1013+4aa6a88c";
13
+ var version = "2.3.0-dev.1021+ab2fa4a9";
14
14
  //#endregion
15
15
  //#region src/sig/accept.ts
16
16
  /**
@@ -1,9 +1,9 @@
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-Ctd-K-t6.mjs";
4
+ import { n as version, t as name } from "./deno-BnQyJ03o.mjs";
5
5
  import { i as validateAcceptSignature, n as fulfillAcceptSignature, r as parseAcceptSignature } from "./accept-CPkZzmGN.mjs";
6
- import { o as validateCryptoKey, r as fetchKeyDetailed } from "./key-C1Oto4it.mjs";
6
+ import { o as validateCryptoKey, r as fetchKeyDetailed } from "./key-CeANlo1H.mjs";
7
7
  import { CryptographicKey } from "@fedify/vocab";
8
8
  import { SpanStatusCode, trace } from "@opentelemetry/api";
9
9
  import { FetchError } from "@fedify/vocab-runtime";
@@ -11,7 +11,7 @@ let _opentelemetry_semantic_conventions = require("@opentelemetry/semantic-conve
11
11
  let byte_encodings_base64 = require("byte-encodings/base64");
12
12
  //#region deno.json
13
13
  var name = "@fedify/fedify";
14
- var version = "2.3.0-dev.1013+4aa6a88c";
14
+ var version = "2.3.0-dev.1021+ab2fa4a9";
15
15
  //#endregion
16
16
  //#region src/sig/accept.ts
17
17
  /**
@@ -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-Ctd-K-t6.mjs";
4
+ import { n as version, t as name } from "./deno-BnQyJ03o.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 { FetchError, getDocumentLoader } from "@fedify/vocab-runtime";
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { d as validateCryptoKey, t as doubleKnock } from "./http-1NL30qCe.js";
3
+ import { d as validateCryptoKey, t as doubleKnock } from "./http-BJ-t29n_.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,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-Du1Jgf2P.cjs");
4
+ const require_http = require("./http-D4xMqSqO.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,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-Ctd-K-t6.mjs";
5
- import { n as fetchKey, o as validateCryptoKey } from "./key-C1Oto4it.mjs";
4
+ import { n as version, t as name } from "./deno-BnQyJ03o.mjs";
5
+ import { n as fetchKey, o as validateCryptoKey } from "./key-CeANlo1H.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";
@@ -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-BiFLcrEX.cjs");
3
+ const require_middleware = require("./middleware-I5XEZ_pZ.cjs");
4
4
  exports.FederationImpl = require_middleware.FederationImpl;
@@ -2,24 +2,24 @@ import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  import { n as RouterError } from "./router-CrMLXoOr.mjs";
5
- import { n as version, t as name } from "./deno-Ctd-K-t6.mjs";
5
+ import { n as version, t as name } from "./deno-BnQyJ03o.mjs";
6
6
  import { t as formatAcceptSignature } from "./accept-CPkZzmGN.mjs";
7
- import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-C1Oto4it.mjs";
8
- import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-CX_zHeOD.mjs";
9
- import { t as getAuthenticatedDocumentLoader } from "./docloader-q9QT51g3.mjs";
7
+ import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-CeANlo1H.mjs";
8
+ import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-CfToB_iu.mjs";
9
+ import { t as getAuthenticatedDocumentLoader } from "./docloader-mEJ3hsMB.mjs";
10
10
  import { n as kvCache } from "./kv-cache-U__xU4qR.mjs";
11
- import { a as signJsonLd, i as hasSignatureLike, o as verifyJsonLd, r as detachSignature } from "./ld-Dl1HIB1a.mjs";
12
- import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-CEWFJlqo.mjs";
11
+ import { a as signJsonLd, i as hasSignatureLike, o as verifyJsonLd, r as detachSignature } from "./ld-CUlVC-TS.mjs";
12
+ import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-CuW0S2XY.mjs";
13
13
  import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-CNmZLixq.mjs";
14
- import { i as verifyObject, n as hasProofLike, r as signObject } from "./proof-BFyPVl1r.mjs";
14
+ import { i as verifyObject, n as hasProofLike, r as signObject } from "./proof-CFPGr1xC.mjs";
15
15
  import { t as getNodeInfo } from "./client-D_1QpnWt.mjs";
16
16
  import { t as nodeInfoToJson } from "./types-J53Kw7so.mjs";
17
- import { t as FederationBuilderImpl } from "./builder-CROLcFVM.mjs";
17
+ import { n as FederationBuilderImpl, t as ACTOR_ALIAS_PREFIX } from "./builder-Nn2r1dKd.mjs";
18
18
  import { t as buildCollectionSynchronizationHeader } from "./collection-D-HqUuA2.mjs";
19
19
  import { t as KvKeyCache } from "./keycache-EGATflN-.mjs";
20
20
  import { t as acceptsJsonLd } from "./negotiation-SQvQgUqe.mjs";
21
21
  import { t as createExponentialBackoffPolicy } from "./retry-bMXBL97A.mjs";
22
- import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-BJickEP4.mjs";
22
+ import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-dhl-s8G0.mjs";
23
23
  import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, Tombstone, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
24
24
  import { lookupWebFinger } from "@fedify/webfinger";
25
25
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
@@ -2479,15 +2479,18 @@ var FederationImpl = class extends FederationBuilderImpl {
2479
2479
  if (request.method !== "POST" && !acceptsJsonLd(request)) return await onNotAcceptable(request);
2480
2480
  switch (routeName) {
2481
2481
  case "actor":
2482
- context = this.#createContext(request, contextData, { invokedFromActorDispatcher: { identifier: route.values.identifier } });
2482
+ case "actorAlias": {
2483
+ const identifier = route.name.startsWith("actorAlias:") ? route.name.substring(ACTOR_ALIAS_PREFIX.length) : route.values.identifier;
2484
+ context = this.#createContext(request, contextData, { invokedFromActorDispatcher: { identifier } });
2483
2485
  return await handleActor(request, {
2484
- identifier: route.values.identifier,
2486
+ identifier,
2485
2487
  context,
2486
2488
  actorDispatcher: this.actorCallbacks?.dispatcher,
2487
2489
  authorizePredicate: this.actorCallbacks?.authorizePredicate,
2488
2490
  onUnauthorized,
2489
2491
  onNotFound
2490
2492
  });
2493
+ }
2491
2494
  case "object": {
2492
2495
  const typeId = route.name.replace(/^object:/, "");
2493
2496
  const callbacks = this.objectCallbacks[typeId];
@@ -2736,7 +2739,7 @@ var ContextImpl = class ContextImpl {
2736
2739
  return new URL(path, this.canonicalOrigin);
2737
2740
  }
2738
2741
  getActorUri(identifier) {
2739
- const path = this.federation.router.build("actor", { identifier });
2742
+ const path = this.federation.router.build(`actorAlias:${identifier}`, {}) ?? this.federation.router.build("actor", { identifier });
2740
2743
  if (path == null) throw new RouterError("No actor dispatcher registered.");
2741
2744
  return new URL(path, this.canonicalOrigin);
2742
2745
  }
@@ -2802,8 +2805,8 @@ var ContextImpl = class ContextImpl {
2802
2805
  type: "inbox",
2803
2806
  identifier: void 0
2804
2807
  };
2805
- const identifier = route.values.identifier;
2806
- if (route.name === "actor") return {
2808
+ const identifier = route.name.startsWith("actorAlias:") ? route.name.substring(ACTOR_ALIAS_PREFIX.length) : route.values.identifier;
2809
+ if (route.name === "actor" || route.name.startsWith("actorAlias:")) return {
2807
2810
  type: "actor",
2808
2811
  identifier
2809
2812
  };
@@ -1,5 +1,5 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as FederationImpl } from "./middleware-CEWDB8EB.mjs";
4
+ import { n as FederationImpl } from "./middleware-BPZEcrMG.mjs";
5
5
  export { FederationImpl };
@@ -2,10 +2,10 @@ import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  import { t as __exportAll } from "./chunk-nlSIicah.js";
4
4
  import { r as getDefaultActivityTransformers } from "./transformers-ve6e2xcg.js";
5
- import { _ as version, a as verifyRequestDetailed, d as validateCryptoKey, f as formatAcceptSignature, g as name, i as verifyRequest, n as parseRfc9421SignatureInput, o as exportJwk, t as doubleKnock, u as importJwk } from "./http-1NL30qCe.js";
6
- import { c as getKeyOwner, d as detachSignature, f as hasSignatureLike, i as verifyObject, m as verifyJsonLd, n as hasProofLike, o as normalizeOutgoingActivityJsonLd, p as signJsonLd, r as signObject, s as doesActorOwnKey } from "./proof-Dedf8md5.js";
5
+ import { _ as version, a as verifyRequestDetailed, d as validateCryptoKey, f as formatAcceptSignature, g as name, i as verifyRequest, n as parseRfc9421SignatureInput, o as exportJwk, t as doubleKnock, u as importJwk } from "./http-BJ-t29n_.js";
6
+ import { c as getKeyOwner, d as detachSignature, f as hasSignatureLike, i as verifyObject, m as verifyJsonLd, n as hasProofLike, o as normalizeOutgoingActivityJsonLd, p as signJsonLd, r as signObject, s as doesActorOwnKey } from "./proof-CtMmqa09.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-CsC3P4uu.js";
8
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-B142kDZL.js";
9
9
  import { getLogger, withContext } from "@logtape/logtape";
10
10
  import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, Tombstone, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
11
11
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
@@ -160,6 +160,7 @@ var RouterError = class extends Error {
160
160
  };
161
161
  //#endregion
162
162
  //#region src/federation/builder.ts
163
+ const ACTOR_ALIAS_PREFIX = "actorAlias:";
163
164
  function validateSingleIdentifierVariablePath(path, errorMessage) {
164
165
  const operatorMatches = globalThis.Array.from(path.matchAll(/{([+#./;?&]?)([A-Za-z_][A-Za-z0-9_]*)}/g));
165
166
  if (operatorMatches.length !== 1 || operatorMatches[0]?.[2] !== "identifier") throw new RouterError(errorMessage);
@@ -346,6 +347,15 @@ var FederationBuilderImpl = class {
346
347
  callbacks.aliasMapper = mapper;
347
348
  return setters;
348
349
  },
350
+ mapActorAlias: (path, identifier) => {
351
+ if (identifier === "") throw new RouterError("Identifier cannot be empty.");
352
+ if (this.router.has(`actorAlias:${identifier}`)) throw new RouterError(`Actor alias for "${identifier}" already set.`);
353
+ if (new Router$1().add(path, "temp").size > 0) throw new RouterError("Path for actor alias must have no variables.");
354
+ const existingRoute = this.router.route(path);
355
+ if (existingRoute != null) throw new RouterError(`Actor alias path "${path}" conflicts with existing route "${existingRoute.name}".`);
356
+ this.router.add(path, `${ACTOR_ALIAS_PREFIX}${identifier}`);
357
+ return setters;
358
+ },
349
359
  authorize(predicate) {
350
360
  callbacks.authorizePredicate = predicate;
351
361
  return setters;
@@ -3508,15 +3518,18 @@ var FederationImpl = class extends FederationBuilderImpl {
3508
3518
  if (request.method !== "POST" && !acceptsJsonLd(request)) return await onNotAcceptable(request);
3509
3519
  switch (routeName) {
3510
3520
  case "actor":
3511
- context = this.#createContext(request, contextData, { invokedFromActorDispatcher: { identifier: route.values.identifier } });
3521
+ case "actorAlias": {
3522
+ const identifier = route.name.startsWith("actorAlias:") ? route.name.substring(11) : route.values.identifier;
3523
+ context = this.#createContext(request, contextData, { invokedFromActorDispatcher: { identifier } });
3512
3524
  return await handleActor(request, {
3513
- identifier: route.values.identifier,
3525
+ identifier,
3514
3526
  context,
3515
3527
  actorDispatcher: this.actorCallbacks?.dispatcher,
3516
3528
  authorizePredicate: this.actorCallbacks?.authorizePredicate,
3517
3529
  onUnauthorized,
3518
3530
  onNotFound
3519
3531
  });
3532
+ }
3520
3533
  case "object": {
3521
3534
  const typeId = route.name.replace(/^object:/, "");
3522
3535
  const callbacks = this.objectCallbacks[typeId];
@@ -3765,7 +3778,7 @@ var ContextImpl = class ContextImpl {
3765
3778
  return new URL(path, this.canonicalOrigin);
3766
3779
  }
3767
3780
  getActorUri(identifier) {
3768
- const path = this.federation.router.build("actor", { identifier });
3781
+ const path = this.federation.router.build(`actorAlias:${identifier}`, {}) ?? this.federation.router.build("actor", { identifier });
3769
3782
  if (path == null) throw new RouterError("No actor dispatcher registered.");
3770
3783
  return new URL(path, this.canonicalOrigin);
3771
3784
  }
@@ -3831,8 +3844,8 @@ var ContextImpl = class ContextImpl {
3831
3844
  type: "inbox",
3832
3845
  identifier: void 0
3833
3846
  };
3834
- const identifier = route.values.identifier;
3835
- if (route.name === "actor") return {
3847
+ const identifier = route.name.startsWith("actorAlias:") ? route.name.substring(11) : route.values.identifier;
3848
+ if (route.name === "actor" || route.name.startsWith("actorAlias:")) return {
3836
3849
  type: "actor",
3837
3850
  identifier
3838
3851
  };
@@ -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-Du1Jgf2P.cjs");
6
- const require_proof = require("./proof-CDA3f-i5.cjs");
5
+ const require_http = require("./http-D4xMqSqO.cjs");
6
+ const require_proof = require("./proof-oGiWJkX0.cjs");
7
7
  const require_types = require("./types-KC4QAoxe.cjs");
8
- const require_kv_cache = require("./kv-cache-aGOwL6Vj.cjs");
8
+ const require_kv_cache = require("./kv-cache-DRwOjOkl.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");
@@ -160,6 +160,7 @@ var RouterError = class extends Error {
160
160
  };
161
161
  //#endregion
162
162
  //#region src/federation/builder.ts
163
+ const ACTOR_ALIAS_PREFIX = "actorAlias:";
163
164
  function validateSingleIdentifierVariablePath(path, errorMessage) {
164
165
  const operatorMatches = globalThis.Array.from(path.matchAll(/{([+#./;?&]?)([A-Za-z_][A-Za-z0-9_]*)}/g));
165
166
  if (operatorMatches.length !== 1 || operatorMatches[0]?.[2] !== "identifier") throw new RouterError(errorMessage);
@@ -210,7 +211,7 @@ var FederationBuilderImpl = class {
210
211
  this.collectionTypeIds = {};
211
212
  }
212
213
  async build(options) {
213
- const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-BwC5U8zJ.cjs"));
214
+ const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-ASvK22Do.cjs"));
214
215
  const f = new FederationImpl(options);
215
216
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
216
217
  f.router = this.router.clone();
@@ -346,6 +347,15 @@ var FederationBuilderImpl = class {
346
347
  callbacks.aliasMapper = mapper;
347
348
  return setters;
348
349
  },
350
+ mapActorAlias: (path, identifier) => {
351
+ if (identifier === "") throw new RouterError("Identifier cannot be empty.");
352
+ if (this.router.has(`actorAlias:${identifier}`)) throw new RouterError(`Actor alias for "${identifier}" already set.`);
353
+ if (new Router().add(path, "temp").size > 0) throw new RouterError("Path for actor alias must have no variables.");
354
+ const existingRoute = this.router.route(path);
355
+ if (existingRoute != null) throw new RouterError(`Actor alias path "${path}" conflicts with existing route "${existingRoute.name}".`);
356
+ this.router.add(path, `${ACTOR_ALIAS_PREFIX}${identifier}`);
357
+ return setters;
358
+ },
349
359
  authorize(predicate) {
350
360
  callbacks.authorizePredicate = predicate;
351
361
  return setters;
@@ -3500,15 +3510,18 @@ var FederationImpl = class extends FederationBuilderImpl {
3500
3510
  if (request.method !== "POST" && !acceptsJsonLd(request)) return await onNotAcceptable(request);
3501
3511
  switch (routeName) {
3502
3512
  case "actor":
3503
- context = this.#createContext(request, contextData, { invokedFromActorDispatcher: { identifier: route.values.identifier } });
3513
+ case "actorAlias": {
3514
+ const identifier = route.name.startsWith("actorAlias:") ? route.name.substring(11) : route.values.identifier;
3515
+ context = this.#createContext(request, contextData, { invokedFromActorDispatcher: { identifier } });
3504
3516
  return await handleActor(request, {
3505
- identifier: route.values.identifier,
3517
+ identifier,
3506
3518
  context,
3507
3519
  actorDispatcher: this.actorCallbacks?.dispatcher,
3508
3520
  authorizePredicate: this.actorCallbacks?.authorizePredicate,
3509
3521
  onUnauthorized,
3510
3522
  onNotFound
3511
3523
  });
3524
+ }
3512
3525
  case "object": {
3513
3526
  const typeId = route.name.replace(/^object:/, "");
3514
3527
  const callbacks = this.objectCallbacks[typeId];
@@ -3757,7 +3770,7 @@ var ContextImpl = class ContextImpl {
3757
3770
  return new URL(path, this.canonicalOrigin);
3758
3771
  }
3759
3772
  getActorUri(identifier) {
3760
- const path = this.federation.router.build("actor", { identifier });
3773
+ const path = this.federation.router.build(`actorAlias:${identifier}`, {}) ?? this.federation.router.build("actor", { identifier });
3761
3774
  if (path == null) throw new RouterError("No actor dispatcher registered.");
3762
3775
  return new URL(path, this.canonicalOrigin);
3763
3776
  }
@@ -3823,8 +3836,8 @@ var ContextImpl = class ContextImpl {
3823
3836
  type: "inbox",
3824
3837
  identifier: void 0
3825
3838
  };
3826
- const identifier = route.values.identifier;
3827
- if (route.name === "actor") return {
3839
+ const identifier = route.name.startsWith("actorAlias:") ? route.name.substring(11) : route.values.identifier;
3840
+ if (route.name === "actor" || route.name.startsWith("actorAlias:")) return {
3828
3841
  type: "actor",
3829
3842
  identifier
3830
3843
  };
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { Ct as WebFingerLinksDispatcher, et as ActorAliasMapper, l as RequestContext, nt as ActorHandleMapper, tt as ActorDispatcher } from "./context-zTZAI3KP.js";
3
+ import { Ct as WebFingerLinksDispatcher, et as ActorAliasMapper, l as RequestContext, nt as ActorHandleMapper, tt as ActorDispatcher } from "./context-CVNXcFHR.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 { Ct as WebFingerLinksDispatcher, et as ActorAliasMapper, l as RequestContext, nt as ActorHandleMapper, tt as ActorDispatcher } from "./context-BDl7Y6f-.cjs";
1
+ import { Ct as WebFingerLinksDispatcher, et as ActorAliasMapper, l as RequestContext, nt as ActorHandleMapper, tt as ActorDispatcher } from "./context-Bxs4cdIZ.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-Du1Jgf2P.cjs");
8
- const require_middleware = require("./middleware-BiFLcrEX.cjs");
9
- const require_proof = require("./proof-CDA3f-i5.cjs");
7
+ const require_http = require("./http-D4xMqSqO.cjs");
8
+ const require_middleware = require("./middleware-I5XEZ_pZ.cjs");
9
+ const require_proof = require("./proof-oGiWJkX0.cjs");
10
10
  const require_types = require("./types-KC4QAoxe.cjs");
11
- const require_kv_cache = require("./kv-cache-aGOwL6Vj.cjs");
11
+ const require_kv_cache = require("./kv-cache-DRwOjOkl.cjs");
12
12
  const require_federation_mod = require("./federation/mod.cjs");
13
13
  require("./nodeinfo/mod.cjs");
14
14
  require("./runtime/mod.cjs");
package/dist/mod.d.cts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-z-8dc-e1.cjs";
2
2
  import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-CrGuipxe.cjs";
3
3
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-CptqhsOy.cjs";
4
- import { $ as ParallelMessageQueue, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as WebFingerLinksDispatcher, D as ObjectCallbackSetters, Dt as buildCollectionSynchronizationHeader, E as InboxListenerSetters, Et as PageItems, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as digest, P as CreateExponentialBackoffPolicyOptions, Q as MessageQueueListenOptions, R as Message, S as FederationStartQueueOptions, St as UnverifiedActivityReason, T as InboxChallengePolicy, Tt as SenderKeyPair, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueDepth, Y as MessageQueue, Z as MessageQueueEnqueueOptions, _ as Federatable, _t as OutboxListener, a as GetSignedKeyOptions, at as CollectionCounter, b as FederationFetchOptions, bt as SharedInboxKeyDispatcher, c as ParseUriResult, ct as CustomCollectionCounter, d as SendActivityOptions, dt as InboxErrorHandler, et as ActorAliasMapper, f as SendActivityOptionsForCollection, ft as InboxListener, g as CustomCollectionCallbackSetters, gt as OutboxErrorHandler, h as ConstructorWithTypeId, ht as ObjectDispatcher, i as GetActorOptions, it as AuthorizePredicate, j as FederationOrigin, k as Rfc6570Expression, kt as ActivityTransformer, l as RequestContext, lt as CustomCollectionCursor, m as CollectionCallbackSetters, mt as ObjectAuthorizePredicate, n as Context, nt as ActorHandleMapper, o as InboxContext, ot as CollectionCursor, p as ActorCallbackSetters, pt as NodeInfoDispatcher, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as ActorKeyPairsDispatcher, s as OutboxContext, st as CollectionDispatcher, t as ActorKeyPair, tt as ActorDispatcher, u as RouteActivityOptions, ut as CustomCollectionDispatcher, v as Federation, vt as OutboxListenerErrorHandler, w as IdempotencyStrategy, wt as SendActivityError, x as FederationOptions, xt as UnverifiedActivityHandler, y as FederationBuilder, yt as OutboxPermanentFailureHandler, z as createFederationBuilder } from "./context-BDl7Y6f-.cjs";
4
+ import { $ as ParallelMessageQueue, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as WebFingerLinksDispatcher, D as ObjectCallbackSetters, Dt as buildCollectionSynchronizationHeader, E as InboxListenerSetters, Et as PageItems, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as digest, P as CreateExponentialBackoffPolicyOptions, Q as MessageQueueListenOptions, R as Message, S as FederationStartQueueOptions, St as UnverifiedActivityReason, T as InboxChallengePolicy, Tt as SenderKeyPair, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueDepth, Y as MessageQueue, Z as MessageQueueEnqueueOptions, _ as Federatable, _t as OutboxListener, a as GetSignedKeyOptions, at as CollectionCounter, b as FederationFetchOptions, bt as SharedInboxKeyDispatcher, c as ParseUriResult, ct as CustomCollectionCounter, d as SendActivityOptions, dt as InboxErrorHandler, et as ActorAliasMapper, f as SendActivityOptionsForCollection, ft as InboxListener, g as CustomCollectionCallbackSetters, gt as OutboxErrorHandler, h as ConstructorWithTypeId, ht as ObjectDispatcher, i as GetActorOptions, it as AuthorizePredicate, j as FederationOrigin, k as Rfc6570Expression, kt as ActivityTransformer, l as RequestContext, lt as CustomCollectionCursor, m as CollectionCallbackSetters, mt as ObjectAuthorizePredicate, n as Context, nt as ActorHandleMapper, o as InboxContext, ot as CollectionCursor, p as ActorCallbackSetters, pt as NodeInfoDispatcher, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as ActorKeyPairsDispatcher, s as OutboxContext, st as CollectionDispatcher, t as ActorKeyPair, tt as ActorDispatcher, u as RouteActivityOptions, ut as CustomCollectionDispatcher, v as Federation, vt as OutboxListenerErrorHandler, w as IdempotencyStrategy, wt as SendActivityError, x as FederationOptions, xt as UnverifiedActivityHandler, y as FederationBuilder, yt as OutboxPermanentFailureHandler, z as createFederationBuilder } from "./context-Bxs4cdIZ.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-BghZgD_U.cjs";
7
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-zA6NZHUG.cjs";
8
8
  import { _ as hasSignatureLike, a as createProof, b as verifySignature, c as verifyObject, d as SignJsonLdOptions, f as VerifyJsonLdOptions, g as detachSignature, h as createSignature, i as VerifyProofOptions, l as verifyProof, m as attachSignature, n as SignObjectOptions, o as hasProofLike, p as VerifySignatureOptions, r as VerifyObjectOptions, s as signObject, t as CreateProofOptions, u as CreateSignatureOptions, v as signJsonLd, y as verifyJsonLd } from "./mod-Cr3f-ACa.cjs";
9
9
  import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-CMEbIaNh.cjs";
10
10
  export * from "@fedify/vocab-runtime";
package/dist/mod.d.ts CHANGED
@@ -3,10 +3,10 @@ import { URLPattern } from "urlpattern-polyfill";
3
3
  import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-AtlibPOU.js";
4
4
  import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-aQzN9Ayi.js";
5
5
  import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-74ARJ5TL.js";
6
- import { $ as ParallelMessageQueue, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as WebFingerLinksDispatcher, D as ObjectCallbackSetters, Dt as buildCollectionSynchronizationHeader, E as InboxListenerSetters, Et as PageItems, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as digest, P as CreateExponentialBackoffPolicyOptions, Q as MessageQueueListenOptions, R as Message, S as FederationStartQueueOptions, St as UnverifiedActivityReason, T as InboxChallengePolicy, Tt as SenderKeyPair, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueDepth, Y as MessageQueue, Z as MessageQueueEnqueueOptions, _ as Federatable, _t as OutboxListener, a as GetSignedKeyOptions, at as CollectionCounter, b as FederationFetchOptions, bt as SharedInboxKeyDispatcher, c as ParseUriResult, ct as CustomCollectionCounter, d as SendActivityOptions, dt as InboxErrorHandler, et as ActorAliasMapper, f as SendActivityOptionsForCollection, ft as InboxListener, g as CustomCollectionCallbackSetters, gt as OutboxErrorHandler, h as ConstructorWithTypeId, ht as ObjectDispatcher, i as GetActorOptions, it as AuthorizePredicate, j as FederationOrigin, k as Rfc6570Expression, kt as ActivityTransformer, l as RequestContext, lt as CustomCollectionCursor, m as CollectionCallbackSetters, mt as ObjectAuthorizePredicate, n as Context, nt as ActorHandleMapper, o as InboxContext, ot as CollectionCursor, p as ActorCallbackSetters, pt as NodeInfoDispatcher, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as ActorKeyPairsDispatcher, s as OutboxContext, st as CollectionDispatcher, t as ActorKeyPair, tt as ActorDispatcher, u as RouteActivityOptions, ut as CustomCollectionDispatcher, v as Federation, vt as OutboxListenerErrorHandler, w as IdempotencyStrategy, wt as SendActivityError, x as FederationOptions, xt as UnverifiedActivityHandler, y as FederationBuilder, yt as OutboxPermanentFailureHandler, z as createFederationBuilder } from "./context-zTZAI3KP.js";
6
+ import { $ as ParallelMessageQueue, A as FederationKvPrefixes, B as Router, C as IdempotencyKeyCallback, Ct as WebFingerLinksDispatcher, D as ObjectCallbackSetters, Dt as buildCollectionSynchronizationHeader, E as InboxListenerSetters, Et as PageItems, F as RetryContext, G as respondWithObject, H as RouterOptions, I as RetryPolicy, J as InProcessMessageQueueOptions, K as respondWithObjectIfAcceptable, L as createExponentialBackoffPolicy, M as FederationQueueOptions, N as createFederation, O as OutboxListenerSetters, Ot as digest, P as CreateExponentialBackoffPolicyOptions, Q as MessageQueueListenOptions, R as Message, S as FederationStartQueueOptions, St as UnverifiedActivityReason, T as InboxChallengePolicy, Tt as SenderKeyPair, U as RouterRouteResult, V as RouterError, W as RespondWithObjectOptions, X as MessageQueueDepth, Y as MessageQueue, Z as MessageQueueEnqueueOptions, _ as Federatable, _t as OutboxListener, a as GetSignedKeyOptions, at as CollectionCounter, b as FederationFetchOptions, bt as SharedInboxKeyDispatcher, c as ParseUriResult, ct as CustomCollectionCounter, d as SendActivityOptions, dt as InboxErrorHandler, et as ActorAliasMapper, f as SendActivityOptionsForCollection, ft as InboxListener, g as CustomCollectionCallbackSetters, gt as OutboxErrorHandler, h as ConstructorWithTypeId, ht as ObjectDispatcher, i as GetActorOptions, it as AuthorizePredicate, j as FederationOrigin, k as Rfc6570Expression, kt as ActivityTransformer, l as RequestContext, lt as CustomCollectionCursor, m as CollectionCallbackSetters, mt as ObjectAuthorizePredicate, n as Context, nt as ActorHandleMapper, o as InboxContext, ot as CollectionCursor, p as ActorCallbackSetters, pt as NodeInfoDispatcher, q as InProcessMessageQueue, r as ForwardActivityOptions, rt as ActorKeyPairsDispatcher, s as OutboxContext, st as CollectionDispatcher, t as ActorKeyPair, tt as ActorDispatcher, u as RouteActivityOptions, ut as CustomCollectionDispatcher, v as Federation, vt as OutboxListenerErrorHandler, w as IdempotencyStrategy, wt as SendActivityError, x as FederationOptions, xt as UnverifiedActivityHandler, y as FederationBuilder, yt as OutboxPermanentFailureHandler, z as createFederationBuilder } from "./context-CVNXcFHR.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-ckCOmoCz.js";
9
+ import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-Bc6p4npy.js";
10
10
  import { _ as hasSignatureLike, a as createProof, b as verifySignature, c as verifyObject, d as SignJsonLdOptions, f as VerifyJsonLdOptions, g as detachSignature, h as createSignature, i as VerifyProofOptions, l as verifyProof, m as attachSignature, n as SignObjectOptions, o as hasProofLike, p as VerifySignatureOptions, r as VerifyObjectOptions, s as signObject, t as CreateProofOptions, u as CreateSignatureOptions, v as signJsonLd, y as verifyJsonLd } from "./mod-CR8soWa9.js";
11
11
  import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-CLgIXe9w.js";
12
12
  export * from "@fedify/vocab-runtime";
package/dist/mod.js CHANGED
@@ -3,11 +3,11 @@ import "urlpattern-polyfill";
3
3
  import "./chunk-nlSIicah.js";
4
4
  import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-ve6e2xcg.js";
5
5
  import "./compat/mod.js";
6
- import { a as verifyRequestDetailed, c as fetchKeyDetailed, f as formatAcceptSignature, h as validateAcceptSignature, i as verifyRequest, l as generateCryptoKeyPair, m as parseAcceptSignature, o as exportJwk, p as fulfillAcceptSignature, r as signRequest, s as fetchKey, u as importJwk } from "./http-1NL30qCe.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-CKJC8DRf.js";
8
- import { a as verifyProof, c as getKeyOwner, d as detachSignature, f as hasSignatureLike, h as verifySignature, i as verifyObject, l as attachSignature, m as verifyJsonLd, n as hasProofLike, p as signJsonLd, r as signObject, s as doesActorOwnKey, t as createProof, u as createSignature } from "./proof-Dedf8md5.js";
6
+ import { a as verifyRequestDetailed, c as fetchKeyDetailed, f as formatAcceptSignature, h as validateAcceptSignature, i as verifyRequest, l as generateCryptoKeyPair, m as parseAcceptSignature, o as exportJwk, p as fulfillAcceptSignature, r as signRequest, s as fetchKey, u as importJwk } from "./http-BJ-t29n_.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-CysDkaXo.js";
8
+ import { a as verifyProof, c as getKeyOwner, d as detachSignature, f as hasSignatureLike, h as verifySignature, i as verifyObject, l as attachSignature, m as verifyJsonLd, n as hasProofLike, p as signJsonLd, r as signObject, s as doesActorOwnKey, t as createProof, u as createSignature } from "./proof-CtMmqa09.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-CsC3P4uu.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-B142kDZL.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 { r as createRequestContext } from "../context-Dk_tacqz.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
6
  import "../std__assert-CRDpx_HF.mjs";
7
7
  import { t as MemoryKvStore } from "../kv-rV3vodCc.mjs";
8
- import { _ as handleNodeInfoJrd, g as handleNodeInfo, o as createFederation } from "../middleware-CEWDB8EB.mjs";
8
+ import { _ as handleNodeInfoJrd, g as handleNodeInfo, o as createFederation } from "../middleware-BPZEcrMG.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-Ctd-K-t6.mjs";
5
- import "./key-C1Oto4it.mjs";
4
+ import { n as version, t as name } from "./deno-BnQyJ03o.mjs";
5
+ import "./key-CeANlo1H.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,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-Ctd-K-t6.mjs";
5
- import { n as fetchKey, o as validateCryptoKey } from "./key-C1Oto4it.mjs";
4
+ import { n as version, t as name } from "./deno-BnQyJ03o.mjs";
5
+ import { n as fetchKey, o as validateCryptoKey } from "./key-CeANlo1H.mjs";
6
6
  import { n as preloadedOnlyDocumentLoader } from "./public-audience-DYFHzm_c.mjs";
7
7
  import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-CNmZLixq.mjs";
8
8
  import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
@@ -1,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
- import { _ as version, d as validateCryptoKey, g as name, s as fetchKey } from "./http-1NL30qCe.js";
3
+ import { _ as version, d as validateCryptoKey, g as name, s as fetchKey } from "./http-BJ-t29n_.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, PUBLIC_COLLECTION, getTypeId, isActor } from "@fedify/vocab";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
@@ -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-Du1Jgf2P.cjs");
4
+ const require_http = require("./http-D4xMqSqO.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,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-Ctd-K-t6.mjs";
5
- import { n as doubleKnock } from "./http-CX_zHeOD.mjs";
4
+ import { n as version, t as name } from "./deno-BnQyJ03o.mjs";
5
+ import { n as doubleKnock } from "./http-CfToB_iu.mjs";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
7
7
  import { getLogger } from "@logtape/logtape";
8
8
  //#region src/federation/send.ts
@@ -7,8 +7,8 @@ import { i as assertExists, t as assertStringIncludes } from "../std__assert-CRD
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-DikXweDx.mjs";
10
- import { t as exportJwk } from "../key-C1Oto4it.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, u as verifyRequestDetailed } from "../http-CX_zHeOD.mjs";
10
+ import { t as exportJwk } from "../key-CeANlo1H.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, u as verifyRequestDetailed } from "../http-CfToB_iu.mjs";
12
12
  import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-DGu1NFwu.mjs";
13
13
  import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
14
14
  import { FetchError, exportSpki } from "@fedify/vocab-runtime";
@@ -5,7 +5,7 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import "../std__assert-CRDpx_HF.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 importJwk, i as generateCryptoKeyPair, n as fetchKey, o as validateCryptoKey, r as fetchKeyDetailed, t as exportJwk } from "../key-C1Oto4it.mjs";
8
+ import { a as importJwk, i as generateCryptoKeyPair, n as fetchKey, o as validateCryptoKey, r as fetchKeyDetailed, t as exportJwk } from "../key-CeANlo1H.mjs";
9
9
  import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DGu1NFwu.mjs";
10
10
  import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
11
11
  import { CryptographicKey, Multikey } from "@fedify/vocab";
@@ -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-DikXweDx.mjs";
8
- import { i as generateCryptoKeyPair } from "../key-C1Oto4it.mjs";
8
+ import { i as generateCryptoKeyPair } from "../key-CeANlo1H.mjs";
9
9
  import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DGu1NFwu.mjs";
10
- import { a as signJsonLd, i as hasSignatureLike, n as createSignature, o as verifyJsonLd, r as detachSignature, s as verifySignature, t as attachSignature } from "../ld-Dl1HIB1a.mjs";
10
+ import { a as signJsonLd, i as hasSignatureLike, n as createSignature, o as verifyJsonLd, r as detachSignature, s as verifySignature, t as attachSignature } from "../ld-CUlVC-TS.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-Du1Jgf2P.cjs");
5
- const require_proof = require("../proof-CDA3f-i5.cjs");
4
+ const require_http = require("../http-D4xMqSqO.cjs");
5
+ const require_proof = require("../proof-oGiWJkX0.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 verifyRequestDetailed, c as fetchKeyDetailed, f as formatAcceptSignature, h as validateAcceptSignature, i as verifyRequest, l as generateCryptoKeyPair, m as parseAcceptSignature, o as exportJwk, p as fulfillAcceptSignature, r as signRequest, s as fetchKey, u as importJwk } from "../http-1NL30qCe.js";
4
- import { a as verifyProof, c as getKeyOwner, d as detachSignature, f as hasSignatureLike, h as verifySignature, i as verifyObject, l as attachSignature, m as verifyJsonLd, n as hasProofLike, p as signJsonLd, r as signObject, s as doesActorOwnKey, t as createProof, u as createSignature } from "../proof-Dedf8md5.js";
3
+ import { a as verifyRequestDetailed, c as fetchKeyDetailed, f as formatAcceptSignature, h as validateAcceptSignature, i as verifyRequest, l as generateCryptoKeyPair, m as parseAcceptSignature, o as exportJwk, p as fulfillAcceptSignature, r as signRequest, s as fetchKey, u as importJwk } from "../http-BJ-t29n_.js";
4
+ import { a as verifyProof, c as getKeyOwner, d as detachSignature, f as hasSignatureLike, h as verifySignature, i as verifyObject, l as attachSignature, m as verifyJsonLd, n as hasProofLike, p as signJsonLd, r as signObject, s as doesActorOwnKey, t as createProof, u as createSignature } from "../proof-CtMmqa09.js";
5
5
  export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, hasProofLike, hasSignatureLike, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
@@ -6,7 +6,7 @@ import "../std__assert-CRDpx_HF.mjs";
6
6
  import { n as assertFalse } from "../assert_rejects-B-qJtC9Z.mjs";
7
7
  import { t as assert } from "../assert-DikXweDx.mjs";
8
8
  import { o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-DGu1NFwu.mjs";
9
- import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-CEWFJlqo.mjs";
9
+ import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-CuW0S2XY.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
@@ -8,7 +8,7 @@ import { t as assertInstanceOf } from "../assert_instance_of-C4Ri6VuN.mjs";
8
8
  import { t as assert } from "../assert-DikXweDx.mjs";
9
9
  import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DGu1NFwu.mjs";
10
10
  import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-CNmZLixq.mjs";
11
- import { a as verifyProof, i as verifyObject, n as hasProofLike, r as signObject, t as createProof } from "../proof-BFyPVl1r.mjs";
11
+ import { a as verifyProof, i as verifyObject, n as hasProofLike, r as signObject, t as createProof } from "../proof-CFPGr1xC.mjs";
12
12
  import { mockDocumentLoader, test } from "@fedify/fixture";
13
13
  import { Create, DataIntegrityProof, Document, Multikey, Note, PUBLIC_COLLECTION, Place } from "@fedify/vocab";
14
14
  import { decodeMultibase, importMultibaseKey } from "@fedify/vocab-runtime";
@@ -1137,6 +1137,18 @@ interface ActorCallbackSetters<TContextData> {
1137
1137
  * @since 1.4.0
1138
1138
  */
1139
1139
  mapAlias(mapper: ActorAliasMapper<TContextData>): ActorCallbackSetters<TContextData>;
1140
+ /**
1141
+ * Maps a fixed path to a sentinel identifier. It is useful for exposing
1142
+ * a single, instance-level actor at a fixed path, such as `/actor` for
1143
+ * a relay or `/bot` for a bot.
1144
+ * @param path The fixed path to map to the identifier.
1145
+ * @param identifier The sentinel identifier to map the path to.
1146
+ * @returns The setters object so that settings can be chained.
1147
+ * @throws {RouterError} If the provided path or identifier is invalid or fails
1148
+ * runtime validation.
1149
+ * @since 2.3.0
1150
+ */
1151
+ mapActorAlias(path: `/${string}`, identifier: string): ActorCallbackSetters<TContextData>;
1140
1152
  /**
1141
1153
  * Specifies the conditions under which requests are authorized.
1142
1154
  * @param predicate A callback that returns whether a request is authorized.
@@ -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-CRDpx_HF.mjs";
7
7
  import { t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
8
- import { l as verifyRequest } from "../http-CX_zHeOD.mjs";
8
+ import { l as verifyRequest } from "../http-CfToB_iu.mjs";
9
9
  import { i as rsaPrivateKey2 } from "../keys-DGu1NFwu.mjs";
10
- import { t as getAuthenticatedDocumentLoader } from "../docloader-q9QT51g3.mjs";
10
+ import { t as getAuthenticatedDocumentLoader } from "../docloader-mEJ3hsMB.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
@@ -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-aGOwL6Vj.cjs");
4
+ const require_kv_cache = require("../kv-cache-DRwOjOkl.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-CsC3P4uu.js";
3
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "../kv-cache-B142kDZL.js";
4
4
  export { getAuthenticatedDocumentLoader, kvCache };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/fedify",
3
- "version": "2.3.0-dev.1013+4aa6a88c",
3
+ "version": "2.3.0-dev.1021+ab2fa4a9",
4
4
  "description": "An ActivityPub server framework",
5
5
  "keywords": [
6
6
  "ActivityPub",
@@ -153,9 +153,9 @@
153
153
  "uri-template-router": "^1.0.0",
154
154
  "url-template": "^3.1.1",
155
155
  "urlpattern-polyfill": "^10.1.0",
156
- "@fedify/vocab": "2.3.0-dev.1013+4aa6a88c",
157
- "@fedify/vocab-runtime": "2.3.0-dev.1013+4aa6a88c",
158
- "@fedify/webfinger": "2.3.0-dev.1013+4aa6a88c"
156
+ "@fedify/vocab-runtime": "2.3.0-dev.1021+ab2fa4a9",
157
+ "@fedify/webfinger": "2.3.0-dev.1021+ab2fa4a9",
158
+ "@fedify/vocab": "2.3.0-dev.1021+ab2fa4a9"
159
159
  },
160
160
  "devDependencies": {
161
161
  "@std/assert": "npm:@jsr/std__assert@^0.226.0",
@@ -167,7 +167,7 @@
167
167
  "tsx": "^4.19.4",
168
168
  "typescript": "^5.9.2",
169
169
  "wrangler": "^4.17.0",
170
- "@fedify/vocab-tools": "^2.3.0-dev.1013+4aa6a88c",
170
+ "@fedify/vocab-tools": "^2.3.0-dev.1021+ab2fa4a9",
171
171
  "@fedify/fixture": "2.0.0"
172
172
  },
173
173
  "scripts": {