@fedify/fedify 1.6.1 → 1.7.0-dev.887
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-BPpr69o_.js → actor-D-9qJ3V5.js} +3 -3
- package/dist/{actor-BRHV5zJ-.js → actor-DzovCADh.js} +179 -179
- package/dist/{authdocloader-BZFGEwwq.js → authdocloader-1prk3606.js} +3 -3
- package/dist/{authdocloader-BekmxF5u.js → authdocloader-DiYcSM7x.js} +3 -3
- package/dist/{builder-6d3Dz5mx.js → builder-DV1la2SX.js} +3 -3
- package/dist/{client-DQIcIlJU.js → client-DSy0ry-S.js} +1 -1
- package/dist/compat/mod.d.ts +3 -3
- package/dist/compat/transformers.test.js +17 -17
- package/dist/{context-DRhhOsMk.d.ts → context-DdICJaUT.d.ts} +1 -1
- package/dist/{context-hZKmfLXY.js → context-b6D90GV5.js} +2 -2
- package/dist/{denokv-B_GFWjrl.js → denokv-CvROlGYX.js} +5 -0
- package/dist/{docloader-CFuioPSY.js → docloader-DnHtxVIk.js} +1 -1
- package/dist/{docloader-COHp0QgR.js → docloader-DzFFH1W2.js} +1 -1
- package/dist/federation/builder.test.js +4 -4
- package/dist/federation/handler.test.js +19 -19
- package/dist/federation/inbox.test.js +3 -3
- package/dist/federation/keycache.test.js +3 -3
- package/dist/federation/middleware.test.js +154 -18
- package/dist/federation/mod.d.ts +2 -2
- package/dist/federation/mod.js +11 -11
- package/dist/federation/mq.test.js +59 -3
- package/dist/federation/send.test.js +9 -9
- package/dist/{federation-3B6BDKCK.js → federation-lZOZyLAo.js} +11 -0
- package/dist/{http-C0ueQROD.js → http-Jpv_4K_J.js} +3 -3
- package/dist/{http-D523RJVL.js → http-mPUwRCsb.js} +3 -3
- package/dist/{inbox-5eiuvsES.js → inbox-CZFKnWFY.js} +2 -2
- package/dist/{key-D5LOMkXp.js → key-BlmNTw5K.js} +3 -3
- package/dist/{key-CrAjL8Th.js → key-Cb0qglhB.js} +5 -5
- package/dist/{key-PLMRBhyq.js → key-CvsMGSBN.js} +4 -4
- package/dist/{key-DlqwkdF6.js → key-DZsyKwhm.js} +2 -2
- package/dist/{keycache-CyjJMAa8.js → keycache-K_JZIBdY.js} +1 -1
- package/dist/{keys-DQ2kNLQQ.js → keys-DuH2TQta.js} +1 -1
- package/dist/{ld-rLvDkwUL.js → ld-9zoQoByu.js} +3 -3
- package/dist/{lookup-oLKN3HSl.js → lookup-Bd7kzvi0.js} +1 -1
- package/dist/{lookup-B4JQ9FvE.js → lookup-Bd837Vtz.js} +1 -1
- package/dist/{lookup-CRjlBmyh.js → lookup-DW-c2ipm.js} +3 -3
- package/dist/{middleware-83KxItnw.js → middleware-BHUKqYhG.js} +31 -10
- package/dist/{middleware-B0uCxn1o.js → middleware-BLRKgoj9.js} +36 -15
- package/dist/middleware-CuoU6TNS.js +33 -0
- package/dist/middleware-Y-adfimv.js +17 -0
- package/dist/{mod-CgmTOt4z.d.ts → mod-5orySGMZ.d.ts} +1 -1
- package/dist/mod.d.ts +3 -3
- package/dist/mod.js +11 -11
- package/dist/{mq-nceTGCuc.d.ts → mq-DYKDDJmp.d.ts} +20 -0
- package/dist/nodeinfo/client.test.js +2 -2
- package/dist/nodeinfo/handler.test.js +18 -18
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/{owner-B5sR7_Qw.js → owner-DKkM9XBB.js} +3 -3
- package/dist/{proof-AL0P3h_I.js → proof-8JRtgDVK.js} +3 -3
- package/dist/{proof-BVprztx-.js → proof-vt6oUeU5.js} +3 -3
- package/dist/runtime/authdocloader.test.js +8 -8
- package/dist/runtime/docloader.test.js +1 -1
- package/dist/runtime/key.test.js +5 -5
- package/dist/runtime/mod.js +6 -6
- package/dist/{send-BjLRJdee.js → send-DGxO2l9M.js} +2 -2
- package/dist/sig/http.test.js +7 -7
- package/dist/sig/key.test.js +6 -6
- package/dist/sig/ld.test.js +7 -7
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +8 -8
- package/dist/sig/proof.test.js +7 -7
- package/dist/{types-DegZ8FlT.js → types-BPJDfFPR.js} +1 -1
- package/dist/vocab/actor.test.js +4 -4
- package/dist/vocab/lookup.test.js +4 -4
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +2 -2
- package/dist/vocab/vocab.test.js +3 -3
- package/dist/{vocab-uVrsB2D1.js → vocab-BEmVtvJ1.js} +178 -178
- package/dist/{vocab-BY68bjvE.js → vocab-s_hECEtk.js} +3 -3
- package/dist/webfinger/handler.test.js +18 -18
- package/dist/webfinger/lookup.test.js +2 -2
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.d.ts +7 -1
- package/dist/x/cfworkers.js +6 -0
- package/dist/x/cfworkers.test.js +6 -0
- package/dist/x/hono.d.ts +2 -2
- package/dist/x/sveltekit.d.ts +2 -2
- package/package.json +1 -1
- package/dist/middleware-CtQDr_8l.js +0 -17
- package/dist/middleware-DbguxGNt.js +0 -33
@@ -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-DnHtxVIk.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-BlmNTw5K.js";
|
9
|
+
import { doubleKnock } from "./http-mPUwRCsb.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-DzFFH1W2.js";
|
6
|
+
import { validateCryptoKey } from "./key-DZsyKwhm.js";
|
7
|
+
import { doubleKnock } from "./http-Jpv_4K_J.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-DnHtxVIk.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-CZFKnWFY.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-CuoU6TNS.js");
|
38
38
|
const f = new FederationImpl(options);
|
39
39
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
40
40
|
f.router = this.router.clone();
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { getUserAgent } from "./docloader-
|
6
|
+
import { getUserAgent } from "./docloader-DnHtxVIk.js";
|
7
7
|
import { parseSemVer } from "./semver-CbbIgUsa.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
|
package/dist/compat/mod.d.ts
CHANGED
@@ -9,7 +9,7 @@ import "../http-BkUCISGt.js";
|
|
9
9
|
import "../owner-CbRc94FP.js";
|
10
10
|
import "../mod-DSPyncxx.js";
|
11
11
|
import "../lookup-vJccIKCS.js";
|
12
|
-
import { ActivityTransformer } from "../context-
|
13
|
-
import "../mq-
|
14
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "../mod-
|
12
|
+
import { ActivityTransformer } from "../context-DdICJaUT.js";
|
13
|
+
import "../mq-DYKDDJmp.js";
|
14
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "../mod-5orySGMZ.js";
|
15
15
|
export { ActivityTransformer, actorDehydrator, autoIdAssigner, getDefaultActivityTransformers };
|
@@ -7,32 +7,32 @@ 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
9
|
import { MemoryKvStore } from "../kv-DohFOP2C.js";
|
10
|
-
import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-
|
11
|
-
import "../docloader-
|
10
|
+
import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-BLRKgoj9.js";
|
11
|
+
import "../docloader-DnHtxVIk.js";
|
12
12
|
import "../url-kTAI6_KP.js";
|
13
13
|
import "../semver-CbbIgUsa.js";
|
14
|
-
import "../client-
|
14
|
+
import "../client-DSy0ry-S.js";
|
15
15
|
import "../router-D_aVZZUc.js";
|
16
16
|
import "../types-CqoqWDkp.js";
|
17
17
|
import "../multibase-DeCHcK8L.js";
|
18
|
-
import { Follow, Person } from "../vocab-
|
18
|
+
import { Follow, Person } from "../vocab-BEmVtvJ1.js";
|
19
19
|
import "../langstr-DbWheeIS.js";
|
20
|
-
import "../lookup-
|
20
|
+
import "../lookup-Bd7kzvi0.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-D-9qJ3V5.js";
|
23
|
+
import "../key-BlmNTw5K.js";
|
24
|
+
import "../http-mPUwRCsb.js";
|
25
|
+
import "../authdocloader-1prk3606.js";
|
26
|
+
import "../ld-9zoQoByu.js";
|
27
|
+
import "../owner-DKkM9XBB.js";
|
28
|
+
import "../proof-vt6oUeU5.js";
|
29
|
+
import "../lookup-DW-c2ipm.js";
|
30
|
+
import "../inbox-CZFKnWFY.js";
|
31
|
+
import "../builder-DV1la2SX.js";
|
32
32
|
import "../collection-Dfb0TPno.js";
|
33
|
-
import "../keycache-
|
33
|
+
import "../keycache-K_JZIBdY.js";
|
34
34
|
import "../retry-BiIhZWgD.js";
|
35
|
-
import "../send-
|
35
|
+
import "../send-DGxO2l9M.js";
|
36
36
|
import { test } from "../testing-jcGLO9Lp.js";
|
37
37
|
|
38
38
|
//#region compat/transformers.test.ts
|
@@ -8,7 +8,7 @@ import { Actor, Recipient } from "./actor-tT_B0pDn.js";
|
|
8
8
|
import { GetKeyOwnerOptions } from "./owner-CbRc94FP.js";
|
9
9
|
import { LookupObjectOptions, TraverseCollectionOptions } from "./mod-DSPyncxx.js";
|
10
10
|
import { LookupWebFingerOptions, ResourceDescriptor } from "./lookup-vJccIKCS.js";
|
11
|
-
import { MessageQueue } from "./mq-
|
11
|
+
import { MessageQueue } from "./mq-DYKDDJmp.js";
|
12
12
|
import { Span, TracerProvider } from "@opentelemetry/api";
|
13
13
|
|
14
14
|
//#region compat/types.d.ts
|
@@ -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-Bd7kzvi0.js";
|
8
|
+
import { lookupObject, traverseCollection } from "./lookup-DW-c2ipm.js";
|
9
9
|
import { mockDocumentLoader } from "./docloader-09nVWLAZ.js";
|
10
10
|
import { trace } from "@opentelemetry/api";
|
11
11
|
|
@@ -10,6 +10,11 @@
|
|
10
10
|
var DenoKvMessageQueue = class {
|
11
11
|
#kv;
|
12
12
|
/**
|
13
|
+
* Deno KV queues provide automatic retry with exponential backoff.
|
14
|
+
* @since 1.7.0
|
15
|
+
*/
|
16
|
+
nativeRetrial = true;
|
17
|
+
/**
|
13
18
|
* Constructs a new {@link DenoKvMessageQueue} adapter with the given Deno KV
|
14
19
|
* store.
|
15
20
|
* @param kv The Deno KV store to use.
|
@@ -7,16 +7,16 @@ 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 { MemoryKvStore } from "../kv-DohFOP2C.js";
|
10
|
-
import "../docloader-
|
10
|
+
import "../docloader-DnHtxVIk.js";
|
11
11
|
import "../url-kTAI6_KP.js";
|
12
12
|
import { parseSemVer } from "../semver-CbbIgUsa.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-BEmVtvJ1.js";
|
16
16
|
import "../langstr-DbWheeIS.js";
|
17
17
|
import "../type-D2s5lmbZ.js";
|
18
|
-
import "../inbox-
|
19
|
-
import { createFederationBuilder } from "../builder-
|
18
|
+
import "../inbox-CZFKnWFY.js";
|
19
|
+
import { createFederationBuilder } from "../builder-DV1la2SX.js";
|
20
20
|
import { test } from "../testing-jcGLO9Lp.js";
|
21
21
|
import { assertExists } from "../std__assert-CHXwj7zk.js";
|
22
22
|
import "../assert_rejects-BZjUwo62.js";
|
@@ -7,32 +7,32 @@ 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
9
|
import { MemoryKvStore } from "../kv-DohFOP2C.js";
|
10
|
-
import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-
|
11
|
-
import "../docloader-
|
10
|
+
import { acceptsJsonLd, createFederation, handleActor, handleCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-BLRKgoj9.js";
|
11
|
+
import "../docloader-DnHtxVIk.js";
|
12
12
|
import "../url-kTAI6_KP.js";
|
13
13
|
import "../semver-CbbIgUsa.js";
|
14
|
-
import "../client-
|
14
|
+
import "../client-DSy0ry-S.js";
|
15
15
|
import "../router-D_aVZZUc.js";
|
16
16
|
import "../types-CqoqWDkp.js";
|
17
17
|
import "../multibase-DeCHcK8L.js";
|
18
|
-
import { Create, Note, Person } from "../vocab-
|
18
|
+
import { Create, Note, Person } from "../vocab-BEmVtvJ1.js";
|
19
19
|
import "../langstr-DbWheeIS.js";
|
20
|
-
import "../lookup-
|
20
|
+
import "../lookup-Bd7kzvi0.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-D-9qJ3V5.js";
|
23
|
+
import "../key-BlmNTw5K.js";
|
24
|
+
import { signRequest } from "../http-mPUwRCsb.js";
|
25
|
+
import "../authdocloader-1prk3606.js";
|
26
|
+
import "../ld-9zoQoByu.js";
|
27
|
+
import "../owner-DKkM9XBB.js";
|
28
|
+
import "../proof-vt6oUeU5.js";
|
29
|
+
import "../lookup-DW-c2ipm.js";
|
30
|
+
import "../inbox-CZFKnWFY.js";
|
31
|
+
import "../builder-DV1la2SX.js";
|
32
32
|
import "../collection-Dfb0TPno.js";
|
33
|
-
import "../keycache-
|
33
|
+
import "../keycache-K_JZIBdY.js";
|
34
34
|
import "../retry-BiIhZWgD.js";
|
35
|
-
import "../send-
|
35
|
+
import "../send-DGxO2l9M.js";
|
36
36
|
import { test } from "../testing-jcGLO9Lp.js";
|
37
37
|
import "../std__assert-CHXwj7zk.js";
|
38
38
|
import { assertFalse } from "../assert_rejects-BZjUwo62.js";
|
@@ -40,8 +40,8 @@ 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-b6D90GV5.js";
|
44
|
+
import { rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-DuH2TQta.js";
|
45
45
|
|
46
46
|
//#region federation/handler.test.ts
|
47
47
|
test("acceptsJsonLd()", () => {
|
@@ -4,13 +4,13 @@
|
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
6
|
import { assertEquals } from "../assert_equals-Dnj7ejjL.js";
|
7
|
-
import "../docloader-
|
7
|
+
import "../docloader-DnHtxVIk.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-BEmVtvJ1.js";
|
11
11
|
import "../langstr-DbWheeIS.js";
|
12
12
|
import "../type-D2s5lmbZ.js";
|
13
|
-
import { InboxListenerSet } from "../inbox-
|
13
|
+
import { InboxListenerSet } from "../inbox-CZFKnWFY.js";
|
14
14
|
import { test } from "../testing-jcGLO9Lp.js";
|
15
15
|
import "../assert_is_error-jyzqjHud.js";
|
16
16
|
import { assertThrows } from "../assert_throws-gBPv3v2V.js";
|
@@ -7,12 +7,12 @@ 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
9
|
import { MemoryKvStore } from "../kv-DohFOP2C.js";
|
10
|
-
import "../docloader-
|
10
|
+
import "../docloader-DnHtxVIk.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-BEmVtvJ1.js";
|
14
14
|
import "../langstr-DbWheeIS.js";
|
15
|
-
import { KvKeyCache } from "../keycache-
|
15
|
+
import { KvKeyCache } from "../keycache-K_JZIBdY.js";
|
16
16
|
import { test } from "../testing-jcGLO9Lp.js";
|
17
17
|
|
18
18
|
//#region federation/keycache.test.ts
|
@@ -7,32 +7,32 @@ 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
9
|
import { MemoryKvStore } from "../kv-DohFOP2C.js";
|
10
|
-
import { ContextImpl, FederationImpl, InboxContextImpl, createFederation } from "../middleware-
|
11
|
-
import { FetchError, fetchDocumentLoader } from "../docloader-
|
10
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, createFederation } from "../middleware-BLRKgoj9.js";
|
11
|
+
import { FetchError, fetchDocumentLoader } from "../docloader-DnHtxVIk.js";
|
12
12
|
import "../url-kTAI6_KP.js";
|
13
13
|
import "../semver-CbbIgUsa.js";
|
14
|
-
import "../client-
|
14
|
+
import "../client-DSy0ry-S.js";
|
15
15
|
import { RouterError } from "../router-D_aVZZUc.js";
|
16
16
|
import "../types-CqoqWDkp.js";
|
17
17
|
import "../multibase-DeCHcK8L.js";
|
18
|
-
import { Activity, Announce, Create, Invite, Multikey, Note, Object as Object$1, Offer, Person } from "../vocab-
|
18
|
+
import { Activity, Announce, Create, Invite, Multikey, Note, Object as Object$1, Offer, Person } from "../vocab-BEmVtvJ1.js";
|
19
19
|
import "../langstr-DbWheeIS.js";
|
20
|
-
import "../lookup-
|
20
|
+
import "../lookup-Bd7kzvi0.js";
|
21
21
|
import { getTypeId } from "../type-D2s5lmbZ.js";
|
22
|
-
import "../actor-
|
23
|
-
import "../key-
|
24
|
-
import { signRequest, verifyRequest } from "../http-
|
25
|
-
import { getAuthenticatedDocumentLoader } from "../authdocloader-
|
26
|
-
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-
|
27
|
-
import { doesActorOwnKey } from "../owner-
|
28
|
-
import { signObject, verifyObject } from "../proof-
|
29
|
-
import { lookupObject } from "../lookup-
|
30
|
-
import "../inbox-
|
31
|
-
import "../builder-
|
22
|
+
import "../actor-D-9qJ3V5.js";
|
23
|
+
import "../key-BlmNTw5K.js";
|
24
|
+
import { signRequest, verifyRequest } from "../http-mPUwRCsb.js";
|
25
|
+
import { getAuthenticatedDocumentLoader } from "../authdocloader-1prk3606.js";
|
26
|
+
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-9zoQoByu.js";
|
27
|
+
import { doesActorOwnKey } from "../owner-DKkM9XBB.js";
|
28
|
+
import { signObject, verifyObject } from "../proof-vt6oUeU5.js";
|
29
|
+
import { lookupObject } from "../lookup-DW-c2ipm.js";
|
30
|
+
import "../inbox-CZFKnWFY.js";
|
31
|
+
import "../builder-DV1la2SX.js";
|
32
32
|
import "../collection-Dfb0TPno.js";
|
33
|
-
import "../keycache-
|
33
|
+
import "../keycache-K_JZIBdY.js";
|
34
34
|
import "../retry-BiIhZWgD.js";
|
35
|
-
import "../send-
|
35
|
+
import "../send-DGxO2l9M.js";
|
36
36
|
import { test } from "../testing-jcGLO9Lp.js";
|
37
37
|
import { assertStrictEquals } from "../std__assert-CHXwj7zk.js";
|
38
38
|
import { assertFalse, assertRejects } from "../assert_rejects-BZjUwo62.js";
|
@@ -40,7 +40,7 @@ import "../assert_is_error-jyzqjHud.js";
|
|
40
40
|
import { assertNotEquals } from "../assert_not_equals-wx-SRs4i.js";
|
41
41
|
import { assertThrows } from "../assert_throws-gBPv3v2V.js";
|
42
42
|
import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
|
43
|
-
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
43
|
+
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-DuH2TQta.js";
|
44
44
|
import { esm_default } from "../esm-Btx3E8og.js";
|
45
45
|
|
46
46
|
//#region testing/fixtures/example.com/person.json
|
@@ -1068,6 +1068,142 @@ test("FederationImpl.sendActivity()", async (t) => {
|
|
1068
1068
|
});
|
1069
1069
|
esm_default.hardReset();
|
1070
1070
|
});
|
1071
|
+
test("FederationImpl.processQueuedTask()", async (t) => {
|
1072
|
+
await t.step("with MessageQueue having nativeRetrial", async () => {
|
1073
|
+
const kv = new MemoryKvStore();
|
1074
|
+
const queuedMessages = [];
|
1075
|
+
const queue = {
|
1076
|
+
nativeRetrial: true,
|
1077
|
+
enqueue(message, _options) {
|
1078
|
+
queuedMessages.push(message);
|
1079
|
+
return Promise.resolve();
|
1080
|
+
},
|
1081
|
+
listen(_handler, _options) {
|
1082
|
+
return Promise.resolve();
|
1083
|
+
}
|
1084
|
+
};
|
1085
|
+
const federation = new FederationImpl({
|
1086
|
+
kv,
|
1087
|
+
queue
|
1088
|
+
});
|
1089
|
+
federation.setInboxListeners("/users/{identifier}/inbox", "/inbox").on(Create, () => {
|
1090
|
+
throw new Error("Intended error for testing");
|
1091
|
+
});
|
1092
|
+
await assertRejects(() => federation.processQueuedTask(void 0, {
|
1093
|
+
type: "outbox",
|
1094
|
+
id: crypto.randomUUID(),
|
1095
|
+
baseUrl: "https://example.com",
|
1096
|
+
keys: [],
|
1097
|
+
activity: {
|
1098
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
1099
|
+
type: "Create",
|
1100
|
+
actor: "https://example.com/users/alice",
|
1101
|
+
object: {
|
1102
|
+
type: "Note",
|
1103
|
+
content: "test"
|
1104
|
+
}
|
1105
|
+
},
|
1106
|
+
activityType: "https://www.w3.org/ns/activitystreams#Create",
|
1107
|
+
inbox: "https://invalid-domain-that-does-not-exist.example/inbox",
|
1108
|
+
sharedInbox: false,
|
1109
|
+
started: (/* @__PURE__ */ new Date()).toISOString(),
|
1110
|
+
attempt: 0,
|
1111
|
+
headers: {},
|
1112
|
+
traceContext: {}
|
1113
|
+
}), Error);
|
1114
|
+
assertEquals(queuedMessages, []);
|
1115
|
+
await assertRejects(() => federation.processQueuedTask(void 0, {
|
1116
|
+
type: "inbox",
|
1117
|
+
id: crypto.randomUUID(),
|
1118
|
+
baseUrl: "https://example.com",
|
1119
|
+
activity: {
|
1120
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
1121
|
+
type: "Create",
|
1122
|
+
actor: "https://remote.example/users/alice",
|
1123
|
+
object: {
|
1124
|
+
type: "Note",
|
1125
|
+
content: "Hello world"
|
1126
|
+
}
|
1127
|
+
},
|
1128
|
+
started: (/* @__PURE__ */ new Date()).toISOString(),
|
1129
|
+
attempt: 0,
|
1130
|
+
identifier: null,
|
1131
|
+
traceContext: {}
|
1132
|
+
}), Error);
|
1133
|
+
assertEquals(queuedMessages, []);
|
1134
|
+
});
|
1135
|
+
await t.step("with MessageQueue having no nativeRetrial", async () => {
|
1136
|
+
const kv = new MemoryKvStore();
|
1137
|
+
let queuedMessages = [];
|
1138
|
+
const queue = {
|
1139
|
+
enqueue(message, _options) {
|
1140
|
+
queuedMessages.push(message);
|
1141
|
+
return Promise.resolve();
|
1142
|
+
},
|
1143
|
+
listen(_handler, _options) {
|
1144
|
+
return Promise.resolve();
|
1145
|
+
}
|
1146
|
+
};
|
1147
|
+
const federation = new FederationImpl({
|
1148
|
+
kv,
|
1149
|
+
queue
|
1150
|
+
});
|
1151
|
+
federation.setInboxListeners("/users/{identifier}/inbox", "/inbox").on(Create, () => {
|
1152
|
+
throw new Error("Intended error for testing");
|
1153
|
+
});
|
1154
|
+
const outboxMessage = {
|
1155
|
+
type: "outbox",
|
1156
|
+
id: crypto.randomUUID(),
|
1157
|
+
baseUrl: "https://example.com",
|
1158
|
+
keys: [],
|
1159
|
+
activity: {
|
1160
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
1161
|
+
type: "Create",
|
1162
|
+
actor: "https://example.com/users/alice",
|
1163
|
+
object: {
|
1164
|
+
type: "Note",
|
1165
|
+
content: "test"
|
1166
|
+
}
|
1167
|
+
},
|
1168
|
+
activityType: "https://www.w3.org/ns/activitystreams#Create",
|
1169
|
+
inbox: "https://invalid-domain-that-does-not-exist.example/inbox",
|
1170
|
+
sharedInbox: false,
|
1171
|
+
started: (/* @__PURE__ */ new Date()).toISOString(),
|
1172
|
+
attempt: 0,
|
1173
|
+
headers: {},
|
1174
|
+
traceContext: {}
|
1175
|
+
};
|
1176
|
+
await federation.processQueuedTask(void 0, outboxMessage);
|
1177
|
+
assertEquals(queuedMessages, [{
|
1178
|
+
...outboxMessage,
|
1179
|
+
attempt: 1
|
1180
|
+
}]);
|
1181
|
+
queuedMessages = [];
|
1182
|
+
const inboxMessage = {
|
1183
|
+
type: "inbox",
|
1184
|
+
id: crypto.randomUUID(),
|
1185
|
+
baseUrl: "https://example.com",
|
1186
|
+
activity: {
|
1187
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
1188
|
+
type: "Create",
|
1189
|
+
actor: "https://remote.example/users/alice",
|
1190
|
+
object: {
|
1191
|
+
type: "Note",
|
1192
|
+
content: "Hello world"
|
1193
|
+
}
|
1194
|
+
},
|
1195
|
+
started: (/* @__PURE__ */ new Date()).toISOString(),
|
1196
|
+
attempt: 0,
|
1197
|
+
identifier: null,
|
1198
|
+
traceContext: {}
|
1199
|
+
};
|
1200
|
+
await federation.processQueuedTask(void 0, inboxMessage);
|
1201
|
+
assertEquals(queuedMessages, [{
|
1202
|
+
...inboxMessage,
|
1203
|
+
attempt: 1
|
1204
|
+
}]);
|
1205
|
+
});
|
1206
|
+
});
|
1071
1207
|
test("ContextImpl.lookupObject()", async (t) => {
|
1072
1208
|
esm_default.spyGlobal();
|
1073
1209
|
esm_default.get("begin:https://localhost/.well-known/webfinger", {
|
package/dist/federation/mod.d.ts
CHANGED
@@ -9,7 +9,7 @@ import "../http-BkUCISGt.js";
|
|
9
9
|
import "../owner-CbRc94FP.js";
|
10
10
|
import "../mod-DSPyncxx.js";
|
11
11
|
import "../lookup-vJccIKCS.js";
|
12
|
-
import { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../context-
|
13
|
-
import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "../mq-
|
12
|
+
import { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../context-DdICJaUT.js";
|
13
|
+
import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "../mq-DYKDDJmp.js";
|
14
14
|
import "../mod-g0xFzAP9.js";
|
15
15
|
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreSetOptions, MemoryKvStore, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|
package/dist/federation/mod.js
CHANGED
@@ -3,16 +3,16 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
5
|
import "../transformers-ghwJuzGY.js";
|
6
|
-
import "../docloader-
|
7
|
-
import "../actor-
|
8
|
-
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-
|
9
|
-
import "../lookup-
|
10
|
-
import "../key-
|
11
|
-
import "../http-
|
12
|
-
import "../proof-
|
13
|
-
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-
|
14
|
-
import "../types-
|
15
|
-
import "../authdocloader-
|
16
|
-
import "../vocab-
|
6
|
+
import "../docloader-DzFFH1W2.js";
|
7
|
+
import "../actor-DzovCADh.js";
|
8
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-BHUKqYhG.js";
|
9
|
+
import "../lookup-Bd837Vtz.js";
|
10
|
+
import "../key-DZsyKwhm.js";
|
11
|
+
import "../http-Jpv_4K_J.js";
|
12
|
+
import "../proof-8JRtgDVK.js";
|
13
|
+
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-lZOZyLAo.js";
|
14
|
+
import "../types-BPJDfFPR.js";
|
15
|
+
import "../authdocloader-DiYcSM7x.js";
|
16
|
+
import "../vocab-s_hECEtk.js";
|
17
17
|
|
18
18
|
export { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|