@fedify/fedify 2.3.0-dev.1013 → 2.3.0-dev.1034
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-CROLcFVM.mjs → builder-y06Dq5bp.mjs} +14 -4
- package/dist/chunk-QSgtlS85.mjs +29 -0
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/outgoing-jsonld.test.mjs +1 -1
- package/dist/compat/public-audience.test.mjs +1 -1
- package/dist/compat/transformers.test.mjs +2 -2
- package/dist/{context-Dk_tacqz.mjs → context-7Azky82W.mjs} +3 -2
- package/dist/{context-BDl7Y6f-.d.cts → context-BKLGj9QO.d.cts} +24 -1
- package/dist/{context-zTZAI3KP.d.ts → context-DrNqYkPw.d.ts} +24 -1
- package/dist/{deno-Ctd-K-t6.mjs → deno-DB1H1VHx.mjs} +1 -1
- package/dist/{docloader-q9QT51g3.mjs → docloader-3HwiWeYL.mjs} +2 -2
- package/dist/{esm-DVILvP5e.mjs → esm-DhnRLoG9.mjs} +1 -24
- package/dist/execAsync-eck5rbtb.mjs +13 -0
- package/dist/federation/builder.test.mjs +8 -3
- package/dist/federation/collection.test.mjs +1 -1
- package/dist/federation/handler.test.mjs +48 -11
- package/dist/federation/idempotency.test.mjs +4 -4
- package/dist/federation/inbox.test.mjs +1 -1
- package/dist/federation/keycache.test.mjs +2 -2
- package/dist/federation/kv.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +138 -15
- 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/negotiation.test.mjs +1 -1
- package/dist/federation/retry.test.mjs +1 -1
- package/dist/federation/send.test.mjs +4540 -11
- package/dist/federation/webfinger.test.mjs +3 -3
- package/dist/getMachineId-bsd-DqZ4QRFp.mjs +29 -0
- package/dist/getMachineId-darwin-DMbbW3m7.mjs +26 -0
- package/dist/getMachineId-linux-lyeD2ug3.mjs +22 -0
- package/dist/getMachineId-unsupported-JuKr57jY.mjs +17 -0
- package/dist/getMachineId-win-Dxyf5pJq.mjs +28 -0
- package/dist/{http-1NL30qCe.js → http-BUr93aO6.js} +1 -1
- package/dist/{http-CX_zHeOD.mjs → http-D9zG-L9N.mjs} +3 -3
- package/dist/{http-Du1Jgf2P.cjs → http-FnUTcdMf.cjs} +1 -1
- package/dist/{key-C1Oto4it.mjs → key-CV57mOYH.mjs} +1 -1
- package/dist/{kv-cache-aGOwL6Vj.cjs → kv-cache-BG9O8wVV.cjs} +1 -1
- package/dist/{kv-cache-CsC3P4uu.js → kv-cache-C3esyJFP.js} +1 -1
- package/dist/{ld-Dl1HIB1a.mjs → ld-sUf94RJ8.mjs} +2 -2
- package/dist/{middleware-BiFLcrEX.cjs → middleware-CKkBrsOD.cjs} +203 -32
- package/dist/{middleware-C1cf3_6V.mjs → middleware-cMxbPxDe.mjs} +1 -1
- package/dist/{middleware-CKJC8DRf.js → middleware-fAuUxD9-.js} +203 -32
- package/dist/{middleware-BwC5U8zJ.cjs → middleware-ohzkLsW4.cjs} +1 -1
- package/dist/{middleware-CEWDB8EB.mjs → middleware-pb2EqN_r.mjs} +75 -27
- package/dist/{mod-ckCOmoCz.d.ts → mod-B8Z8mBLk.d.ts} +1 -1
- package/dist/{mod-BghZgD_U.d.cts → mod-DClCOv0M.d.cts} +1 -1
- package/dist/mod.cjs +4 -4
- package/dist/mod.d.cts +2 -2
- package/dist/mod.d.ts +2 -2
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/client.test.mjs +2 -2
- package/dist/nodeinfo/handler.test.mjs +3 -3
- package/dist/nodeinfo/types.test.mjs +1 -1
- package/dist/otel/exporter.test.mjs +25 -22
- package/dist/otel/mod.cjs +6 -5
- package/dist/otel/mod.d.cts +3 -2
- package/dist/otel/mod.d.ts +3 -2
- package/dist/otel/mod.js +6 -5
- package/dist/{outgoing-jsonld-CNmZLixq.mjs → outgoing-jsonld-Bi7n-dEy.mjs} +1 -1
- package/dist/{owner-CEWFJlqo.mjs → owner-DsPgl527.mjs} +2 -2
- package/dist/{proof-CDA3f-i5.cjs → proof-BhJpq_J9.cjs} +1 -1
- package/dist/{proof-BFyPVl1r.mjs → proof-iVfYyJpY.mjs} +4 -4
- package/dist/{proof-Dedf8md5.js → proof-k4mEvvdS.js} +1 -1
- package/dist/send-D-vYdfC6.mjs +306 -0
- package/dist/sig/accept.test.mjs +1 -1
- package/dist/sig/http.test.mjs +4 -4
- package/dist/sig/key.test.mjs +2 -2
- package/dist/sig/ld.test.mjs +3 -3
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +2 -2
- package/dist/sig/proof.test.mjs +3 -3
- package/dist/testing/mod.d.mts +18 -1
- package/dist/testing/mod.mjs +1 -1
- package/dist/utils/docloader.test.mjs +4 -4
- package/dist/utils/kv-cache.test.mjs +1 -1
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +7 -6
- package/dist/send-BJickEP4.mjs +0 -193
- /package/dist/{accept-CPkZzmGN.mjs → accept-CceiKpCy.mjs} +0 -0
- /package/dist/{activity-listener-ell7W1s9.mjs → activity-listener-tztVvlNb.mjs} +0 -0
- /package/dist/{client-D_1QpnWt.mjs → client-CIiz1WX7.mjs} +0 -0
- /package/dist/{collection-D-HqUuA2.mjs → collection-CA3V5zyK.mjs} +0 -0
- /package/dist/{keycache-EGATflN-.mjs → keycache-BeU0LCII.mjs} +0 -0
- /package/dist/{keys-DGu1NFwu.mjs → keys-C3kae-6B.mjs} +0 -0
- /package/dist/{kv-cache-U__xU4qR.mjs → kv-cache-Bmv7tUzz.mjs} +0 -0
- /package/dist/{kv-rV3vodCc.mjs → kv-x2IvBUyq.mjs} +0 -0
- /package/dist/{negotiation-SQvQgUqe.mjs → negotiation-VnHNB0Q5.mjs} +0 -0
- /package/dist/{public-audience-DYFHzm_c.mjs → public-audience-PVTwU_Ex.mjs} +0 -0
- /package/dist/{retry-bMXBL97A.mjs → retry-_VvV0h9f.mjs} +0 -0
- /package/dist/{types-J53Kw7so.mjs → types-BFowWFTT.mjs} +0 -0
|
@@ -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-
|
|
6
|
-
import { t as ActivityListenerSet } from "./activity-listener-
|
|
5
|
+
import { n as version, t as name } from "./deno-DB1H1VHx.mjs";
|
|
6
|
+
import { t as ActivityListenerSet } from "./activity-listener-tztVvlNb.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-
|
|
62
|
+
const { FederationImpl } = await import("./middleware-cMxbPxDe.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 {
|
|
591
|
+
export { FederationBuilderImpl as n, createFederationBuilder as r, ACTOR_ALIAS_PREFIX as t };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
import { createRequire } from "node:module";
|
|
5
|
+
//#region \0rolldown/runtime.js
|
|
6
|
+
var __create = Object.create;
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
11
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
15
|
+
key = keys[i];
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: ((k) => from[k]).bind(null, key),
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
+
value: mod,
|
|
25
|
+
enumerable: true
|
|
26
|
+
}) : target, mod));
|
|
27
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
28
|
+
//#endregion
|
|
29
|
+
export { __require as n, __toESM as r, __commonJSMin as t };
|
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 { kt as ActivityTransformer, n as Context } from "../context-
|
|
3
|
+
import { kt as ActivityTransformer, n as Context } from "../context-DrNqYkPw.js";
|
|
4
4
|
import { Activity } from "@fedify/vocab";
|
|
5
5
|
|
|
6
6
|
//#region src/compat/transformers.d.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 assertStrictEquals } from "../assert_strict_equals-Dmjbg-bA.mjs";
|
|
6
|
-
import { n as normalizeAttachmentArrays, r as normalizeOutgoingActivityJsonLd, t as isPreloadedContextAttachmentSafe } from "../outgoing-jsonld-
|
|
6
|
+
import { n as normalizeAttachmentArrays, r as normalizeOutgoingActivityJsonLd, t as isPreloadedContextAttachmentSafe } from "../outgoing-jsonld-Bi7n-dEy.mjs";
|
|
7
7
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
8
8
|
import { Create, Document, Note, PUBLIC_COLLECTION } from "@fedify/vocab";
|
|
9
9
|
//#region src/compat/outgoing-jsonld.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 assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
|
|
6
|
-
import { t as normalizePublicAudience } from "../public-audience-
|
|
6
|
+
import { t as normalizePublicAudience } from "../public-audience-PVTwU_Ex.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
import { Create, Note, PUBLIC_COLLECTION } from "@fedify/vocab";
|
|
9
9
|
import { getDocumentLoader, preloadedContexts } from "@fedify/vocab-runtime";
|
|
@@ -4,8 +4,8 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
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
|
-
import { t as MemoryKvStore } from "../kv-
|
|
8
|
-
import { n as FederationImpl, v as actorDehydrator, y as autoIdAssigner } from "../middleware-
|
|
7
|
+
import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
|
|
8
|
+
import { n as FederationImpl, v as actorDehydrator, y as autoIdAssigner } from "../middleware-pb2EqN_r.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
import { Follow, Person } from "@fedify/vocab";
|
|
11
11
|
//#region src/compat/transformers.test.ts
|
|
@@ -5,10 +5,10 @@ import { n as RouterError } from "./router-CrMLXoOr.mjs";
|
|
|
5
5
|
import { mockDocumentLoader } from "@fedify/fixture";
|
|
6
6
|
import { lookupObject, traverseCollection } from "@fedify/vocab";
|
|
7
7
|
import { lookupWebFinger } from "@fedify/webfinger";
|
|
8
|
-
import { trace } from "@opentelemetry/api";
|
|
8
|
+
import { metrics, trace } from "@opentelemetry/api";
|
|
9
9
|
//#region src/testing/context.ts
|
|
10
10
|
function createContext(values) {
|
|
11
|
-
const { federation, url = new URL("http://example.com/"), canonicalOrigin, data, documentLoader, contextLoader, tracerProvider, clone, getNodeInfoUri, getActorUri, getObjectUri, getCollectionUri, getOutboxUri, getInboxUri, getFollowingUri, getFollowersUri, getLikedUri, getFeaturedUri, getFeaturedTagsUri, parseUri, getActorKeyPairs, getDocumentLoader, lookupObject: lookupObject$1, traverseCollection: traverseCollection$1, lookupNodeInfo, lookupWebFinger: lookupWebFinger$1, sendActivity, routeActivity } = values;
|
|
11
|
+
const { federation, url = new URL("http://example.com/"), canonicalOrigin, data, documentLoader, contextLoader, meterProvider, tracerProvider, clone, getNodeInfoUri, getActorUri, getObjectUri, getCollectionUri, getOutboxUri, getInboxUri, getFollowingUri, getFollowersUri, getLikedUri, getFeaturedUri, getFeaturedTagsUri, parseUri, getActorKeyPairs, getDocumentLoader, lookupObject: lookupObject$1, traverseCollection: traverseCollection$1, lookupNodeInfo, lookupWebFinger: lookupWebFinger$1, sendActivity, routeActivity } = values;
|
|
12
12
|
function throwRouterError() {
|
|
13
13
|
throw new RouterError("Not implemented");
|
|
14
14
|
}
|
|
@@ -21,6 +21,7 @@ function createContext(values) {
|
|
|
21
21
|
hostname: url.hostname,
|
|
22
22
|
documentLoader: documentLoader ?? mockDocumentLoader,
|
|
23
23
|
contextLoader: contextLoader ?? mockDocumentLoader,
|
|
24
|
+
meterProvider: meterProvider ?? metrics.getMeterProvider(),
|
|
24
25
|
tracerProvider: tracerProvider ?? trace.getTracerProvider(),
|
|
25
26
|
clone: clone ?? ((data) => createContext({
|
|
26
27
|
...values,
|
|
@@ -5,7 +5,7 @@ import { n as KvStore, t as KvKey } from "./kv-CbLNp3zQ.cjs";
|
|
|
5
5
|
import { Activity, Actor, Collection, CryptographicKey, Hashtag, Link, LookupObjectOptions, Multikey, Object as Object$1, Recipient, Tombstone, TraverseCollectionOptions } from "@fedify/vocab";
|
|
6
6
|
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "@fedify/vocab-runtime";
|
|
7
7
|
import { Link as Link$1, LookupWebFingerOptions, ResourceDescriptor } from "@fedify/webfinger";
|
|
8
|
-
import { Span, Tracer, TracerProvider } from "@opentelemetry/api";
|
|
8
|
+
import { MeterProvider, Span, Tracer, TracerProvider } from "@opentelemetry/api";
|
|
9
9
|
|
|
10
10
|
//#region src/compat/types.d.ts
|
|
11
11
|
/**
|
|
@@ -1634,6 +1634,12 @@ interface FederationOptions<TContextData> {
|
|
|
1634
1634
|
* @since 1.3.0
|
|
1635
1635
|
*/
|
|
1636
1636
|
tracerProvider?: TracerProvider;
|
|
1637
|
+
/**
|
|
1638
|
+
* The OpenTelemetry meter provider for recording metrics. If not provided,
|
|
1639
|
+
* the default global meter provider is used.
|
|
1640
|
+
* @since 2.3.0
|
|
1641
|
+
*/
|
|
1642
|
+
meterProvider?: MeterProvider;
|
|
1637
1643
|
}
|
|
1638
1644
|
/**
|
|
1639
1645
|
* Additional settings for the actor dispatcher.
|
|
@@ -1681,6 +1687,18 @@ interface ActorCallbackSetters<TContextData> {
|
|
|
1681
1687
|
*/
|
|
1682
1688
|
mapAlias(mapper: ActorAliasMapper<TContextData>): ActorCallbackSetters<TContextData>;
|
|
1683
1689
|
/**
|
|
1690
|
+
* Maps a fixed path to a sentinel identifier. It is useful for exposing
|
|
1691
|
+
* a single, instance-level actor at a fixed path, such as `/actor` for
|
|
1692
|
+
* a relay or `/bot` for a bot.
|
|
1693
|
+
* @param path The fixed path to map to the identifier.
|
|
1694
|
+
* @param identifier The sentinel identifier to map the path to.
|
|
1695
|
+
* @returns The setters object so that settings can be chained.
|
|
1696
|
+
* @throws {RouterError} If the provided path or identifier is invalid or fails
|
|
1697
|
+
* runtime validation.
|
|
1698
|
+
* @since 2.3.0
|
|
1699
|
+
*/
|
|
1700
|
+
mapActorAlias(path: `/${string}`, identifier: string): ActorCallbackSetters<TContextData>;
|
|
1701
|
+
/**
|
|
1684
1702
|
* Specifies the conditions under which requests are authorized.
|
|
1685
1703
|
* @param predicate A callback that returns whether a request is authorized.
|
|
1686
1704
|
* @returns The setters object so that settings can be chained.
|
|
@@ -2039,6 +2057,11 @@ interface Context<TContextData> {
|
|
|
2039
2057
|
*/
|
|
2040
2058
|
readonly tracerProvider: TracerProvider;
|
|
2041
2059
|
/**
|
|
2060
|
+
* The OpenTelemetry meter provider.
|
|
2061
|
+
* @since 2.3.0
|
|
2062
|
+
*/
|
|
2063
|
+
readonly meterProvider?: MeterProvider;
|
|
2064
|
+
/**
|
|
2042
2065
|
* The document loader for loading remote JSON-LD documents.
|
|
2043
2066
|
*/
|
|
2044
2067
|
readonly documentLoader: DocumentLoader;
|
|
@@ -5,7 +5,7 @@ import { o as VerifyRequestFailureReason, t as HttpMessageSignaturesSpec } from
|
|
|
5
5
|
import { n as GetKeyOwnerOptions } from "./owner-74ARJ5TL.js";
|
|
6
6
|
import { n as KvStore, t as KvKey } from "./kv-GFYnFoOl.js";
|
|
7
7
|
import { Activity, Actor, Collection, CryptographicKey, Hashtag, Link, LookupObjectOptions, Multikey, Object as Object$1, Recipient, Tombstone, TraverseCollectionOptions } from "@fedify/vocab";
|
|
8
|
-
import { Span, Tracer, TracerProvider } from "@opentelemetry/api";
|
|
8
|
+
import { MeterProvider, Span, Tracer, TracerProvider } from "@opentelemetry/api";
|
|
9
9
|
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "@fedify/vocab-runtime";
|
|
10
10
|
import { Link as Link$1, LookupWebFingerOptions, ResourceDescriptor } from "@fedify/webfinger";
|
|
11
11
|
|
|
@@ -1636,6 +1636,12 @@ interface FederationOptions<TContextData> {
|
|
|
1636
1636
|
* @since 1.3.0
|
|
1637
1637
|
*/
|
|
1638
1638
|
tracerProvider?: TracerProvider;
|
|
1639
|
+
/**
|
|
1640
|
+
* The OpenTelemetry meter provider for recording metrics. If not provided,
|
|
1641
|
+
* the default global meter provider is used.
|
|
1642
|
+
* @since 2.3.0
|
|
1643
|
+
*/
|
|
1644
|
+
meterProvider?: MeterProvider;
|
|
1639
1645
|
}
|
|
1640
1646
|
/**
|
|
1641
1647
|
* Additional settings for the actor dispatcher.
|
|
@@ -1683,6 +1689,18 @@ interface ActorCallbackSetters<TContextData> {
|
|
|
1683
1689
|
*/
|
|
1684
1690
|
mapAlias(mapper: ActorAliasMapper<TContextData>): ActorCallbackSetters<TContextData>;
|
|
1685
1691
|
/**
|
|
1692
|
+
* Maps a fixed path to a sentinel identifier. It is useful for exposing
|
|
1693
|
+
* a single, instance-level actor at a fixed path, such as `/actor` for
|
|
1694
|
+
* a relay or `/bot` for a bot.
|
|
1695
|
+
* @param path The fixed path to map to the identifier.
|
|
1696
|
+
* @param identifier The sentinel identifier to map the path to.
|
|
1697
|
+
* @returns The setters object so that settings can be chained.
|
|
1698
|
+
* @throws {RouterError} If the provided path or identifier is invalid or fails
|
|
1699
|
+
* runtime validation.
|
|
1700
|
+
* @since 2.3.0
|
|
1701
|
+
*/
|
|
1702
|
+
mapActorAlias(path: `/${string}`, identifier: string): ActorCallbackSetters<TContextData>;
|
|
1703
|
+
/**
|
|
1686
1704
|
* Specifies the conditions under which requests are authorized.
|
|
1687
1705
|
* @param predicate A callback that returns whether a request is authorized.
|
|
1688
1706
|
* @returns The setters object so that settings can be chained.
|
|
@@ -2041,6 +2059,11 @@ interface Context<TContextData> {
|
|
|
2041
2059
|
*/
|
|
2042
2060
|
readonly tracerProvider: TracerProvider;
|
|
2043
2061
|
/**
|
|
2062
|
+
* The OpenTelemetry meter provider.
|
|
2063
|
+
* @since 2.3.0
|
|
2064
|
+
*/
|
|
2065
|
+
readonly meterProvider?: MeterProvider;
|
|
2066
|
+
/**
|
|
2044
2067
|
* The document loader for loading remote JSON-LD documents.
|
|
2045
2068
|
*/
|
|
2046
2069
|
readonly documentLoader: DocumentLoader;
|
|
@@ -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-
|
|
5
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { o as validateCryptoKey } from "./key-CV57mOYH.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-D9zG-L9N.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";
|
|
@@ -1,30 +1,7 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import "
|
|
5
|
-
//#region \0rolldown/runtime.js
|
|
6
|
-
var __create = Object.create;
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
11
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
15
|
-
key = keys[i];
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
-
get: ((k) => from[k]).bind(null, key),
|
|
18
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
return to;
|
|
22
|
-
};
|
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
-
value: mod,
|
|
25
|
-
enumerable: true
|
|
26
|
-
}) : target, mod));
|
|
27
|
-
//#endregion
|
|
4
|
+
import { r as __toESM, t as __commonJSMin } from "./chunk-QSgtlS85.mjs";
|
|
28
5
|
//#region ../../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js
|
|
29
6
|
var require_glob_to_regexp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
30
7
|
module.exports = function(glob, opts) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
import { n as __require, t as __commonJSMin } from "./chunk-QSgtlS85.mjs";
|
|
5
|
+
//#region ../../node_modules/.pnpm/@opentelemetry+resources@2.5.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/src/detectors/platform/node/machine-id/execAsync.js
|
|
6
|
+
var require_execAsync = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.execAsync = void 0;
|
|
9
|
+
const child_process = __require("child_process");
|
|
10
|
+
exports.execAsync = __require("util").promisify(child_process.exec);
|
|
11
|
+
}));
|
|
12
|
+
//#endregion
|
|
13
|
+
export { require_execAsync as t };
|
|
@@ -5,8 +5,8 @@ import { n as RouterError } from "../router-CrMLXoOr.mjs";
|
|
|
5
5
|
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
|
-
import { t as MemoryKvStore } from "../kv-
|
|
9
|
-
import {
|
|
8
|
+
import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
|
|
9
|
+
import { r as createFederationBuilder } from "../builder-y06Dq5bp.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
|
-
|
|
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}`);
|
|
@@ -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 "../std__assert-CRDpx_HF.mjs";
|
|
6
|
-
import { n as digest, t as buildCollectionSynchronizationHeader } from "../collection-
|
|
6
|
+
import { n as digest, t as buildCollectionSynchronizationHeader } from "../collection-CA3V5zyK.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
import { decodeHex } from "byte-encodings/hex";
|
|
9
9
|
//#region src/federation/collection.test.ts
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as createOutboxContext, r as createRequestContext, t as createInboxContext } from "../context-
|
|
4
|
+
import { n as createOutboxContext, r as createRequestContext, t as createInboxContext } from "../context-7Azky82W.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
|
-
import "../std__assert-CRDpx_HF.mjs";
|
|
6
|
+
import { r as assertGreaterOrEqual } from "../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
|
-
import { r as parseAcceptSignature } from "../accept-
|
|
10
|
-
import { s as signRequest } from "../http-
|
|
11
|
-
import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-
|
|
12
|
-
import { t as MemoryKvStore } from "../kv-
|
|
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-
|
|
14
|
-
import { t as ActivityListenerSet } from "../activity-listener-
|
|
15
|
-
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
9
|
+
import { r as parseAcceptSignature } from "../accept-CceiKpCy.mjs";
|
|
10
|
+
import { s as signRequest } from "../http-D9zG-L9N.mjs";
|
|
11
|
+
import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-C3kae-6B.mjs";
|
|
12
|
+
import { t as MemoryKvStore } from "../kv-x2IvBUyq.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-pb2EqN_r.mjs";
|
|
14
|
+
import { t as ActivityListenerSet } from "../activity-listener-tztVvlNb.mjs";
|
|
15
|
+
import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
16
16
|
import { Activity, Create, Note, Person, Tombstone } from "@fedify/vocab";
|
|
17
17
|
import { FetchError } from "@fedify/vocab-runtime";
|
|
18
18
|
//#region src/federation/handler.test.ts
|
|
@@ -1910,9 +1910,11 @@ test("handleCustomCollection()", async () => {
|
|
|
1910
1910
|
});
|
|
1911
1911
|
test("handleInbox() records OpenTelemetry span events", async () => {
|
|
1912
1912
|
const [tracerProvider, exporter] = createTestTracerProvider();
|
|
1913
|
+
const [meterProvider, recorder] = createTestMeterProvider();
|
|
1913
1914
|
const kv = new MemoryKvStore();
|
|
1914
1915
|
const federation = createFederation({
|
|
1915
1916
|
kv,
|
|
1917
|
+
meterProvider,
|
|
1916
1918
|
tracerProvider
|
|
1917
1919
|
});
|
|
1918
1920
|
const activity = new Create({
|
|
@@ -1974,6 +1976,7 @@ test("handleInbox() records OpenTelemetry span events", async () => {
|
|
|
1974
1976
|
onNotFound: (_request) => new Response("Not found", { status: 404 }),
|
|
1975
1977
|
signatureTimeWindow: false,
|
|
1976
1978
|
skipSignatureVerification: true,
|
|
1979
|
+
meterProvider,
|
|
1977
1980
|
tracerProvider
|
|
1978
1981
|
})).status, 202);
|
|
1979
1982
|
assert(receivedActivity != null);
|
|
@@ -1992,12 +1995,19 @@ test("handleInbox() records OpenTelemetry span events", async () => {
|
|
|
1992
1995
|
const recordedActivity = JSON.parse(event.attributes["activitypub.activity.json"]);
|
|
1993
1996
|
assertEquals(recordedActivity.id, "https://example.com/activity");
|
|
1994
1997
|
assertEquals(recordedActivity.type, "Create");
|
|
1998
|
+
const durations = recorder.getMeasurements("activitypub.inbox.processing_duration");
|
|
1999
|
+
assertEquals(durations.length, 1);
|
|
2000
|
+
assertEquals(durations[0].type, "histogram");
|
|
2001
|
+
assertGreaterOrEqual(durations[0].value, 0);
|
|
2002
|
+
assertEquals(durations[0].attributes["activitypub.activity.type"], "https://www.w3.org/ns/activitystreams#Create");
|
|
1995
2003
|
});
|
|
1996
2004
|
test("handleInbox() records unverified HTTP signature details", async () => {
|
|
1997
2005
|
const [tracerProvider, exporter] = createTestTracerProvider();
|
|
2006
|
+
const [meterProvider, recorder] = createTestMeterProvider();
|
|
1998
2007
|
const kv = new MemoryKvStore();
|
|
1999
2008
|
const federation = createFederation({
|
|
2000
2009
|
kv,
|
|
2010
|
+
meterProvider,
|
|
2001
2011
|
tracerProvider
|
|
2002
2012
|
});
|
|
2003
2013
|
const keyId = new URL("https://gone.example/users/someone#main-key");
|
|
@@ -2062,6 +2072,7 @@ test("handleInbox() records unverified HTTP signature details", async () => {
|
|
|
2062
2072
|
onNotFound: (_request) => new Response("Not found", { status: 404 }),
|
|
2063
2073
|
signatureTimeWindow: false,
|
|
2064
2074
|
skipSignatureVerification: false,
|
|
2075
|
+
meterProvider,
|
|
2065
2076
|
tracerProvider
|
|
2066
2077
|
})).status, 202);
|
|
2067
2078
|
const verifySpans = exporter.getSpans("http_signatures.verify");
|
|
@@ -2074,6 +2085,12 @@ test("handleInbox() records unverified HTTP signature details", async () => {
|
|
|
2074
2085
|
assert(event.attributes != null);
|
|
2075
2086
|
assertEquals(event.attributes["http_signatures.failure_reason"], "keyFetchError");
|
|
2076
2087
|
assertEquals(event.attributes["http_signatures.key_fetch_status"], 410);
|
|
2088
|
+
const failures = recorder.getMeasurements("activitypub.signature.verification_failure");
|
|
2089
|
+
assertEquals(failures.length, 1);
|
|
2090
|
+
assertEquals(failures[0].type, "counter");
|
|
2091
|
+
assertEquals(failures[0].value, 1);
|
|
2092
|
+
assertEquals(failures[0].attributes["activitypub.remote.host"], "gone.example");
|
|
2093
|
+
assertEquals(failures[0].attributes["activitypub.verification.failure_reason"], "keyFetchError");
|
|
2077
2094
|
});
|
|
2078
2095
|
test("handleInbox() challenge policy enabled + unsigned request", async () => {
|
|
2079
2096
|
const activity = new Create({
|
|
@@ -2476,6 +2493,7 @@ test("handleInbox() nonce consumption on valid signed request", async () => {
|
|
|
2476
2493
|
]), void 0, "Nonce must be consumed after use");
|
|
2477
2494
|
});
|
|
2478
2495
|
test("handleInbox() nonce replay prevention", async () => {
|
|
2496
|
+
const [meterProvider, recorder] = createTestMeterProvider();
|
|
2479
2497
|
const activity = new Create({
|
|
2480
2498
|
id: new URL("https://example.com/activities/nonce-3"),
|
|
2481
2499
|
actor: new URL("https://example.com/person2"),
|
|
@@ -2496,7 +2514,10 @@ test("handleInbox() nonce replay prevention", async () => {
|
|
|
2496
2514
|
rfc9421: { nonce }
|
|
2497
2515
|
});
|
|
2498
2516
|
const context = createRequestContext({
|
|
2499
|
-
federation: createFederation({
|
|
2517
|
+
federation: createFederation({
|
|
2518
|
+
kv: new MemoryKvStore(),
|
|
2519
|
+
meterProvider
|
|
2520
|
+
}),
|
|
2500
2521
|
request: signedRequest,
|
|
2501
2522
|
url: new URL(signedRequest.url),
|
|
2502
2523
|
data: void 0,
|
|
@@ -2526,6 +2547,7 @@ test("handleInbox() nonce replay prevention", async () => {
|
|
|
2526
2547
|
onNotFound: () => new Response("Not found", { status: 404 }),
|
|
2527
2548
|
signatureTimeWindow: { minutes: 5 },
|
|
2528
2549
|
skipSignatureVerification: false,
|
|
2550
|
+
meterProvider,
|
|
2529
2551
|
inboxChallengePolicy: {
|
|
2530
2552
|
enabled: true,
|
|
2531
2553
|
requestNonce: true,
|
|
@@ -2540,6 +2562,11 @@ test("handleInbox() nonce replay prevention", async () => {
|
|
|
2540
2562
|
assert(parsed[0].parameters.nonce != null, "Fresh challenge must include a new nonce");
|
|
2541
2563
|
assert(parsed[0].parameters.nonce !== nonce, "Fresh nonce must differ from the replayed one");
|
|
2542
2564
|
assertEquals(response.headers.get("Cache-Control"), "no-store", "Challenge response must have Cache-Control: no-store");
|
|
2565
|
+
const failures = recorder.getMeasurements("activitypub.signature.verification_failure");
|
|
2566
|
+
assertEquals(failures.length, 1);
|
|
2567
|
+
assertEquals(failures[0].value, 1);
|
|
2568
|
+
assertEquals(failures[0].attributes["activitypub.remote.host"], "example.com");
|
|
2569
|
+
assertEquals(failures[0].attributes["activitypub.verification.failure_reason"], "invalidNonce");
|
|
2543
2570
|
});
|
|
2544
2571
|
test("handleInbox() nonce bypass: valid sig without nonce + invalid sig with nonce", async () => {
|
|
2545
2572
|
const activity = new Create({
|
|
@@ -2619,6 +2646,7 @@ test("handleInbox() nonce bypass: valid sig without nonce + invalid sig with non
|
|
|
2619
2646
|
]), true, "Nonce must not be consumed when it comes from a non-verified signature");
|
|
2620
2647
|
});
|
|
2621
2648
|
test("handleInbox() actor/key mismatch does not consume nonce", async () => {
|
|
2649
|
+
const [meterProvider, recorder] = createTestMeterProvider();
|
|
2622
2650
|
const maliciousActivity = new Create({
|
|
2623
2651
|
id: new URL("https://attacker.example.com/activities/mismatch-nonce-1"),
|
|
2624
2652
|
actor: new URL("https://victim.example.com/users/alice"),
|
|
@@ -2644,7 +2672,10 @@ test("handleInbox() actor/key mismatch does not consume nonce", async () => {
|
|
|
2644
2672
|
rfc9421: { nonce }
|
|
2645
2673
|
});
|
|
2646
2674
|
const context = createRequestContext({
|
|
2647
|
-
federation: createFederation({
|
|
2675
|
+
federation: createFederation({
|
|
2676
|
+
kv: new MemoryKvStore(),
|
|
2677
|
+
meterProvider
|
|
2678
|
+
}),
|
|
2648
2679
|
request: maliciousRequest,
|
|
2649
2680
|
url: new URL(maliciousRequest.url),
|
|
2650
2681
|
data: void 0,
|
|
@@ -2674,6 +2705,7 @@ test("handleInbox() actor/key mismatch does not consume nonce", async () => {
|
|
|
2674
2705
|
onNotFound: () => new Response("Not found", { status: 404 }),
|
|
2675
2706
|
signatureTimeWindow: { minutes: 5 },
|
|
2676
2707
|
skipSignatureVerification: false,
|
|
2708
|
+
meterProvider,
|
|
2677
2709
|
inboxChallengePolicy: {
|
|
2678
2710
|
enabled: true,
|
|
2679
2711
|
requestNonce: true,
|
|
@@ -2687,6 +2719,11 @@ test("handleInbox() actor/key mismatch does not consume nonce", async () => {
|
|
|
2687
2719
|
"acceptSignatureNonce",
|
|
2688
2720
|
nonce
|
|
2689
2721
|
]), true, "Nonce must not be consumed when actor/key ownership check fails");
|
|
2722
|
+
const failures = recorder.getMeasurements("activitypub.signature.verification_failure");
|
|
2723
|
+
assertEquals(failures.length, 1);
|
|
2724
|
+
assertEquals(failures[0].value, 1);
|
|
2725
|
+
assertEquals(failures[0].attributes["activitypub.remote.host"], "example.com");
|
|
2726
|
+
assertEquals(failures[0].attributes["activitypub.verification.failure_reason"], "actorKeyMismatch");
|
|
2690
2727
|
});
|
|
2691
2728
|
test("handleInbox() challenge policy enabled + unverifiedActivityHandler returns undefined", async () => {
|
|
2692
2729
|
const activity = new Create({
|
|
@@ -3,10 +3,10 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import "../std__assert-CRDpx_HF.mjs";
|
|
6
|
-
import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-
|
|
7
|
-
import { r as signObject } from "../proof-
|
|
8
|
-
import { t as MemoryKvStore } from "../kv-
|
|
9
|
-
import { o as createFederation } from "../middleware-
|
|
6
|
+
import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-C3kae-6B.mjs";
|
|
7
|
+
import { r as signObject } from "../proof-iVfYyJpY.mjs";
|
|
8
|
+
import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
|
|
9
|
+
import { o as createFederation } from "../middleware-pb2EqN_r.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 ActivityListenerSet } from "../activity-listener-
|
|
6
|
+
import { t as ActivityListenerSet } from "../activity-listener-tztVvlNb.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
|
|
@@ -4,8 +4,8 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
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
|
-
import { t as MemoryKvStore } from "../kv-
|
|
8
|
-
import { t as KvKeyCache } from "../keycache-
|
|
7
|
+
import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
|
|
8
|
+
import { t as KvKeyCache } from "../keycache-BeU0LCII.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
import { CryptographicKey, Multikey } from "@fedify/vocab";
|
|
11
11
|
//#region src/federation/keycache.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 "../std__assert-CRDpx_HF.mjs";
|
|
6
|
-
import { t as MemoryKvStore } from "../kv-
|
|
6
|
+
import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
//#region src/federation/kv.test.ts
|
|
9
9
|
test("MemoryKvStore", async (t) => {
|