@fedify/fedify 2.4.0-dev.2103 → 2.4.0-dev.2108
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-CHht75pX.mjs → builder-BRlYEsrV.mjs} +28 -4
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{compound-proof-DKKH_Nr1.mjs → compound-proof-CHGINiJg.mjs} +2 -2
- package/dist/{context-CfJE_oQu.d.ts → context-B4F4kGJq.d.ts} +92 -10
- package/dist/{context-mDTxTw-S.d.cts → context-Cqx9M_zO.d.cts} +92 -10
- package/dist/{deno-CkjiYK_Z.mjs → deno-CC4RKEEp.mjs} +1 -1
- package/dist/{docloader-C1hAJnWc.mjs → docloader-D3_m98fe.mjs} +2 -2
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/compound-fanout.test.mjs +3 -3
- package/dist/federation/handler-compound-proof.test.mjs +3 -3
- package/dist/federation/handler.test.mjs +118 -5
- package/dist/federation/hashlink-media.test.mjs +2 -2
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/metrics.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +184 -7
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.d.cts +3 -3
- package/dist/federation/mod.d.ts +3 -3
- package/dist/federation/mod.js +1 -1
- package/dist/federation/outgoing-proof.test.mjs +5 -5
- package/dist/federation/portable-actor.test.mjs +3 -3
- package/dist/federation/portable-gateway-keys.test.mjs +3 -3
- package/dist/federation/portable-inbox.test.mjs +4 -4
- package/dist/federation/portable.test.mjs +31 -4
- package/dist/federation/send.test.mjs +3 -3
- package/dist/federation/tasks/enqueue.test.mjs +1 -1
- package/dist/federation/tasks/tasks.test.mjs +2 -2
- package/dist/federation/temporal.test.mjs +1 -1
- package/dist/federation/webfinger.test.mjs +1 -1
- package/dist/{federation-C1dL6SiT.cjs → federation-dqo6ZzgT.cjs} +48 -15
- package/dist/{http-Cala2Grs.cjs → http-B7wEqv49.cjs} +1 -1
- package/dist/{http-BU-8fUrz.mjs → http-CHEYA5fH.mjs} +4 -4
- package/dist/{http-tTlTeFa0.js → http-CaUBCHYJ.js} +1 -1
- package/dist/{key-I8gLBkcf.mjs → key-B8u1vdvF.mjs} +2 -2
- package/dist/{kv-cache-Bl5EBFrU.cjs → kv-cache-0pYMPrkL.cjs} +1 -1
- package/dist/{kv-cache-DJFoGRWQ.mjs → kv-cache-CTdvf_Iq.mjs} +1 -1
- package/dist/{kv-cache-CxQu_cd4.js → kv-cache-ibncHN1D.js} +1 -1
- package/dist/{ld-wiJbqJHa.mjs → ld-BTMJHEGV.mjs} +3 -3
- package/dist/{metrics-BCAa5-kE.mjs → metrics-CF1TEvdS.mjs} +1 -1
- package/dist/{middleware-FnITXhtz.mjs → middleware-B-rZ7oE-.mjs} +24 -15
- package/dist/{middleware-6p2dYEVA.mjs → middleware-DCMTJT3_.mjs} +1 -1
- package/dist/{middleware-B6IVTVL0.js → middleware-Dl-Y_ZlC.js} +40 -7
- package/dist/{mod-BYvPz_T0.d.ts → mod-4s_XgF17.d.ts} +1 -1
- package/dist/{mod-B3OzOobN.d.cts → mod-BuFmStNT.d.cts} +1 -1
- package/dist/mod.cjs +5 -5
- package/dist/mod.d.cts +4 -4
- package/dist/mod.d.ts +4 -4
- package/dist/mod.js +5 -5
- package/dist/nodeinfo/handler.test.mjs +1 -1
- package/dist/{owner-DCt8W_Cv.cjs → owner-CGnHPl4k.cjs} +1 -1
- package/dist/{owner-BJp47LxN.mjs → owner-CY--JSqO.mjs} +3 -3
- package/dist/{owner-j5yrbXS1.js → owner-M8dOKEl6.js} +1 -1
- package/dist/{portable-key-B5oKE_wZ.mjs → portable-key-C0-ghkgM.mjs} +1 -1
- package/dist/{proof-BE4T5zF6.mjs → proof-DDw0i9b1.mjs} +4 -4
- package/dist/{send-BFITuKHw.mjs → send-CU3sHGPt.mjs} +3 -3
- package/dist/sig/compound-proof-discovery.test.mjs +1 -1
- package/dist/sig/compound-proof-producer.test.mjs +1 -1
- package/dist/sig/compound-proof-verification.test.mjs +2 -2
- package/dist/sig/compound-proof.test.mjs +2 -2
- package/dist/sig/http.test.mjs +2 -2
- package/dist/sig/key.test.mjs +1 -1
- package/dist/sig/ld.test.mjs +2 -2
- package/dist/sig/mod.cjs +3 -3
- package/dist/sig/mod.js +3 -3
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/portable-collection.test.mjs +2 -2
- package/dist/sig/portable-key.test.mjs +3 -3
- package/dist/sig/proof.test.mjs +3 -3
- package/dist/{sig-CRTRoouH.cjs → sig-C2CORtvg.cjs} +2 -2
- package/dist/{sig-CJHdGk9w.js → sig-fycq7sOr.js} +2 -2
- package/dist/{temporal-CyDDbE4i.mjs → temporal-NHiSpGcW.mjs} +1 -1
- package/dist/testing/kv.test.mjs +1 -1
- package/dist/testing/mod.d.mts +91 -9
- package/dist/utils/docloader.test.mjs +2 -2
- 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 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
4
|
+
import { n as version, t as name } from "./deno-CC4RKEEp.mjs";
|
|
5
5
|
import { s as isPortableId } from "./portable-key-id-Bva5iT3W.mjs";
|
|
6
6
|
import { t as ActivityListenerSet } from "./activity-listener-C-BSbKI7.mjs";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -89,7 +89,7 @@ var FederationBuilderImpl = class {
|
|
|
89
89
|
* specified.
|
|
90
90
|
*/
|
|
91
91
|
async build(options) {
|
|
92
|
-
const { FederationImpl } = await import("./middleware-
|
|
92
|
+
const { FederationImpl } = await import("./middleware-DCMTJT3_.mjs");
|
|
93
93
|
const f = new FederationImpl(options);
|
|
94
94
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
95
95
|
f.router = this.router.clone();
|
|
@@ -297,8 +297,8 @@ var FederationBuilderImpl = class {
|
|
|
297
297
|
const variables = Router.variables(path);
|
|
298
298
|
this.router.add(path, routeName);
|
|
299
299
|
const callbacks = {
|
|
300
|
-
dispatcher: (ctx, values) => {
|
|
301
|
-
|
|
300
|
+
dispatcher: async (ctx, values) => {
|
|
301
|
+
const object = await this._getTracer().startActiveSpan("activitypub.dispatch_object", {
|
|
302
302
|
kind: SpanKind.SERVER,
|
|
303
303
|
attributes: {
|
|
304
304
|
"fedify.object.type": cls.typeId.href,
|
|
@@ -321,6 +321,8 @@ var FederationBuilderImpl = class {
|
|
|
321
321
|
span.end();
|
|
322
322
|
}
|
|
323
323
|
});
|
|
324
|
+
if (object instanceof Tombstone) warnMismatchedTombstoneId(ctx, cls, values, object);
|
|
325
|
+
return object;
|
|
324
326
|
},
|
|
325
327
|
parameters: variables
|
|
326
328
|
};
|
|
@@ -690,6 +692,28 @@ var FederationBuilderImpl = class {
|
|
|
690
692
|
function createFederationBuilder() {
|
|
691
693
|
return new FederationBuilderImpl();
|
|
692
694
|
}
|
|
695
|
+
function warnMismatchedTombstoneId(context, cls, values, tombstone) {
|
|
696
|
+
const logger = getLogger([
|
|
697
|
+
"fedify",
|
|
698
|
+
"federation",
|
|
699
|
+
"object"
|
|
700
|
+
]);
|
|
701
|
+
if (tombstone.id == null) {
|
|
702
|
+
logger.warn("Object dispatcher for {class} returned a tombstone without an id property. Set the property with Context.getObjectUri().", {
|
|
703
|
+
class: cls.name,
|
|
704
|
+
values
|
|
705
|
+
});
|
|
706
|
+
return;
|
|
707
|
+
}
|
|
708
|
+
if (tombstone.id.protocol === "ap:" || tombstone.id.protocol === "ap+ef61:") return;
|
|
709
|
+
const expected = context.getObjectUri(cls, values);
|
|
710
|
+
if (tombstone.id.href !== expected.href) logger.warn("Object dispatcher for {class} returned a tombstone with an id property {tombstoneId} that does not match the object URI {objectUri}. Set the property with Context.getObjectUri().", {
|
|
711
|
+
class: cls.name,
|
|
712
|
+
values,
|
|
713
|
+
tombstoneId: tombstone.id.href,
|
|
714
|
+
objectUri: expected.href
|
|
715
|
+
});
|
|
716
|
+
}
|
|
693
717
|
/**
|
|
694
718
|
* Warns about an FEP-ef61 portable actor identified by a compatible identifier
|
|
695
719
|
* that is malformed, or is not on the actor's first gateway, where FEP-ef61
|
package/dist/compat/mod.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import {
|
|
2
|
+
import { Zt as ActivityTransformer, n as Context } from "../context-Cqx9M_zO.cjs";
|
|
3
3
|
import { Activity } from "@fedify/vocab";
|
|
4
4
|
|
|
5
5
|
//#region src/compat/transformers.d.ts
|
package/dist/compat/mod.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import {
|
|
2
|
+
import { Zt as ActivityTransformer, n as Context } from "../context-B4F4kGJq.js";
|
|
3
3
|
import { Activity } from "@fedify/vocab";
|
|
4
4
|
|
|
5
5
|
//#region src/compat/transformers.d.ts
|
|
@@ -5,7 +5,7 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
6
6
|
import { t as assertInstanceOf } from "../assert_instance_of-mrXWWNY-.mjs";
|
|
7
7
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
8
|
-
import { E as autoIdAssigner, T as actorDehydrator, n as FederationImpl } from "../middleware-
|
|
8
|
+
import { E as autoIdAssigner, T as actorDehydrator, n as FederationImpl } from "../middleware-B-rZ7oE-.mjs";
|
|
9
9
|
import { Follow, Person } from "@fedify/vocab";
|
|
10
10
|
import { test } from "@fedify/fixture";
|
|
11
11
|
//#region src/compat/transformers.test.ts
|
|
@@ -3,8 +3,8 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { s as isPortableId, t as getCanonicalPortableId } from "./portable-key-id-Bva5iT3W.mjs";
|
|
5
5
|
import { n as preloadedOnlyDocumentLoader } from "./public-audience--klBIOk1.mjs";
|
|
6
|
-
import { c as getNormalizationContextLoader } from "./ld-
|
|
7
|
-
import { a as verifyMapLocalProof, c as verifyPortableObjectProofPolicy } from "./proof-
|
|
6
|
+
import { c as getNormalizationContextLoader } from "./ld-BTMJHEGV.mjs";
|
|
7
|
+
import { a as verifyMapLocalProof, c as verifyPortableObjectProofPolicy } from "./proof-DDw0i9b1.mjs";
|
|
8
8
|
import { fromCompatibleEf61Id, parseIri } from "@fedify/vocab-runtime";
|
|
9
9
|
import jsonld from "@fedify/vocab-runtime/jsonld";
|
|
10
10
|
//#region src/sig/compound-proof.ts
|
|
@@ -182,14 +182,18 @@ type ActorAliasMapper<TContextData> = (context: RequestContext<TContextData>, re
|
|
|
182
182
|
username: string;
|
|
183
183
|
} | null>;
|
|
184
184
|
/**
|
|
185
|
-
* A callback that dispatches an object.
|
|
185
|
+
* A callback that dispatches an object or a {@link Tombstone}.
|
|
186
|
+
*
|
|
187
|
+
* Return a {@link Tombstone} if the object has been deleted; Fedify then
|
|
188
|
+
* responds with `410 Gone` and the serialized tombstone. Return `null` if
|
|
189
|
+
* the object is not found.
|
|
186
190
|
*
|
|
187
191
|
* @template TContextData The context data to pass to the {@link Context}.
|
|
188
192
|
* @template TObject The type of object to dispatch.
|
|
189
193
|
* @template TParam The parameter names of the requested URL.
|
|
190
194
|
* @since 0.7.0
|
|
191
195
|
*/
|
|
192
|
-
type ObjectDispatcher<TContextData, TObject extends Object$1, TParam extends string> = (context: RequestContext<TContextData>, values: Record<TParam, string>) => TObject | null | Promise<TObject | null>;
|
|
196
|
+
type ObjectDispatcher<TContextData, TObject extends Object$1, TParam extends string> = (context: RequestContext<TContextData>, values: Record<TParam, string>) => TObject | Tombstone | null | Promise<TObject | Tombstone | null>;
|
|
193
197
|
/**
|
|
194
198
|
* A callback that dispatches a collection.
|
|
195
199
|
*
|
|
@@ -1540,7 +1544,9 @@ interface Federatable<TContextData> extends TaskRegistry<TContextData> {
|
|
|
1540
1544
|
* based on URI Template
|
|
1541
1545
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)). The path
|
|
1542
1546
|
* must have one or more variables.
|
|
1543
|
-
* @param dispatcher An object dispatcher callback to register.
|
|
1547
|
+
* @param dispatcher An object dispatcher callback to register. It may
|
|
1548
|
+
* return an object, a `Tombstone` if the object has been
|
|
1549
|
+
* deleted, or `null` if the object is not found.
|
|
1544
1550
|
*/
|
|
1545
1551
|
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
1546
1552
|
/**
|
|
@@ -1554,7 +1560,9 @@ interface Federatable<TContextData> extends TaskRegistry<TContextData> {
|
|
|
1554
1560
|
* based on URI Template
|
|
1555
1561
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)). The path
|
|
1556
1562
|
* must have one or more variables.
|
|
1557
|
-
* @param dispatcher An object dispatcher callback to register.
|
|
1563
|
+
* @param dispatcher An object dispatcher callback to register. It may
|
|
1564
|
+
* return an object, a `Tombstone` if the object has been
|
|
1565
|
+
* deleted, or `null` if the object is not found.
|
|
1558
1566
|
*/
|
|
1559
1567
|
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
1560
1568
|
/**
|
|
@@ -1568,7 +1576,9 @@ interface Federatable<TContextData> extends TaskRegistry<TContextData> {
|
|
|
1568
1576
|
* based on URI Template
|
|
1569
1577
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)). The path
|
|
1570
1578
|
* must have one or more variables.
|
|
1571
|
-
* @param dispatcher An object dispatcher callback to register.
|
|
1579
|
+
* @param dispatcher An object dispatcher callback to register. It may
|
|
1580
|
+
* return an object, a `Tombstone` if the object has been
|
|
1581
|
+
* deleted, or `null` if the object is not found.
|
|
1572
1582
|
*/
|
|
1573
1583
|
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
1574
1584
|
/**
|
|
@@ -1582,7 +1592,9 @@ interface Federatable<TContextData> extends TaskRegistry<TContextData> {
|
|
|
1582
1592
|
* based on URI Template
|
|
1583
1593
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)). The path
|
|
1584
1594
|
* must have one or more variables.
|
|
1585
|
-
* @param dispatcher An object dispatcher callback to register.
|
|
1595
|
+
* @param dispatcher An object dispatcher callback to register. It may
|
|
1596
|
+
* return an object, a `Tombstone` if the object has been
|
|
1597
|
+
* deleted, or `null` if the object is not found.
|
|
1586
1598
|
*/
|
|
1587
1599
|
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
1588
1600
|
/**
|
|
@@ -1596,7 +1608,9 @@ interface Federatable<TContextData> extends TaskRegistry<TContextData> {
|
|
|
1596
1608
|
* based on URI Template
|
|
1597
1609
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)). The path
|
|
1598
1610
|
* must have one or more variables.
|
|
1599
|
-
* @param dispatcher An object dispatcher callback to register.
|
|
1611
|
+
* @param dispatcher An object dispatcher callback to register. It may
|
|
1612
|
+
* return an object, a `Tombstone` if the object has been
|
|
1613
|
+
* deleted, or `null` if the object is not found.
|
|
1600
1614
|
*/
|
|
1601
1615
|
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
1602
1616
|
/**
|
|
@@ -1610,7 +1624,9 @@ interface Federatable<TContextData> extends TaskRegistry<TContextData> {
|
|
|
1610
1624
|
* based on URI Template
|
|
1611
1625
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)). The path
|
|
1612
1626
|
* must have one or more variables.
|
|
1613
|
-
* @param dispatcher An object dispatcher callback to register.
|
|
1627
|
+
* @param dispatcher An object dispatcher callback to register. It may
|
|
1628
|
+
* return an object, a `Tombstone` if the object has been
|
|
1629
|
+
* deleted, or `null` if the object is not found.
|
|
1614
1630
|
*/
|
|
1615
1631
|
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
1616
1632
|
/**
|
|
@@ -3391,6 +3407,23 @@ interface GetActorOptions {
|
|
|
3391
3407
|
readonly tombstone?: "suppress" | "passthrough";
|
|
3392
3408
|
}
|
|
3393
3409
|
/**
|
|
3410
|
+
* Options for {@link RequestContext.getObject}.
|
|
3411
|
+
* @since 2.4.0
|
|
3412
|
+
*/
|
|
3413
|
+
interface GetObjectOptions {
|
|
3414
|
+
/**
|
|
3415
|
+
* Controls how tombstoned objects are returned.
|
|
3416
|
+
*
|
|
3417
|
+
* By default, or if set to `"suppress"`, a {@link Tombstone} is returned as
|
|
3418
|
+
* `null`, unless it is an instance of the requested class, e.g., when
|
|
3419
|
+
* the requested class is `Object` or `Tombstone` itself. In that case,
|
|
3420
|
+
* the tombstone is returned as is, as it is an object of the requested
|
|
3421
|
+
* class. Set this to `"passthrough"` to always receive a {@link Tombstone}
|
|
3422
|
+
* result instead of `null`.
|
|
3423
|
+
*/
|
|
3424
|
+
readonly tombstone?: "suppress" | "passthrough";
|
|
3425
|
+
}
|
|
3426
|
+
/**
|
|
3394
3427
|
* A context for a request.
|
|
3395
3428
|
*/
|
|
3396
3429
|
interface RequestContext<TContextData> extends Context<TContextData> {
|
|
@@ -3555,13 +3588,62 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3555
3588
|
* @param cls The class to instantiate.
|
|
3556
3589
|
* @param values The values to pass to the object dispatcher.
|
|
3557
3590
|
* @returns The object of the given class with the given values, or `null`
|
|
3558
|
-
* if the object is not found.
|
|
3591
|
+
* if the object is not found. Tombstoned objects are suppressed
|
|
3592
|
+
* unless the tombstone is an instance of `cls`.
|
|
3559
3593
|
* @throws {Error} If no object dispatcher is available for the class.
|
|
3560
3594
|
* @throws {TypeError} If values are invalid.
|
|
3561
3595
|
* @since 0.7.0
|
|
3562
3596
|
*/
|
|
3563
3597
|
getObject<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>): Promise<TObject | null>;
|
|
3564
3598
|
/**
|
|
3599
|
+
* Gets an object of the given class, or a {@link Tombstone}, with the given
|
|
3600
|
+
* values.
|
|
3601
|
+
* @param cls The class to instantiate.
|
|
3602
|
+
* @param values The values to pass to the object dispatcher.
|
|
3603
|
+
* @param options Options for getting the object. Set `options.tombstone`
|
|
3604
|
+
* to `"passthrough"` to receive tombstoned objects instead
|
|
3605
|
+
* of `null`.
|
|
3606
|
+
* @returns The object of the given class with the given values,
|
|
3607
|
+
* a tombstone, or `null` if the object is not found.
|
|
3608
|
+
* @throws {Error} If no object dispatcher is available for the class.
|
|
3609
|
+
* @throws {TypeError} If values are invalid.
|
|
3610
|
+
* @since 2.4.0
|
|
3611
|
+
*/
|
|
3612
|
+
getObject<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>, options: GetObjectOptions & {
|
|
3613
|
+
readonly tombstone: "passthrough";
|
|
3614
|
+
}): Promise<TObject | Tombstone | null>;
|
|
3615
|
+
/**
|
|
3616
|
+
* Gets an object of the given class with the given values.
|
|
3617
|
+
* @param cls The class to instantiate.
|
|
3618
|
+
* @param values The values to pass to the object dispatcher.
|
|
3619
|
+
* @param options Options for getting the object.
|
|
3620
|
+
* @returns The object of the given class with the given values, or `null`
|
|
3621
|
+
* if the object is not found. Tombstoned objects are suppressed
|
|
3622
|
+
* unless `options.tombstone` is `"passthrough"` or the tombstone
|
|
3623
|
+
* is an instance of `cls`.
|
|
3624
|
+
* @throws {Error} If no object dispatcher is available for the class.
|
|
3625
|
+
* @throws {TypeError} If values are invalid.
|
|
3626
|
+
* @since 2.4.0
|
|
3627
|
+
*/
|
|
3628
|
+
getObject<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>, options: GetObjectOptions & {
|
|
3629
|
+
readonly tombstone?: "suppress" | undefined;
|
|
3630
|
+
}): Promise<TObject | null>;
|
|
3631
|
+
/**
|
|
3632
|
+
* Gets an object of the given class, or a {@link Tombstone}, with the given
|
|
3633
|
+
* values.
|
|
3634
|
+
* @param cls The class to instantiate.
|
|
3635
|
+
* @param values The values to pass to the object dispatcher.
|
|
3636
|
+
* @param options Options for getting the object.
|
|
3637
|
+
* @returns The object of the given class with the given values,
|
|
3638
|
+
* a tombstone, or `null` if the object is not found. This broad
|
|
3639
|
+
* overload is used when the caller passes an options value whose
|
|
3640
|
+
* `tombstone` mode is not known statically.
|
|
3641
|
+
* @throws {Error} If no object dispatcher is available for the class.
|
|
3642
|
+
* @throws {TypeError} If values are invalid.
|
|
3643
|
+
* @since 2.4.0
|
|
3644
|
+
*/
|
|
3645
|
+
getObject<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>, options: GetObjectOptions): Promise<TObject | Tombstone | null>;
|
|
3646
|
+
/**
|
|
3565
3647
|
* Gets the public key of the sender, if any exists and it is verified.
|
|
3566
3648
|
* Otherwise, `null` is returned.
|
|
3567
3649
|
*
|
|
@@ -3968,4 +4050,4 @@ interface ActorKeyPair extends CryptoKeyPair {
|
|
|
3968
4050
|
readonly multikey: Multikey;
|
|
3969
4051
|
}
|
|
3970
4052
|
//#endregion
|
|
3971
|
-
export {
|
|
4053
|
+
export { InProcessMessageQueue as $, MediaUploaderSetters as A, HashlinkMediaRequest as At, createFederationBuilder as B, OutboxPermanentFailureHandler as Bt, FederationFetchOptions as C, CollectionCounter as Ct, IdempotencyStrategy as D, CustomCollectionCursor as Dt, IdempotencyKeyCallback as E, CustomCollectionCounter as Et, FederationKvPrefixes as F, ObjectAuthorizePredicate as Ft, TaskRegistry as G, WebFingerLinksDispatcher as Gt, TaskDefinitionOptions as H, SharedInboxKeyDispatcher as Ht, FederationOrigin as I, ObjectDispatcher as It, RetryPolicy as J, PageItems as Jt, CreateExponentialBackoffPolicyOptions as K, SendActivityError as Kt, FederationQueueOptions as L, OutboxErrorHandler as Lt, OutboxListenerSetters as M, InboxListener as Mt, PortableInboxForwardingOptions as N, MediaUploaderCallback as Nt, InboxChallengePolicy as O, CustomCollectionDispatcher as Ot, Rfc6570Expression as P, NodeInfoDispatcher as Pt, respondWithObjectIfAcceptable as Q, createFederation as R, OutboxListener as Rt, FederationBuilder as S, AuthorizePredicate as St, FederationStartQueueOptions as T, CollectionDispatcher as Tt, TaskEnqueueOptions as U, UnverifiedActivityHandler as Ut, TaskDefinition as V, PortableActorIdMapper as Vt, TaskHandler as W, UnverifiedActivityReason as Wt, RespondWithObjectOptions as X, digest as Xt, createExponentialBackoffPolicy as Y, buildCollectionSynchronizationHeader as Yt, respondWithObject as Z, ActivityTransformer as Zt, ConstructorWithTypeId as _, parseCircuitBreakerKvState as _t, GetObjectOptions as a, ParallelMessageQueue as at, Federation as b, ActorHandleMapper as bt, OutboxContext as c, CircuitBreakerBeforeSendDecision as ct, RequestContext as d, CircuitBreakerKvState as dt, InProcessMessageQueueOptions as et, RouteActivityOptions as f, CircuitBreakerOptions as ft, CollectionCallbackSetters as g, normalizeCircuitBreakerOptions as gt, ActorCallbackSetters as h, NormalizedCircuitBreakerOptions as ht, GetActorOptions as i, MessageQueueListenOptions as it, ObjectCallbackSetters as j, InboxErrorHandler as jt, InboxListenerSetters as k, HashlinkMediaDispatcher as kt, ParseUriResult as l, CircuitBreakerCreateOptions as lt, SendActivityOptionsForCollection as m, CircuitBreakerStateChange as mt, Context as n, MessageQueueDepth as nt, GetSignedKeyOptions as o, CircuitBreaker as ot, SendActivityOptions as p, CircuitBreakerState as pt, RetryContext as q, SenderKeyPair as qt, ForwardActivityOptions as r, MessageQueueEnqueueOptions as rt, InboxContext as s, CircuitBreakerActivityDrop as st, ActorKeyPair as t, MessageQueue as tt, PortableRequest as u, CircuitBreakerFailurePolicy as ut, CustomCollectionCallbackSetters as v, ActorAliasMapper as vt, FederationOptions as w, CollectionCursor as wt, FederationBenchmarkOptions as x, ActorKeyPairsDispatcher as xt, Federatable as y, ActorDispatcher as yt, Message as z, OutboxListenerErrorHandler as zt };
|
|
@@ -180,14 +180,18 @@ type ActorAliasMapper<TContextData> = (context: RequestContext<TContextData>, re
|
|
|
180
180
|
username: string;
|
|
181
181
|
} | null>;
|
|
182
182
|
/**
|
|
183
|
-
* A callback that dispatches an object.
|
|
183
|
+
* A callback that dispatches an object or a {@link Tombstone}.
|
|
184
|
+
*
|
|
185
|
+
* Return a {@link Tombstone} if the object has been deleted; Fedify then
|
|
186
|
+
* responds with `410 Gone` and the serialized tombstone. Return `null` if
|
|
187
|
+
* the object is not found.
|
|
184
188
|
*
|
|
185
189
|
* @template TContextData The context data to pass to the {@link Context}.
|
|
186
190
|
* @template TObject The type of object to dispatch.
|
|
187
191
|
* @template TParam The parameter names of the requested URL.
|
|
188
192
|
* @since 0.7.0
|
|
189
193
|
*/
|
|
190
|
-
type ObjectDispatcher<TContextData, TObject extends Object$1, TParam extends string> = (context: RequestContext<TContextData>, values: Record<TParam, string>) => TObject | null | Promise<TObject | null>;
|
|
194
|
+
type ObjectDispatcher<TContextData, TObject extends Object$1, TParam extends string> = (context: RequestContext<TContextData>, values: Record<TParam, string>) => TObject | Tombstone | null | Promise<TObject | Tombstone | null>;
|
|
191
195
|
/**
|
|
192
196
|
* A callback that dispatches a collection.
|
|
193
197
|
*
|
|
@@ -1538,7 +1542,9 @@ interface Federatable<TContextData> extends TaskRegistry<TContextData> {
|
|
|
1538
1542
|
* based on URI Template
|
|
1539
1543
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)). The path
|
|
1540
1544
|
* must have one or more variables.
|
|
1541
|
-
* @param dispatcher An object dispatcher callback to register.
|
|
1545
|
+
* @param dispatcher An object dispatcher callback to register. It may
|
|
1546
|
+
* return an object, a `Tombstone` if the object has been
|
|
1547
|
+
* deleted, or `null` if the object is not found.
|
|
1542
1548
|
*/
|
|
1543
1549
|
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
1544
1550
|
/**
|
|
@@ -1552,7 +1558,9 @@ interface Federatable<TContextData> extends TaskRegistry<TContextData> {
|
|
|
1552
1558
|
* based on URI Template
|
|
1553
1559
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)). The path
|
|
1554
1560
|
* must have one or more variables.
|
|
1555
|
-
* @param dispatcher An object dispatcher callback to register.
|
|
1561
|
+
* @param dispatcher An object dispatcher callback to register. It may
|
|
1562
|
+
* return an object, a `Tombstone` if the object has been
|
|
1563
|
+
* deleted, or `null` if the object is not found.
|
|
1556
1564
|
*/
|
|
1557
1565
|
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
1558
1566
|
/**
|
|
@@ -1566,7 +1574,9 @@ interface Federatable<TContextData> extends TaskRegistry<TContextData> {
|
|
|
1566
1574
|
* based on URI Template
|
|
1567
1575
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)). The path
|
|
1568
1576
|
* must have one or more variables.
|
|
1569
|
-
* @param dispatcher An object dispatcher callback to register.
|
|
1577
|
+
* @param dispatcher An object dispatcher callback to register. It may
|
|
1578
|
+
* return an object, a `Tombstone` if the object has been
|
|
1579
|
+
* deleted, or `null` if the object is not found.
|
|
1570
1580
|
*/
|
|
1571
1581
|
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
1572
1582
|
/**
|
|
@@ -1580,7 +1590,9 @@ interface Federatable<TContextData> extends TaskRegistry<TContextData> {
|
|
|
1580
1590
|
* based on URI Template
|
|
1581
1591
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)). The path
|
|
1582
1592
|
* must have one or more variables.
|
|
1583
|
-
* @param dispatcher An object dispatcher callback to register.
|
|
1593
|
+
* @param dispatcher An object dispatcher callback to register. It may
|
|
1594
|
+
* return an object, a `Tombstone` if the object has been
|
|
1595
|
+
* deleted, or `null` if the object is not found.
|
|
1584
1596
|
*/
|
|
1585
1597
|
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
1586
1598
|
/**
|
|
@@ -1594,7 +1606,9 @@ interface Federatable<TContextData> extends TaskRegistry<TContextData> {
|
|
|
1594
1606
|
* based on URI Template
|
|
1595
1607
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)). The path
|
|
1596
1608
|
* must have one or more variables.
|
|
1597
|
-
* @param dispatcher An object dispatcher callback to register.
|
|
1609
|
+
* @param dispatcher An object dispatcher callback to register. It may
|
|
1610
|
+
* return an object, a `Tombstone` if the object has been
|
|
1611
|
+
* deleted, or `null` if the object is not found.
|
|
1598
1612
|
*/
|
|
1599
1613
|
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
1600
1614
|
/**
|
|
@@ -1608,7 +1622,9 @@ interface Federatable<TContextData> extends TaskRegistry<TContextData> {
|
|
|
1608
1622
|
* based on URI Template
|
|
1609
1623
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)). The path
|
|
1610
1624
|
* must have one or more variables.
|
|
1611
|
-
* @param dispatcher An object dispatcher callback to register.
|
|
1625
|
+
* @param dispatcher An object dispatcher callback to register. It may
|
|
1626
|
+
* return an object, a `Tombstone` if the object has been
|
|
1627
|
+
* deleted, or `null` if the object is not found.
|
|
1612
1628
|
*/
|
|
1613
1629
|
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
1614
1630
|
/**
|
|
@@ -3389,6 +3405,23 @@ interface GetActorOptions {
|
|
|
3389
3405
|
readonly tombstone?: "suppress" | "passthrough";
|
|
3390
3406
|
}
|
|
3391
3407
|
/**
|
|
3408
|
+
* Options for {@link RequestContext.getObject}.
|
|
3409
|
+
* @since 2.4.0
|
|
3410
|
+
*/
|
|
3411
|
+
interface GetObjectOptions {
|
|
3412
|
+
/**
|
|
3413
|
+
* Controls how tombstoned objects are returned.
|
|
3414
|
+
*
|
|
3415
|
+
* By default, or if set to `"suppress"`, a {@link Tombstone} is returned as
|
|
3416
|
+
* `null`, unless it is an instance of the requested class, e.g., when
|
|
3417
|
+
* the requested class is `Object` or `Tombstone` itself. In that case,
|
|
3418
|
+
* the tombstone is returned as is, as it is an object of the requested
|
|
3419
|
+
* class. Set this to `"passthrough"` to always receive a {@link Tombstone}
|
|
3420
|
+
* result instead of `null`.
|
|
3421
|
+
*/
|
|
3422
|
+
readonly tombstone?: "suppress" | "passthrough";
|
|
3423
|
+
}
|
|
3424
|
+
/**
|
|
3392
3425
|
* A context for a request.
|
|
3393
3426
|
*/
|
|
3394
3427
|
interface RequestContext<TContextData> extends Context<TContextData> {
|
|
@@ -3553,13 +3586,62 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3553
3586
|
* @param cls The class to instantiate.
|
|
3554
3587
|
* @param values The values to pass to the object dispatcher.
|
|
3555
3588
|
* @returns The object of the given class with the given values, or `null`
|
|
3556
|
-
* if the object is not found.
|
|
3589
|
+
* if the object is not found. Tombstoned objects are suppressed
|
|
3590
|
+
* unless the tombstone is an instance of `cls`.
|
|
3557
3591
|
* @throws {Error} If no object dispatcher is available for the class.
|
|
3558
3592
|
* @throws {TypeError} If values are invalid.
|
|
3559
3593
|
* @since 0.7.0
|
|
3560
3594
|
*/
|
|
3561
3595
|
getObject<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>): Promise<TObject | null>;
|
|
3562
3596
|
/**
|
|
3597
|
+
* Gets an object of the given class, or a {@link Tombstone}, with the given
|
|
3598
|
+
* values.
|
|
3599
|
+
* @param cls The class to instantiate.
|
|
3600
|
+
* @param values The values to pass to the object dispatcher.
|
|
3601
|
+
* @param options Options for getting the object. Set `options.tombstone`
|
|
3602
|
+
* to `"passthrough"` to receive tombstoned objects instead
|
|
3603
|
+
* of `null`.
|
|
3604
|
+
* @returns The object of the given class with the given values,
|
|
3605
|
+
* a tombstone, or `null` if the object is not found.
|
|
3606
|
+
* @throws {Error} If no object dispatcher is available for the class.
|
|
3607
|
+
* @throws {TypeError} If values are invalid.
|
|
3608
|
+
* @since 2.4.0
|
|
3609
|
+
*/
|
|
3610
|
+
getObject<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>, options: GetObjectOptions & {
|
|
3611
|
+
readonly tombstone: "passthrough";
|
|
3612
|
+
}): Promise<TObject | Tombstone | null>;
|
|
3613
|
+
/**
|
|
3614
|
+
* Gets an object of the given class with the given values.
|
|
3615
|
+
* @param cls The class to instantiate.
|
|
3616
|
+
* @param values The values to pass to the object dispatcher.
|
|
3617
|
+
* @param options Options for getting the object.
|
|
3618
|
+
* @returns The object of the given class with the given values, or `null`
|
|
3619
|
+
* if the object is not found. Tombstoned objects are suppressed
|
|
3620
|
+
* unless `options.tombstone` is `"passthrough"` or the tombstone
|
|
3621
|
+
* is an instance of `cls`.
|
|
3622
|
+
* @throws {Error} If no object dispatcher is available for the class.
|
|
3623
|
+
* @throws {TypeError} If values are invalid.
|
|
3624
|
+
* @since 2.4.0
|
|
3625
|
+
*/
|
|
3626
|
+
getObject<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>, options: GetObjectOptions & {
|
|
3627
|
+
readonly tombstone?: "suppress" | undefined;
|
|
3628
|
+
}): Promise<TObject | null>;
|
|
3629
|
+
/**
|
|
3630
|
+
* Gets an object of the given class, or a {@link Tombstone}, with the given
|
|
3631
|
+
* values.
|
|
3632
|
+
* @param cls The class to instantiate.
|
|
3633
|
+
* @param values The values to pass to the object dispatcher.
|
|
3634
|
+
* @param options Options for getting the object.
|
|
3635
|
+
* @returns The object of the given class with the given values,
|
|
3636
|
+
* a tombstone, or `null` if the object is not found. This broad
|
|
3637
|
+
* overload is used when the caller passes an options value whose
|
|
3638
|
+
* `tombstone` mode is not known statically.
|
|
3639
|
+
* @throws {Error} If no object dispatcher is available for the class.
|
|
3640
|
+
* @throws {TypeError} If values are invalid.
|
|
3641
|
+
* @since 2.4.0
|
|
3642
|
+
*/
|
|
3643
|
+
getObject<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>, options: GetObjectOptions): Promise<TObject | Tombstone | null>;
|
|
3644
|
+
/**
|
|
3563
3645
|
* Gets the public key of the sender, if any exists and it is verified.
|
|
3564
3646
|
* Otherwise, `null` is returned.
|
|
3565
3647
|
*
|
|
@@ -3966,4 +4048,4 @@ interface ActorKeyPair extends CryptoKeyPair {
|
|
|
3966
4048
|
readonly multikey: Multikey;
|
|
3967
4049
|
}
|
|
3968
4050
|
//#endregion
|
|
3969
|
-
export {
|
|
4051
|
+
export { InProcessMessageQueue as $, MediaUploaderSetters as A, HashlinkMediaRequest as At, createFederationBuilder as B, OutboxPermanentFailureHandler as Bt, FederationFetchOptions as C, CollectionCounter as Ct, IdempotencyStrategy as D, CustomCollectionCursor as Dt, IdempotencyKeyCallback as E, CustomCollectionCounter as Et, FederationKvPrefixes as F, ObjectAuthorizePredicate as Ft, TaskRegistry as G, WebFingerLinksDispatcher as Gt, TaskDefinitionOptions as H, SharedInboxKeyDispatcher as Ht, FederationOrigin as I, ObjectDispatcher as It, RetryPolicy as J, PageItems as Jt, CreateExponentialBackoffPolicyOptions as K, SendActivityError as Kt, FederationQueueOptions as L, OutboxErrorHandler as Lt, OutboxListenerSetters as M, InboxListener as Mt, PortableInboxForwardingOptions as N, MediaUploaderCallback as Nt, InboxChallengePolicy as O, CustomCollectionDispatcher as Ot, Rfc6570Expression as P, NodeInfoDispatcher as Pt, respondWithObjectIfAcceptable as Q, createFederation as R, OutboxListener as Rt, FederationBuilder as S, AuthorizePredicate as St, FederationStartQueueOptions as T, CollectionDispatcher as Tt, TaskEnqueueOptions as U, UnverifiedActivityHandler as Ut, TaskDefinition as V, PortableActorIdMapper as Vt, TaskHandler as W, UnverifiedActivityReason as Wt, RespondWithObjectOptions as X, digest as Xt, createExponentialBackoffPolicy as Y, buildCollectionSynchronizationHeader as Yt, respondWithObject as Z, ActivityTransformer as Zt, ConstructorWithTypeId as _, parseCircuitBreakerKvState as _t, GetObjectOptions as a, ParallelMessageQueue as at, Federation as b, ActorHandleMapper as bt, OutboxContext as c, CircuitBreakerBeforeSendDecision as ct, RequestContext as d, CircuitBreakerKvState as dt, InProcessMessageQueueOptions as et, RouteActivityOptions as f, CircuitBreakerOptions as ft, CollectionCallbackSetters as g, normalizeCircuitBreakerOptions as gt, ActorCallbackSetters as h, NormalizedCircuitBreakerOptions as ht, GetActorOptions as i, MessageQueueListenOptions as it, ObjectCallbackSetters as j, InboxErrorHandler as jt, InboxListenerSetters as k, HashlinkMediaDispatcher as kt, ParseUriResult as l, CircuitBreakerCreateOptions as lt, SendActivityOptionsForCollection as m, CircuitBreakerStateChange as mt, Context as n, MessageQueueDepth as nt, GetSignedKeyOptions as o, CircuitBreaker as ot, SendActivityOptions as p, CircuitBreakerState as pt, RetryContext as q, SenderKeyPair as qt, ForwardActivityOptions as r, MessageQueueEnqueueOptions as rt, InboxContext as s, CircuitBreakerActivityDrop as st, ActorKeyPair as t, MessageQueue as tt, PortableRequest as u, CircuitBreakerFailurePolicy as ut, CustomCollectionCallbackSetters as v, ActorAliasMapper as vt, FederationOptions as w, CollectionCursor as wt, FederationBenchmarkOptions as x, ActorKeyPairsDispatcher as xt, Federatable as y, ActorDispatcher as yt, Message as z, OutboxListenerErrorHandler as zt };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { s as validateCryptoKey } from "./key-
|
|
5
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { s as validateCryptoKey } from "./key-B8u1vdvF.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-CHEYA5fH.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { curry } from "es-toolkit";
|
|
8
8
|
import { UrlError, createActivityPubRequest, getRemoteDocument, logRequest, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
@@ -6,7 +6,7 @@ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
|
6
6
|
import { t as assertExists } from "../assert_exists-cffSpJ7X.mjs";
|
|
7
7
|
import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
8
8
|
import "../std__assert-DvMDRPes.mjs";
|
|
9
|
-
import { r as createFederationBuilder } from "../builder-
|
|
9
|
+
import { r as createFederationBuilder } from "../builder-BRlYEsrV.mjs";
|
|
10
10
|
import { DisallowedOperatorError, DisallowedVarSpecModifierError, DuplicateRouteVariableError, RouteTemplateOptionsNotMatchedError, RouterError } from "@fedify/uri-template";
|
|
11
11
|
import { Activity, Note, Person } from "@fedify/vocab";
|
|
12
12
|
import { test } from "@fedify/fixture";
|
|
@@ -6,11 +6,11 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
8
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
9
|
-
import { t as exportJwk } from "../key-
|
|
9
|
+
import { t as exportJwk } from "../key-B8u1vdvF.mjs";
|
|
10
10
|
import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-4IJqPYos.mjs";
|
|
11
|
-
import { i as signObject, u as verifyProof } from "../proof-
|
|
11
|
+
import { i as signObject, u as verifyProof } from "../proof-DDw0i9b1.mjs";
|
|
12
12
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
13
|
-
import { n as FederationImpl } from "../middleware-
|
|
13
|
+
import { n as FederationImpl } from "../middleware-B-rZ7oE-.mjs";
|
|
14
14
|
import { Create, DataIntegrityProof, Note } from "@fedify/vocab";
|
|
15
15
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
16
16
|
import { exportDidKey, parseIri } from "@fedify/vocab-runtime";
|
|
@@ -5,10 +5,10 @@ import { r as createRequestContext, t as createInboxContext } from "../context-C
|
|
|
5
5
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
|
-
import { a as compactJsonLd, m as verifyCompactJsonLd, p as signJsonLd } from "../ld-
|
|
9
|
-
import { l as signRequest } from "../http-
|
|
8
|
+
import { a as compactJsonLd, m as verifyCompactJsonLd, p as signJsonLd } from "../ld-BTMJHEGV.mjs";
|
|
9
|
+
import { l as signRequest } from "../http-CHEYA5fH.mjs";
|
|
10
10
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, n as ed25519PrivateKey, r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
|
|
11
|
-
import { f as handleInbox, o as createFederation } from "../middleware-
|
|
11
|
+
import { f as handleInbox, o as createFederation } from "../middleware-B-rZ7oE-.mjs";
|
|
12
12
|
import { t as ActivityListenerSet } from "../activity-listener-C-BSbKI7.mjs";
|
|
13
13
|
import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
|
|
14
14
|
import { Create } from "@fedify/vocab";
|