@fedify/fedify 1.7.0-pr.251.885 → 1.7.0
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/{actor-tT_B0pDn.d.ts → actor-CPpvuBKU.d.ts} +2 -2
- package/dist/{actor-C7TXxFiY.js → actor-DTfguoCb.js} +179 -179
- package/dist/{actor-BKNmJt4P.js → actor-DeIuzQxq.js} +3 -3
- package/dist/{authdocloader-GdjCp5rF.js → authdocloader-BEp8lEDb.js} +3 -3
- package/dist/{authdocloader-iCuUfO37.js → authdocloader-D70SfymB.js} +3 -3
- package/dist/{builder-DAUy0dMO.js → builder-J9iFzZzN.js} +3 -3
- package/dist/{client-Cd552pKL.d.ts → client-DvtwXO7t.d.ts} +1 -1
- package/dist/{client-jHH47Ctq.js → client-Zr00-i3d.js} +2 -2
- package/dist/compat/mod.d.ts +11 -11
- package/dist/compat/transformers.test.js +21 -21
- package/dist/{context-BH4zXGsB.js → context-Bs34sOF6.js} +2 -2
- package/dist/{context-DdICJaUT.d.ts → context-DPggmpB4.d.ts} +28 -9
- package/dist/{docloader-In2YbZmo.js → docloader-Cg1VPpKf.js} +1 -1
- package/dist/{docloader-Ckfc6Xpk.js → docloader-CoPL1xCC.js} +1 -1
- package/dist/{docloader-DlUDOVSe.d.ts → docloader-Q42SMRIB.d.ts} +2 -2
- package/dist/{esm-Btx3E8og.js → esm-CASHO3OR.js} +18 -12
- package/dist/federation/builder.test.js +29 -7
- package/dist/federation/collection.test.js +1 -1
- package/dist/federation/handler.test.js +23 -23
- package/dist/federation/inbox.test.js +4 -4
- package/dist/federation/keycache.test.js +5 -5
- package/dist/federation/kv.test.js +2 -2
- package/dist/federation/middleware.test.js +61 -24
- package/dist/federation/mod.d.ts +10 -10
- package/dist/federation/mod.js +11 -11
- package/dist/federation/mq.test.js +1 -1
- package/dist/federation/retry.test.js +1 -1
- package/dist/federation/router.test.js +1 -1
- package/dist/federation/send.test.js +11 -11
- package/dist/{federation-lZOZyLAo.js → federation-BRIQn-GV.js} +1 -1
- package/dist/{http-BkUCISGt.d.ts → http-B8EiSgi2.d.ts} +2 -2
- package/dist/{http-QqP4PSIz.js → http-BTqtnecF.js} +4 -4
- package/dist/{http-CckhNmVP.js → http-D4ufSjCD.js} +4 -4
- package/dist/{inbox-C6ZOVAhQ.js → inbox-BLGI5mWd.js} +2 -2
- package/dist/{key-CUeKPkDl.js → key-B0tlgo53.js} +2 -2
- package/dist/{key-B6JAhPW-.js → key-CCfpdutM.js} +4 -4
- package/dist/{key-CXBL1sXa.js → key-CJGEHNGN.js} +5 -5
- package/dist/{key-D8vQi9FY.js → key-CWTlZkYV.js} +3 -3
- package/dist/{keycache-BHPCqp38.js → keycache-D4rAVXOS.js} +1 -1
- package/dist/{keys-AJMFA3li.js → keys-cySMuiGu.js} +1 -1
- package/dist/{kv-DohFOP2C.js → kv-BMY6Qf_A.js} +1 -1
- package/dist/{kv-p8sC8PTT.d.ts → kv-DRaeSXco.d.ts} +4 -4
- package/dist/{ld-BI0AXBa7.js → ld-ecZJerZ8.js} +3 -3
- package/dist/{lookup-CQEBo6l0.js → lookup-BLCwJTxi.js} +1 -1
- package/dist/{lookup-vJccIKCS.d.ts → lookup-Bf-K85bV.d.ts} +1 -1
- package/dist/{lookup-DUfUuWoE.js → lookup-CX4qjAss.js} +1 -1
- package/dist/{lookup-B9NsR_Ug.js → lookup-Cbwww1Nk.js} +3 -3
- package/dist/{middleware-CAzoGm7Q.js → middleware-CUrRKWpM.js} +16 -14
- package/dist/middleware-D6StExQX.js +17 -0
- package/dist/middleware-UQpFubxd.js +33 -0
- package/dist/{middleware-d54CFxGw.js → middleware-rvM2CNtG.js} +22 -20
- package/dist/{mod-BTHfUeLo.d.ts → mod-C2drFqH8.d.ts} +2 -2
- package/dist/{mod-DSPyncxx.d.ts → mod-CDzlVCUF.d.ts} +2 -2
- package/dist/{mod-5orySGMZ.d.ts → mod-CbjCOiVh.d.ts} +2 -2
- package/dist/{mod-BUTm-sog.d.ts → mod-sEI6_uZ2.d.ts} +3 -3
- package/dist/mod.d.ts +13 -13
- package/dist/mod.js +11 -11
- package/dist/nodeinfo/client.test.js +5 -5
- package/dist/nodeinfo/handler.test.js +22 -22
- package/dist/nodeinfo/mod.d.ts +3 -3
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +2 -2
- package/dist/nodeinfo/types.test.js +3 -3
- package/dist/{owner-BzzU7DNR.js → owner-BSmRd_IH.js} +3 -3
- package/dist/{owner-CbRc94FP.d.ts → owner-D0cOz8R5.d.ts} +3 -3
- package/dist/{proof-CEPmkeSe.js → proof-CkXiUJfu.js} +3 -3
- package/dist/{proof-BaFMM6ww.js → proof-R84z_lDC.js} +3 -3
- package/dist/runtime/authdocloader.test.js +10 -10
- package/dist/runtime/docloader.test.js +4 -4
- package/dist/runtime/key.test.js +6 -6
- package/dist/runtime/langstr.test.js +1 -1
- package/dist/runtime/mod.d.ts +5 -5
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +1 -1
- package/dist/runtime/url.test.js +1 -1
- package/dist/{semver-CbbIgUsa.js → semver-DWClQt_5.js} +2 -2
- package/dist/{send-Dg9db6Zy.js → send-DrxpWl1q.js} +2 -2
- package/dist/sig/http.test.js +15 -15
- package/dist/sig/key.test.js +7 -7
- package/dist/sig/ld.test.js +8 -8
- package/dist/sig/mod.d.ts +7 -7
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +9 -9
- package/dist/sig/proof.test.js +8 -8
- package/dist/testing/docloader.test.js +1 -1
- package/dist/testing/mod.js +1 -1
- package/dist/{testing-jcGLO9Lp.js → testing-BZ0dJ4qn.js} +1 -1
- package/dist/{types-CqoqWDkp.js → types-C7C_l-jz.js} +1 -1
- package/dist/{types-jzrlYw4A.js → types-DfKof1zg.js} +3 -3
- package/dist/vocab/actor.test.js +6 -6
- package/dist/vocab/lookup.test.js +6 -6
- package/dist/vocab/mod.d.ts +5 -5
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +3 -3
- package/dist/vocab/vocab.test.js +65 -35
- package/dist/{vocab-BVzwuPP7.js → vocab-BwnH7Mra.js} +3 -3
- package/dist/{vocab-DpvcMGV-.js → vocab-CkD4jwmV.js} +178 -178
- package/dist/{vocab-DSFLLLe6.d.ts → vocab-CzEfWQk2.d.ts} +1 -1
- package/dist/webfinger/handler.test.js +22 -22
- package/dist/webfinger/lookup.test.js +4 -4
- package/dist/webfinger/mod.d.ts +3 -3
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.d.ts +1 -1
- package/dist/x/cfworkers.test.js +1 -1
- package/dist/x/hono.d.ts +10 -10
- package/dist/x/sveltekit.d.ts +10 -10
- package/package.json +2 -2
- package/dist/middleware-CMD8k35o.js +0 -33
- package/dist/middleware-DWrvwoBq.js +0 -17
@@ -3,9 +3,9 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default } from "./docloader-
|
7
|
-
import { Application, Group, Organization, Person, Service } from "./vocab-
|
8
|
-
import { lookupWebFinger } from "./lookup-
|
6
|
+
import { deno_default } from "./docloader-Cg1VPpKf.js";
|
7
|
+
import { Application, Group, Organization, Person, Service } from "./vocab-CkD4jwmV.js";
|
8
|
+
import { lookupWebFinger } from "./lookup-CX4qjAss.js";
|
9
9
|
import { getTypeId } from "./type-D2s5lmbZ.js";
|
10
10
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
11
11
|
import { domainToASCII, domainToUnicode } from "node:url";
|
@@ -3,10 +3,10 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { createRequest, getRemoteDocument, logRequest } from "./docloader-
|
6
|
+
import { createRequest, getRemoteDocument, logRequest } from "./docloader-Cg1VPpKf.js";
|
7
7
|
import { UrlError, validatePublicUrl } from "./url-kTAI6_KP.js";
|
8
|
-
import { validateCryptoKey } from "./key-
|
9
|
-
import { doubleKnock } from "./http-
|
8
|
+
import { validateCryptoKey } from "./key-CWTlZkYV.js";
|
9
|
+
import { doubleKnock } from "./http-BTqtnecF.js";
|
10
10
|
import { getLogger } from "@logtape/logtape";
|
11
11
|
|
12
12
|
//#region runtime/authdocloader.ts
|
@@ -2,9 +2,9 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./docloader-
|
6
|
-
import { validateCryptoKey } from "./key-
|
7
|
-
import { doubleKnock } from "./http-
|
5
|
+
import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./docloader-CoPL1xCC.js";
|
6
|
+
import { validateCryptoKey } from "./key-B0tlgo53.js";
|
7
|
+
import { doubleKnock } from "./http-D4ufSjCD.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
|
10
10
|
//#region runtime/authdocloader.ts
|
@@ -3,10 +3,10 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default } from "./docloader-
|
6
|
+
import { deno_default } from "./docloader-Cg1VPpKf.js";
|
7
7
|
import { Router, RouterError } from "./router-D_aVZZUc.js";
|
8
8
|
import { getTypeId } from "./type-D2s5lmbZ.js";
|
9
|
-
import { InboxListenerSet } from "./inbox-
|
9
|
+
import { InboxListenerSet } from "./inbox-BLGI5mWd.js";
|
10
10
|
import { getLogger } from "@logtape/logtape";
|
11
11
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
12
12
|
|
@@ -34,7 +34,7 @@ var FederationBuilderImpl = class {
|
|
34
34
|
this.objectTypeIds = {};
|
35
35
|
}
|
36
36
|
async build(options) {
|
37
|
-
const { FederationImpl } = await import("./middleware-
|
37
|
+
const { FederationImpl } = await import("./middleware-UQpFubxd.js");
|
38
38
|
const f = new FederationImpl(options);
|
39
39
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
40
40
|
f.router = this.router.clone();
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { GetUserAgentOptions } from "./docloader-
|
3
|
+
import { GetUserAgentOptions } from "./docloader-Q42SMRIB.js";
|
4
4
|
|
5
5
|
//#region nodeinfo/semver.d.ts
|
6
6
|
/**
|
@@ -3,8 +3,8 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { getUserAgent } from "./docloader-
|
7
|
-
import { parseSemVer } from "./semver-
|
6
|
+
import { getUserAgent } from "./docloader-Cg1VPpKf.js";
|
7
|
+
import { parseSemVer } from "./semver-DWClQt_5.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
|
10
10
|
//#region nodeinfo/client.ts
|
package/dist/compat/mod.d.ts
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import "../kv-
|
4
|
-
import "../docloader-
|
5
|
-
import "../client-
|
6
|
-
import "../vocab-
|
7
|
-
import "../actor-
|
8
|
-
import "../http-
|
9
|
-
import "../owner-
|
10
|
-
import "../mod-
|
11
|
-
import "../lookup-
|
12
|
-
import { ActivityTransformer } from "../context-
|
3
|
+
import "../kv-DRaeSXco.js";
|
4
|
+
import "../docloader-Q42SMRIB.js";
|
5
|
+
import "../client-DvtwXO7t.js";
|
6
|
+
import "../vocab-CzEfWQk2.js";
|
7
|
+
import "../actor-CPpvuBKU.js";
|
8
|
+
import "../http-B8EiSgi2.js";
|
9
|
+
import "../owner-D0cOz8R5.js";
|
10
|
+
import "../mod-CDzlVCUF.js";
|
11
|
+
import "../lookup-Bf-K85bV.js";
|
12
|
+
import { ActivityTransformer } from "../context-DPggmpB4.js";
|
13
13
|
import "../mq-DYKDDJmp.js";
|
14
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "../mod-
|
14
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "../mod-CbjCOiVh.js";
|
15
15
|
export { ActivityTransformer, actorDehydrator, autoIdAssigner, getDefaultActivityTransformers };
|
@@ -6,34 +6,34 @@
|
|
6
6
|
import { assertEquals } from "../assert_equals-Dnj7ejjL.js";
|
7
7
|
import { assert } from "../assert-YJk-1DlZ.js";
|
8
8
|
import { assertInstanceOf } from "../assert_instance_of-DBIoG5k7.js";
|
9
|
-
import { MemoryKvStore } from "../kv-
|
10
|
-
import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-
|
11
|
-
import "../docloader-
|
9
|
+
import { MemoryKvStore } from "../kv-BMY6Qf_A.js";
|
10
|
+
import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-rvM2CNtG.js";
|
11
|
+
import "../docloader-Cg1VPpKf.js";
|
12
12
|
import "../url-kTAI6_KP.js";
|
13
|
-
import "../semver-
|
14
|
-
import "../client-
|
13
|
+
import "../semver-DWClQt_5.js";
|
14
|
+
import "../client-Zr00-i3d.js";
|
15
15
|
import "../router-D_aVZZUc.js";
|
16
|
-
import "../types-
|
16
|
+
import "../types-C7C_l-jz.js";
|
17
17
|
import "../multibase-DeCHcK8L.js";
|
18
|
-
import { Follow, Person } from "../vocab-
|
18
|
+
import { Follow, Person } from "../vocab-CkD4jwmV.js";
|
19
19
|
import "../langstr-DbWheeIS.js";
|
20
|
-
import "../lookup-
|
20
|
+
import "../lookup-CX4qjAss.js";
|
21
21
|
import "../type-D2s5lmbZ.js";
|
22
|
-
import "../actor-
|
23
|
-
import "../key-
|
24
|
-
import "../http-
|
25
|
-
import "../authdocloader-
|
26
|
-
import "../ld-
|
27
|
-
import "../owner-
|
28
|
-
import "../proof-
|
29
|
-
import "../lookup-
|
30
|
-
import "../inbox-
|
31
|
-
import "../builder-
|
22
|
+
import "../actor-DeIuzQxq.js";
|
23
|
+
import "../key-CWTlZkYV.js";
|
24
|
+
import "../http-BTqtnecF.js";
|
25
|
+
import "../authdocloader-BEp8lEDb.js";
|
26
|
+
import "../ld-ecZJerZ8.js";
|
27
|
+
import "../owner-BSmRd_IH.js";
|
28
|
+
import "../proof-CkXiUJfu.js";
|
29
|
+
import "../lookup-Cbwww1Nk.js";
|
30
|
+
import "../inbox-BLGI5mWd.js";
|
31
|
+
import "../builder-J9iFzZzN.js";
|
32
32
|
import "../collection-Dfb0TPno.js";
|
33
|
-
import "../keycache-
|
33
|
+
import "../keycache-D4rAVXOS.js";
|
34
34
|
import "../retry-BiIhZWgD.js";
|
35
|
-
import "../send-
|
36
|
-
import { test } from "../testing-
|
35
|
+
import "../send-DrxpWl1q.js";
|
36
|
+
import { test } from "../testing-BZ0dJ4qn.js";
|
37
37
|
|
38
38
|
//#region compat/transformers.test.ts
|
39
39
|
const federation = new FederationImpl({ kv: new MemoryKvStore() });
|
@@ -4,8 +4,8 @@
|
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
6
|
import { RouterError } from "./router-D_aVZZUc.js";
|
7
|
-
import { lookupWebFinger } from "./lookup-
|
8
|
-
import { lookupObject, traverseCollection } from "./lookup-
|
7
|
+
import { lookupWebFinger } from "./lookup-CX4qjAss.js";
|
8
|
+
import { lookupObject, traverseCollection } from "./lookup-Cbwww1Nk.js";
|
9
9
|
import { mockDocumentLoader } from "./docloader-09nVWLAZ.js";
|
10
10
|
import { trace } from "@opentelemetry/api";
|
11
11
|
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { KvKey, KvStore } from "./kv-
|
4
|
-
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "./docloader-
|
5
|
-
import { GetNodeInfoOptions, JsonValue, NodeInfo } from "./client-
|
6
|
-
import { Activity, Collection, CryptographicKey, Hashtag, Link, Multikey, Object as Object$1 } from "./vocab-
|
7
|
-
import { Actor, Recipient } from "./actor-
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import {
|
3
|
+
import { KvKey, KvStore } from "./kv-DRaeSXco.js";
|
4
|
+
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "./docloader-Q42SMRIB.js";
|
5
|
+
import { GetNodeInfoOptions, JsonValue, NodeInfo } from "./client-DvtwXO7t.js";
|
6
|
+
import { Activity, Collection, CryptographicKey, Hashtag, Link, Multikey, Object as Object$1 } from "./vocab-CzEfWQk2.js";
|
7
|
+
import { Actor, Recipient } from "./actor-CPpvuBKU.js";
|
8
|
+
import { HttpMessageSignaturesSpec } from "./http-B8EiSgi2.js";
|
9
|
+
import { GetKeyOwnerOptions } from "./owner-D0cOz8R5.js";
|
10
|
+
import { LookupObjectOptions, TraverseCollectionOptions } from "./mod-CDzlVCUF.js";
|
11
|
+
import { LookupWebFingerOptions, ResourceDescriptor } from "./lookup-Bf-K85bV.js";
|
11
12
|
import { MessageQueue } from "./mq-DYKDDJmp.js";
|
12
13
|
import { Span, TracerProvider } from "@opentelemetry/api";
|
13
14
|
|
@@ -956,7 +957,7 @@ interface FederationBuilder<TContextData> extends Federatable<TContextData> {
|
|
956
957
|
*/
|
957
958
|
interface FederationOptions<TContextData> {
|
958
959
|
/**
|
959
|
-
* The key
|
960
|
+
* The key–value store used for caching, outbox queues, and inbox idempotence.
|
960
961
|
*/
|
961
962
|
kv: KvStore;
|
962
963
|
/**
|
@@ -1073,6 +1074,24 @@ interface FederationOptions<TContextData> {
|
|
1073
1074
|
* @since 0.13.0
|
1074
1075
|
*/
|
1075
1076
|
skipSignatureVerification?: boolean;
|
1077
|
+
/**
|
1078
|
+
* The HTTP Signatures specification to use for the first signature
|
1079
|
+
* attempt when communicating with unknown servers. This option affects
|
1080
|
+
* the "double-knocking" mechanism as described in the ActivityPub HTTP
|
1081
|
+
* Signature documentation.
|
1082
|
+
*
|
1083
|
+
* When making HTTP requests to servers that haven't been encountered before,
|
1084
|
+
* Fedify will first attempt to sign the request using the specified
|
1085
|
+
* signature specification. If the request fails, it will retry with the
|
1086
|
+
* alternative specification.
|
1087
|
+
*
|
1088
|
+
* Defaults to `"rfc9421"` (HTTP Message Signatures).
|
1089
|
+
*
|
1090
|
+
* @see {@link https://swicg.github.io/activitypub-http-signature/#how-to-upgrade-supported-versions}
|
1091
|
+
* @default `"rfc9421"`
|
1092
|
+
* @since 1.7.0
|
1093
|
+
*/
|
1094
|
+
firstKnock?: HttpMessageSignaturesSpec;
|
1076
1095
|
/**
|
1077
1096
|
* The retry policy for sending activities to recipients' inboxes.
|
1078
1097
|
* By default, this uses an exponential backoff strategy with a maximum of
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { KvKey, KvStore } from "./kv-
|
3
|
+
import { KvKey, KvStore } from "./kv-DRaeSXco.js";
|
4
4
|
|
5
5
|
//#region runtime/docloader.d.ts
|
6
6
|
/**
|
@@ -149,7 +149,7 @@ interface KvCacheParameters {
|
|
149
149
|
*/
|
150
150
|
loader: DocumentLoader;
|
151
151
|
/**
|
152
|
-
* The key
|
152
|
+
* The key–value store to use for backing the cache.
|
153
153
|
*/
|
154
154
|
kv: KvStore;
|
155
155
|
/**
|
@@ -115,7 +115,7 @@ function parse(input, loose) {
|
|
115
115
|
}
|
116
116
|
|
117
117
|
//#endregion
|
118
|
-
//#region node_modules/.pnpm/fetch-mock@12.5.
|
118
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/TypeDescriptor.js
|
119
119
|
const valueTypes = new Set([
|
120
120
|
"boolean",
|
121
121
|
"number",
|
@@ -207,7 +207,7 @@ var TypeDescriptor = class TypeDescriptor {
|
|
207
207
|
};
|
208
208
|
|
209
209
|
//#endregion
|
210
|
-
//#region node_modules/.pnpm/fetch-mock@12.5.
|
210
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/IsSubsetOf.js
|
211
211
|
const allowedTypes = new Set([
|
212
212
|
"array",
|
213
213
|
"object",
|
@@ -366,7 +366,7 @@ function dequal(foo, bar) {
|
|
366
366
|
}
|
367
367
|
|
368
368
|
//#endregion
|
369
|
-
//#region node_modules/.pnpm/fetch-mock@12.5.
|
369
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/RequestUtils.js
|
370
370
|
const absoluteUrlRX = new RegExp("^[a-z]+://|^data:", "i");
|
371
371
|
const protocolRelativeUrlRX = new RegExp("^//", "i");
|
372
372
|
function hasCredentialsInUrl(url) {
|
@@ -444,7 +444,7 @@ function normalizeHeaders(headers) {
|
|
444
444
|
}
|
445
445
|
|
446
446
|
//#endregion
|
447
|
-
//#region node_modules/.pnpm/fetch-mock@12.5.
|
447
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/Matchers.js
|
448
448
|
var import_glob_to_regexp = __toESM(require_glob_to_regexp(), 1);
|
449
449
|
const isUrlMatcher = (matcher) => matcher instanceof RegExp || typeof matcher === "string" || typeof matcher === "object" && "href" in matcher;
|
450
450
|
const isFunctionMatcher = (matcher) => typeof matcher === "function";
|
@@ -576,7 +576,7 @@ const getUrlMatcher = (route) => {
|
|
576
576
|
}
|
577
577
|
if (typeof matcherUrl === "string") {
|
578
578
|
for (const shorthand in stringMatchers) if (matcherUrl.indexOf(`${shorthand}:`) === 0) {
|
579
|
-
const urlFragment = matcherUrl.replace(new RegExp(`^${shorthand}:`), "");
|
579
|
+
const urlFragment = matcherUrl.replace(/* @__PURE__ */ new RegExp(`^${shorthand}:`), "");
|
580
580
|
return stringMatchers[shorthand](urlFragment);
|
581
581
|
}
|
582
582
|
return getFullUrlMatcher(route, matcherUrl, query);
|
@@ -627,7 +627,7 @@ const builtInMatchers = [
|
|
627
627
|
];
|
628
628
|
|
629
629
|
//#endregion
|
630
|
-
//#region node_modules/.pnpm/fetch-mock@12.5.
|
630
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/StatusTextMap.js
|
631
631
|
const statusTextMap = {
|
632
632
|
100: "Continue",
|
633
633
|
101: "Switching Protocols",
|
@@ -695,7 +695,7 @@ const statusTextMap = {
|
|
695
695
|
var StatusTextMap_default = statusTextMap;
|
696
696
|
|
697
697
|
//#endregion
|
698
|
-
//#region node_modules/.pnpm/fetch-mock@12.5.
|
698
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/Route.js
|
699
699
|
var __classPrivateFieldSet = void 0 && (void 0).__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
700
700
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
701
701
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
@@ -708,6 +708,11 @@ var __classPrivateFieldGet = void 0 && (void 0).__classPrivateFieldGet || functi
|
|
708
708
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
709
709
|
};
|
710
710
|
var _Route_instances, _a, _Route_responseSubscriptions, _Route_validate, _Route_sanitize, _Route_generateMatcher, _Route_limit, _Route_delayResponse;
|
711
|
+
var RouteConfigWrapper = class {
|
712
|
+
constructor(config) {
|
713
|
+
Object.assign(this, config);
|
714
|
+
}
|
715
|
+
};
|
711
716
|
function isBodyInit(body) {
|
712
717
|
return body instanceof Blob || body instanceof ArrayBuffer || ArrayBuffer.isView(body) || body instanceof DataView || body instanceof FormData || body instanceof ReadableStream || body instanceof URLSearchParams || body instanceof String || typeof body === "string" || body === null;
|
713
718
|
}
|
@@ -824,7 +829,7 @@ builtInMatchers.forEach(Route.defineMatcher);
|
|
824
829
|
var Route_default = Route;
|
825
830
|
|
826
831
|
//#endregion
|
827
|
-
//#region node_modules/.pnpm/fetch-mock@12.5.
|
832
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/Router.js
|
828
833
|
const responseConfigProps = [
|
829
834
|
"body",
|
830
835
|
"headers",
|
@@ -901,7 +906,7 @@ var Router = class {
|
|
901
906
|
} catch (err) {
|
902
907
|
reject(err);
|
903
908
|
}
|
904
|
-
else reject(new Error(`fetch-mock: No response or fallback rule to cover ${options && options.method || "GET"} to ${url}`));
|
909
|
+
else reject(/* @__PURE__ */ new Error(`fetch-mock: No response or fallback rule to cover ${options && options.method || "GET"} to ${url}`));
|
905
910
|
});
|
906
911
|
}
|
907
912
|
async generateResponse(callLog) {
|
@@ -938,6 +943,7 @@ var Router = class {
|
|
938
943
|
}
|
939
944
|
addRoute(matcher, response, nameOrOptions) {
|
940
945
|
const config = {};
|
946
|
+
if (matcher instanceof RouteConfigWrapper) Object.assign(config, matcher);
|
941
947
|
if (isUrlMatcher(matcher)) config.url = matcher;
|
942
948
|
else if (isFunctionMatcher(matcher)) config.matcherFunction = matcher;
|
943
949
|
else Object.assign(config, matcher);
|
@@ -996,7 +1002,7 @@ var Router = class {
|
|
996
1002
|
};
|
997
1003
|
|
998
1004
|
//#endregion
|
999
|
-
//#region node_modules/.pnpm/fetch-mock@12.5.
|
1005
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/CallHistory.js
|
1000
1006
|
const isName = (filter) => typeof filter === "string" && /^[\da-zA-Z-]+$/.test(filter) && !["matched", "unmatched"].includes(filter);
|
1001
1007
|
const isMatchedOrUnmatched = (filter) => typeof filter === "boolean" || ["matched", "unmatched"].includes(filter);
|
1002
1008
|
var CallHistory = class {
|
@@ -1081,7 +1087,7 @@ var CallHistory = class {
|
|
1081
1087
|
var CallHistory_default = CallHistory;
|
1082
1088
|
|
1083
1089
|
//#endregion
|
1084
|
-
//#region node_modules/.pnpm/fetch-mock@12.5.
|
1090
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/FetchMock.js
|
1085
1091
|
const defaultFetchMockConfig = {
|
1086
1092
|
includeContentLength: true,
|
1087
1093
|
matchPartialBody: false,
|
@@ -1214,7 +1220,7 @@ const fetchMock = new FetchMock({ ...defaultFetchMockConfig });
|
|
1214
1220
|
var FetchMock_default = fetchMock;
|
1215
1221
|
|
1216
1222
|
//#endregion
|
1217
|
-
//#region node_modules/.pnpm/fetch-mock@12.5.
|
1223
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.3/node_modules/fetch-mock/dist/esm/index.js
|
1218
1224
|
var esm_default = FetchMock_default;
|
1219
1225
|
|
1220
1226
|
//#endregion
|
@@ -6,18 +6,18 @@
|
|
6
6
|
import { assertEquals } from "../assert_equals-Dnj7ejjL.js";
|
7
7
|
import "../assert-YJk-1DlZ.js";
|
8
8
|
import "../assert_instance_of-DBIoG5k7.js";
|
9
|
-
import { MemoryKvStore } from "../kv-
|
10
|
-
import "../docloader-
|
9
|
+
import { MemoryKvStore } from "../kv-BMY6Qf_A.js";
|
10
|
+
import "../docloader-Cg1VPpKf.js";
|
11
11
|
import "../url-kTAI6_KP.js";
|
12
|
-
import { parseSemVer } from "../semver-
|
12
|
+
import { parseSemVer } from "../semver-DWClQt_5.js";
|
13
13
|
import "../router-D_aVZZUc.js";
|
14
14
|
import "../multibase-DeCHcK8L.js";
|
15
|
-
import { Activity, Note, Person } from "../vocab-
|
15
|
+
import { Activity, Note, Person } from "../vocab-CkD4jwmV.js";
|
16
16
|
import "../langstr-DbWheeIS.js";
|
17
17
|
import "../type-D2s5lmbZ.js";
|
18
|
-
import "../inbox-
|
19
|
-
import { createFederationBuilder } from "../builder-
|
20
|
-
import { test } from "../testing-
|
18
|
+
import "../inbox-BLGI5mWd.js";
|
19
|
+
import { createFederationBuilder } from "../builder-J9iFzZzN.js";
|
20
|
+
import { test } from "../testing-BZ0dJ4qn.js";
|
21
21
|
import { assertExists } from "../std__assert-CHXwj7zk.js";
|
22
22
|
import "../assert_rejects-BZjUwo62.js";
|
23
23
|
import "../assert_is_error-jyzqjHud.js";
|
@@ -107,6 +107,28 @@ test("FederationBuilder", async (t) => {
|
|
107
107
|
assertEquals(impl.router.trailingSlashInsensitive, true);
|
108
108
|
assertEquals(impl.origin?.webOrigin, "https://example.com");
|
109
109
|
});
|
110
|
+
await t.step("should handle firstKnock option", async () => {
|
111
|
+
const builder = createFederationBuilder();
|
112
|
+
const kv = new MemoryKvStore();
|
113
|
+
const federationDefault = await builder.build({ kv });
|
114
|
+
assertExists(federationDefault);
|
115
|
+
const implDefault = federationDefault;
|
116
|
+
assertEquals(implDefault.firstKnock, void 0);
|
117
|
+
const federationCustom = await builder.build({
|
118
|
+
kv,
|
119
|
+
firstKnock: "draft-cavage-http-signatures-12"
|
120
|
+
});
|
121
|
+
assertExists(federationCustom);
|
122
|
+
const implCustom = federationCustom;
|
123
|
+
assertEquals(implCustom.firstKnock, "draft-cavage-http-signatures-12");
|
124
|
+
const federationRfc = await builder.build({
|
125
|
+
kv,
|
126
|
+
firstKnock: "rfc9421"
|
127
|
+
});
|
128
|
+
assertExists(federationRfc);
|
129
|
+
const implRfc = federationRfc;
|
130
|
+
assertEquals(implRfc.firstKnock, "rfc9421");
|
131
|
+
});
|
110
132
|
await t.step("should register multiple object dispatchers and verify them", async () => {
|
111
133
|
const builder = createFederationBuilder();
|
112
134
|
const kv = new MemoryKvStore();
|
@@ -7,7 +7,7 @@ import { assertEquals } from "../assert_equals-Dnj7ejjL.js";
|
|
7
7
|
import "../assert-YJk-1DlZ.js";
|
8
8
|
import "../assert_instance_of-DBIoG5k7.js";
|
9
9
|
import { buildCollectionSynchronizationHeader, digest } from "../collection-Dfb0TPno.js";
|
10
|
-
import { test } from "../testing-
|
10
|
+
import { test } from "../testing-BZ0dJ4qn.js";
|
11
11
|
import "../std__assert-CHXwj7zk.js";
|
12
12
|
import "../assert_rejects-BZjUwo62.js";
|
13
13
|
import "../assert_is_error-jyzqjHud.js";
|
@@ -6,42 +6,42 @@
|
|
6
6
|
import { assertEquals } from "../assert_equals-Dnj7ejjL.js";
|
7
7
|
import { assert } from "../assert-YJk-1DlZ.js";
|
8
8
|
import "../assert_instance_of-DBIoG5k7.js";
|
9
|
-
import { MemoryKvStore } from "../kv-
|
10
|
-
import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-
|
11
|
-
import "../docloader-
|
9
|
+
import { MemoryKvStore } from "../kv-BMY6Qf_A.js";
|
10
|
+
import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-rvM2CNtG.js";
|
11
|
+
import "../docloader-Cg1VPpKf.js";
|
12
12
|
import "../url-kTAI6_KP.js";
|
13
|
-
import "../semver-
|
14
|
-
import "../client-
|
13
|
+
import "../semver-DWClQt_5.js";
|
14
|
+
import "../client-Zr00-i3d.js";
|
15
15
|
import "../router-D_aVZZUc.js";
|
16
|
-
import "../types-
|
16
|
+
import "../types-C7C_l-jz.js";
|
17
17
|
import "../multibase-DeCHcK8L.js";
|
18
|
-
import { Create, Note, Person } from "../vocab-
|
18
|
+
import { Create, Note, Person } from "../vocab-CkD4jwmV.js";
|
19
19
|
import "../langstr-DbWheeIS.js";
|
20
|
-
import "../lookup-
|
20
|
+
import "../lookup-CX4qjAss.js";
|
21
21
|
import "../type-D2s5lmbZ.js";
|
22
|
-
import "../actor-
|
23
|
-
import "../key-
|
24
|
-
import { signRequest } from "../http-
|
25
|
-
import "../authdocloader-
|
26
|
-
import "../ld-
|
27
|
-
import "../owner-
|
28
|
-
import "../proof-
|
29
|
-
import "../lookup-
|
30
|
-
import "../inbox-
|
31
|
-
import "../builder-
|
22
|
+
import "../actor-DeIuzQxq.js";
|
23
|
+
import "../key-CWTlZkYV.js";
|
24
|
+
import { signRequest } from "../http-BTqtnecF.js";
|
25
|
+
import "../authdocloader-BEp8lEDb.js";
|
26
|
+
import "../ld-ecZJerZ8.js";
|
27
|
+
import "../owner-BSmRd_IH.js";
|
28
|
+
import "../proof-CkXiUJfu.js";
|
29
|
+
import "../lookup-Cbwww1Nk.js";
|
30
|
+
import "../inbox-BLGI5mWd.js";
|
31
|
+
import "../builder-J9iFzZzN.js";
|
32
32
|
import "../collection-Dfb0TPno.js";
|
33
|
-
import "../keycache-
|
33
|
+
import "../keycache-D4rAVXOS.js";
|
34
34
|
import "../retry-BiIhZWgD.js";
|
35
|
-
import "../send-
|
36
|
-
import { test } from "../testing-
|
35
|
+
import "../send-DrxpWl1q.js";
|
36
|
+
import { test } from "../testing-BZ0dJ4qn.js";
|
37
37
|
import "../std__assert-CHXwj7zk.js";
|
38
38
|
import { assertFalse } from "../assert_rejects-BZjUwo62.js";
|
39
39
|
import "../assert_is_error-jyzqjHud.js";
|
40
40
|
import "../assert_not_equals-wx-SRs4i.js";
|
41
41
|
import "../assert_throws-gBPv3v2V.js";
|
42
42
|
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
43
|
-
import { createInboxContext, createRequestContext } from "../context-
|
44
|
-
import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
43
|
+
import { createInboxContext, createRequestContext } from "../context-Bs34sOF6.js";
|
44
|
+
import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-cySMuiGu.js";
|
45
45
|
|
46
46
|
//#region federation/handler.test.ts
|
47
47
|
test("acceptsJsonLd()", () => {
|
@@ -4,14 +4,14 @@
|
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
6
|
import { assertEquals } from "../assert_equals-Dnj7ejjL.js";
|
7
|
-
import "../docloader-
|
7
|
+
import "../docloader-Cg1VPpKf.js";
|
8
8
|
import "../url-kTAI6_KP.js";
|
9
9
|
import "../multibase-DeCHcK8L.js";
|
10
|
-
import { Activity, Create, Invite, Offer, Update } from "../vocab-
|
10
|
+
import { Activity, Create, Invite, Offer, Update } from "../vocab-CkD4jwmV.js";
|
11
11
|
import "../langstr-DbWheeIS.js";
|
12
12
|
import "../type-D2s5lmbZ.js";
|
13
|
-
import { InboxListenerSet } from "../inbox-
|
14
|
-
import { test } from "../testing-
|
13
|
+
import { InboxListenerSet } from "../inbox-BLGI5mWd.js";
|
14
|
+
import { test } from "../testing-BZ0dJ4qn.js";
|
15
15
|
import "../assert_is_error-jyzqjHud.js";
|
16
16
|
import { assertThrows } from "../assert_throws-gBPv3v2V.js";
|
17
17
|
|
@@ -6,14 +6,14 @@
|
|
6
6
|
import { assertEquals } from "../assert_equals-Dnj7ejjL.js";
|
7
7
|
import { assert } from "../assert-YJk-1DlZ.js";
|
8
8
|
import { assertInstanceOf } from "../assert_instance_of-DBIoG5k7.js";
|
9
|
-
import { MemoryKvStore } from "../kv-
|
10
|
-
import "../docloader-
|
9
|
+
import { MemoryKvStore } from "../kv-BMY6Qf_A.js";
|
10
|
+
import "../docloader-Cg1VPpKf.js";
|
11
11
|
import "../url-kTAI6_KP.js";
|
12
12
|
import "../multibase-DeCHcK8L.js";
|
13
|
-
import { CryptographicKey, Multikey } from "../vocab-
|
13
|
+
import { CryptographicKey, Multikey } from "../vocab-CkD4jwmV.js";
|
14
14
|
import "../langstr-DbWheeIS.js";
|
15
|
-
import { KvKeyCache } from "../keycache-
|
16
|
-
import { test } from "../testing-
|
15
|
+
import { KvKeyCache } from "../keycache-D4rAVXOS.js";
|
16
|
+
import { test } from "../testing-BZ0dJ4qn.js";
|
17
17
|
|
18
18
|
//#region federation/keycache.test.ts
|
19
19
|
test("KvKeyCache.set()", async () => {
|
@@ -6,8 +6,8 @@
|
|
6
6
|
import { assertEquals } from "../assert_equals-Dnj7ejjL.js";
|
7
7
|
import "../assert-YJk-1DlZ.js";
|
8
8
|
import "../assert_instance_of-DBIoG5k7.js";
|
9
|
-
import { MemoryKvStore } from "../kv-
|
10
|
-
import { test } from "../testing-
|
9
|
+
import { MemoryKvStore } from "../kv-BMY6Qf_A.js";
|
10
|
+
import { test } from "../testing-BZ0dJ4qn.js";
|
11
11
|
import "../std__assert-CHXwj7zk.js";
|
12
12
|
import "../assert_rejects-BZjUwo62.js";
|
13
13
|
import "../assert_is_error-jyzqjHud.js";
|