@fedify/fedify 2.1.0-dev.600 → 2.1.1
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-Bh4V08tZ.js → builder-DbKYZdSy.js} +3 -3
- package/dist/compat/transformers.test.js +11 -11
- package/dist/{deno-Bim3rlLr.js → deno-DH972JvX.js} +1 -1
- package/dist/{docloader-BK7cvwy_.js → docloader-Ck0SCLXX.js} +2 -2
- package/dist/federation/builder.test.js +3 -3
- package/dist/federation/handler.test.js +11 -11
- package/dist/federation/idempotency.test.js +11 -11
- package/dist/federation/inbox.test.js +2 -2
- package/dist/federation/middleware.test.js +11 -11
- package/dist/federation/mod.cjs +4 -4
- package/dist/federation/mod.js +4 -4
- package/dist/federation/send.test.js +5 -5
- package/dist/federation/webfinger.test.js +11 -11
- package/dist/{http-CTsTgKmg.js → http-DFzT4YFG.js} +18 -6
- package/dist/{http-Bgir8SFH.js → http-EUQ6crVa.js} +17 -6
- package/dist/{http-B2ESb34f.cjs → http-ca2xny58.cjs} +17 -6
- package/dist/{inbox-DC4Qg9mJ.js → inbox-BMLz_-pL.js} +1 -1
- package/dist/{key-Cl5HlUlA.js → key-CypuWa94.js} +1 -1
- package/dist/{kv-cache-FoyLv1vG.cjs → kv-cache-BBJFLMW5.cjs} +1 -1
- package/dist/{kv-cache-4IgiTTgI.js → kv-cache-SKgbvvu4.js} +1 -1
- package/dist/{ld-Dp26r9ov.js → ld-CXLtTc0G.js} +2 -2
- package/dist/{middleware-M4BTbUNF.js → middleware-B8FJuMM0.js} +11 -11
- package/dist/{middleware-Bv3gjxTf.js → middleware-BHJ0xm0L.js} +10 -10
- package/dist/{middleware-CBZsTtpo.js → middleware-BVp930fR.js} +4 -4
- package/dist/middleware-BvGP-uXy.cjs +12 -0
- package/dist/{middleware-dCLPVGcv.cjs → middleware-CL6XaAFy.cjs} +5 -5
- package/dist/{middleware-DJXSIBK6.js → middleware-CvS6hWm3.js} +5 -5
- package/dist/mod.cjs +4 -4
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/handler.test.js +11 -11
- package/dist/{owner-UHpXyizV.js → owner-CwMai3jn.js} +1 -1
- package/dist/{proof-CFKWnAyZ.js → proof-6Zw1FW7t.js} +2 -2
- package/dist/{proof-nQFg5tNK.js → proof-ZuJBOUoi.js} +2 -2
- package/dist/{proof-CzpgAyMy.cjs → proof-sCID81Ua.cjs} +2 -2
- package/dist/{send-D2I9PCVX.js → send-BW73dy6Q.js} +2 -2
- package/dist/sig/http.test.js +46 -3
- package/dist/sig/key.test.js +2 -2
- package/dist/sig/ld.test.js +3 -3
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.js +3 -3
- package/dist/sig/proof.test.js +3 -3
- package/dist/utils/docloader.test.js +4 -4
- package/dist/utils/mod.cjs +2 -2
- package/dist/utils/mod.js +2 -2
- package/package.json +5 -5
- package/dist/middleware-CVF3BKks.cjs +0 -12
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./deno-
|
|
6
|
+
import { deno_default } from "./deno-DH972JvX.js";
|
|
7
7
|
import { Router, RouterError } from "./router-D9eI0s4b.js";
|
|
8
|
-
import { InboxListenerSet } from "./inbox-
|
|
8
|
+
import { InboxListenerSet } from "./inbox-BMLz_-pL.js";
|
|
9
9
|
import { getTypeId } from "@fedify/vocab";
|
|
10
10
|
import { getLogger } from "@logtape/logtape";
|
|
11
11
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -46,7 +46,7 @@ var FederationBuilderImpl = class {
|
|
|
46
46
|
this.collectionTypeIds = {};
|
|
47
47
|
}
|
|
48
48
|
async build(options) {
|
|
49
|
-
const { FederationImpl } = await import("./middleware-
|
|
49
|
+
const { FederationImpl } = await import("./middleware-B8FJuMM0.js");
|
|
50
50
|
const f = new FederationImpl(options);
|
|
51
51
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
52
52
|
f.router = this.router.clone();
|
|
@@ -7,26 +7,26 @@ import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
|
7
7
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
8
8
|
import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
|
|
9
9
|
import { MemoryKvStore } from "../kv-QzKcOQgP.js";
|
|
10
|
-
import "../deno-
|
|
11
|
-
import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-
|
|
10
|
+
import "../deno-DH972JvX.js";
|
|
11
|
+
import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-BHJ0xm0L.js";
|
|
12
12
|
import "../client-CoCIaTNO.js";
|
|
13
13
|
import "../router-D9eI0s4b.js";
|
|
14
14
|
import "../types-CPz01LGH.js";
|
|
15
15
|
import "../accept-D7sAxyNa.js";
|
|
16
|
-
import "../key-
|
|
17
|
-
import "../http-
|
|
18
|
-
import "../ld-
|
|
19
|
-
import "../owner-
|
|
20
|
-
import "../proof-
|
|
21
|
-
import "../docloader-
|
|
16
|
+
import "../key-CypuWa94.js";
|
|
17
|
+
import "../http-DFzT4YFG.js";
|
|
18
|
+
import "../ld-CXLtTc0G.js";
|
|
19
|
+
import "../owner-CwMai3jn.js";
|
|
20
|
+
import "../proof-ZuJBOUoi.js";
|
|
21
|
+
import "../docloader-Ck0SCLXX.js";
|
|
22
22
|
import "../kv-cache-Bw2F2ABq.js";
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
23
|
+
import "../inbox-BMLz_-pL.js";
|
|
24
|
+
import "../builder-DbKYZdSy.js";
|
|
25
25
|
import "../collection-CSzG2j1P.js";
|
|
26
26
|
import "../keycache-CpGWAUbj.js";
|
|
27
27
|
import "../negotiation-BlAuS_nr.js";
|
|
28
28
|
import "../retry-mqLf4b-R.js";
|
|
29
|
-
import "../send-
|
|
29
|
+
import "../send-BW73dy6Q.js";
|
|
30
30
|
import { test } from "@fedify/fixture";
|
|
31
31
|
import { Follow, Person } from "@fedify/vocab";
|
|
32
32
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { validateCryptoKey } from "./key-
|
|
7
|
-
import { doubleKnock } from "./http-
|
|
6
|
+
import { validateCryptoKey } from "./key-CypuWa94.js";
|
|
7
|
+
import { doubleKnock } from "./http-DFzT4YFG.js";
|
|
8
8
|
import { curry } from "es-toolkit";
|
|
9
9
|
import { UrlError, createActivityPubRequest, getRemoteDocument, logRequest, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
10
10
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -7,10 +7,10 @@ import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
|
7
7
|
import "../assert-MZs1qjMx.js";
|
|
8
8
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
9
9
|
import { MemoryKvStore } from "../kv-QzKcOQgP.js";
|
|
10
|
-
import "../deno-
|
|
10
|
+
import "../deno-DH972JvX.js";
|
|
11
11
|
import "../router-D9eI0s4b.js";
|
|
12
|
-
import "../inbox-
|
|
13
|
-
import { createFederationBuilder } from "../builder-
|
|
12
|
+
import "../inbox-BMLz_-pL.js";
|
|
13
|
+
import { createFederationBuilder } from "../builder-DbKYZdSy.js";
|
|
14
14
|
import { assertExists } from "../std__assert-X-_kMxKM.js";
|
|
15
15
|
import "../assert_rejects-0h7I2Esa.js";
|
|
16
16
|
import { assertThrows } from "../assert_throws-rjdMBf31.js";
|
|
@@ -7,26 +7,26 @@ import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
|
7
7
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
8
8
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
9
9
|
import { MemoryKvStore } from "../kv-QzKcOQgP.js";
|
|
10
|
-
import "../deno-
|
|
11
|
-
import { createFederation, handleActor, handleCollection, handleCustomCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-
|
|
10
|
+
import "../deno-DH972JvX.js";
|
|
11
|
+
import { createFederation, handleActor, handleCollection, handleCustomCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-BHJ0xm0L.js";
|
|
12
12
|
import "../client-CoCIaTNO.js";
|
|
13
13
|
import "../router-D9eI0s4b.js";
|
|
14
14
|
import "../types-CPz01LGH.js";
|
|
15
15
|
import { parseAcceptSignature } from "../accept-D7sAxyNa.js";
|
|
16
|
-
import "../key-
|
|
17
|
-
import { signRequest } from "../http-
|
|
18
|
-
import "../ld-
|
|
19
|
-
import "../owner-
|
|
20
|
-
import "../proof-
|
|
21
|
-
import "../docloader-
|
|
16
|
+
import "../key-CypuWa94.js";
|
|
17
|
+
import { signRequest } from "../http-DFzT4YFG.js";
|
|
18
|
+
import "../ld-CXLtTc0G.js";
|
|
19
|
+
import "../owner-CwMai3jn.js";
|
|
20
|
+
import "../proof-ZuJBOUoi.js";
|
|
21
|
+
import "../docloader-Ck0SCLXX.js";
|
|
22
22
|
import "../kv-cache-Bw2F2ABq.js";
|
|
23
|
-
import { InboxListenerSet } from "../inbox-
|
|
24
|
-
import "../builder-
|
|
23
|
+
import { InboxListenerSet } from "../inbox-BMLz_-pL.js";
|
|
24
|
+
import "../builder-DbKYZdSy.js";
|
|
25
25
|
import "../collection-CSzG2j1P.js";
|
|
26
26
|
import "../keycache-CpGWAUbj.js";
|
|
27
27
|
import "../negotiation-BlAuS_nr.js";
|
|
28
28
|
import "../retry-mqLf4b-R.js";
|
|
29
|
-
import "../send-
|
|
29
|
+
import "../send-BW73dy6Q.js";
|
|
30
30
|
import "../std__assert-X-_kMxKM.js";
|
|
31
31
|
import "../assert_rejects-0h7I2Esa.js";
|
|
32
32
|
import "../assert_throws-rjdMBf31.js";
|
|
@@ -7,26 +7,26 @@ import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
|
7
7
|
import "../assert-MZs1qjMx.js";
|
|
8
8
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
9
9
|
import { MemoryKvStore } from "../kv-QzKcOQgP.js";
|
|
10
|
-
import "../deno-
|
|
11
|
-
import { createFederation } from "../middleware-
|
|
10
|
+
import "../deno-DH972JvX.js";
|
|
11
|
+
import { createFederation } from "../middleware-BHJ0xm0L.js";
|
|
12
12
|
import "../client-CoCIaTNO.js";
|
|
13
13
|
import "../router-D9eI0s4b.js";
|
|
14
14
|
import "../types-CPz01LGH.js";
|
|
15
15
|
import "../accept-D7sAxyNa.js";
|
|
16
|
-
import "../key-
|
|
17
|
-
import "../http-
|
|
18
|
-
import "../ld-
|
|
19
|
-
import "../owner-
|
|
20
|
-
import { signObject } from "../proof-
|
|
21
|
-
import "../docloader-
|
|
16
|
+
import "../key-CypuWa94.js";
|
|
17
|
+
import "../http-DFzT4YFG.js";
|
|
18
|
+
import "../ld-CXLtTc0G.js";
|
|
19
|
+
import "../owner-CwMai3jn.js";
|
|
20
|
+
import { signObject } from "../proof-ZuJBOUoi.js";
|
|
21
|
+
import "../docloader-Ck0SCLXX.js";
|
|
22
22
|
import "../kv-cache-Bw2F2ABq.js";
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
23
|
+
import "../inbox-BMLz_-pL.js";
|
|
24
|
+
import "../builder-DbKYZdSy.js";
|
|
25
25
|
import "../collection-CSzG2j1P.js";
|
|
26
26
|
import "../keycache-CpGWAUbj.js";
|
|
27
27
|
import "../negotiation-BlAuS_nr.js";
|
|
28
28
|
import "../retry-mqLf4b-R.js";
|
|
29
|
-
import "../send-
|
|
29
|
+
import "../send-BW73dy6Q.js";
|
|
30
30
|
import "../std__assert-X-_kMxKM.js";
|
|
31
31
|
import "../assert_rejects-0h7I2Esa.js";
|
|
32
32
|
import "../assert_throws-rjdMBf31.js";
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
6
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
7
|
-
import "../deno-
|
|
8
|
-
import { InboxListenerSet } from "../inbox-
|
|
7
|
+
import "../deno-DH972JvX.js";
|
|
8
|
+
import { InboxListenerSet } from "../inbox-BMLz_-pL.js";
|
|
9
9
|
import { assertThrows } from "../assert_throws-rjdMBf31.js";
|
|
10
10
|
import { test } from "@fedify/fixture";
|
|
11
11
|
import { Activity, Create, Invite, Offer, Update } from "@fedify/vocab";
|
|
@@ -8,26 +8,26 @@ import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
9
|
import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
|
|
10
10
|
import { MemoryKvStore } from "../kv-QzKcOQgP.js";
|
|
11
|
-
import "../deno-
|
|
12
|
-
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-
|
|
11
|
+
import "../deno-DH972JvX.js";
|
|
12
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-BHJ0xm0L.js";
|
|
13
13
|
import "../client-CoCIaTNO.js";
|
|
14
14
|
import { RouterError } from "../router-D9eI0s4b.js";
|
|
15
15
|
import "../types-CPz01LGH.js";
|
|
16
16
|
import "../accept-D7sAxyNa.js";
|
|
17
|
-
import "../key-
|
|
18
|
-
import { signRequest, verifyRequest } from "../http-
|
|
19
|
-
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-
|
|
20
|
-
import { doesActorOwnKey } from "../owner-
|
|
21
|
-
import { signObject, verifyObject } from "../proof-
|
|
22
|
-
import { getAuthenticatedDocumentLoader } from "../docloader-
|
|
17
|
+
import "../key-CypuWa94.js";
|
|
18
|
+
import { signRequest, verifyRequest } from "../http-DFzT4YFG.js";
|
|
19
|
+
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-CXLtTc0G.js";
|
|
20
|
+
import { doesActorOwnKey } from "../owner-CwMai3jn.js";
|
|
21
|
+
import { signObject, verifyObject } from "../proof-ZuJBOUoi.js";
|
|
22
|
+
import { getAuthenticatedDocumentLoader } from "../docloader-Ck0SCLXX.js";
|
|
23
23
|
import "../kv-cache-Bw2F2ABq.js";
|
|
24
|
-
import "../inbox-
|
|
25
|
-
import "../builder-
|
|
24
|
+
import "../inbox-BMLz_-pL.js";
|
|
25
|
+
import "../builder-DbKYZdSy.js";
|
|
26
26
|
import "../collection-CSzG2j1P.js";
|
|
27
27
|
import "../keycache-CpGWAUbj.js";
|
|
28
28
|
import "../negotiation-BlAuS_nr.js";
|
|
29
29
|
import "../retry-mqLf4b-R.js";
|
|
30
|
-
import "../send-
|
|
30
|
+
import "../send-BW73dy6Q.js";
|
|
31
31
|
import { assertStrictEquals } from "../std__assert-X-_kMxKM.js";
|
|
32
32
|
import { assertFalse, assertRejects } from "../assert_rejects-0h7I2Esa.js";
|
|
33
33
|
import { assertThrows } from "../assert_throws-rjdMBf31.js";
|
package/dist/federation/mod.cjs
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
5
|
require('../transformers-3g8GZwkZ.cjs');
|
|
6
|
-
require('../http-
|
|
7
|
-
const require_middleware = require('../middleware-
|
|
8
|
-
require('../proof-
|
|
6
|
+
require('../http-ca2xny58.cjs');
|
|
7
|
+
const require_middleware = require('../middleware-CL6XaAFy.cjs');
|
|
8
|
+
require('../proof-sCID81Ua.cjs');
|
|
9
9
|
const require_federation = require('../federation-Bp3HI26G.cjs');
|
|
10
10
|
require('../types-Cd_hszr_.cjs');
|
|
11
|
-
require('../kv-cache-
|
|
11
|
+
require('../kv-cache-BBJFLMW5.cjs');
|
|
12
12
|
|
|
13
13
|
exports.InProcessMessageQueue = require_federation.InProcessMessageQueue;
|
|
14
14
|
exports.MemoryKvStore = require_federation.MemoryKvStore;
|
package/dist/federation/mod.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
5
|
import "../transformers-C3FLHUd6.js";
|
|
6
|
-
import "../http-
|
|
7
|
-
import { Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-
|
|
8
|
-
import "../proof-
|
|
6
|
+
import "../http-EUQ6crVa.js";
|
|
7
|
+
import { Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-CvS6hWm3.js";
|
|
8
|
+
import "../proof-6Zw1FW7t.js";
|
|
9
9
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "../federation-DaMfqRm4.js";
|
|
10
10
|
import "../types-C93Ob9cU.js";
|
|
11
|
-
import "../kv-cache-
|
|
11
|
+
import "../kv-cache-SKgbvvu4.js";
|
|
12
12
|
|
|
13
13
|
export { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue, Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable };
|
|
@@ -7,12 +7,12 @@ import { esm_default } from "../esm-nLm00z9V.js";
|
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
9
|
import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import "../deno-
|
|
10
|
+
import "../deno-DH972JvX.js";
|
|
11
11
|
import "../accept-D7sAxyNa.js";
|
|
12
|
-
import "../key-
|
|
13
|
-
import { verifyRequest } from "../http-
|
|
14
|
-
import { doesActorOwnKey } from "../owner-
|
|
15
|
-
import { SendActivityError, extractInboxes, sendActivity } from "../send-
|
|
12
|
+
import "../key-CypuWa94.js";
|
|
13
|
+
import { verifyRequest } from "../http-DFzT4YFG.js";
|
|
14
|
+
import { doesActorOwnKey } from "../owner-CwMai3jn.js";
|
|
15
|
+
import { SendActivityError, extractInboxes, sendActivity } from "../send-BW73dy6Q.js";
|
|
16
16
|
import "../std__assert-X-_kMxKM.js";
|
|
17
17
|
import { assertFalse, assertRejects } from "../assert_rejects-0h7I2Esa.js";
|
|
18
18
|
import "../assert_throws-rjdMBf31.js";
|
|
@@ -7,26 +7,26 @@ import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
|
7
7
|
import "../assert-MZs1qjMx.js";
|
|
8
8
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
9
9
|
import { MemoryKvStore } from "../kv-QzKcOQgP.js";
|
|
10
|
-
import "../deno-
|
|
11
|
-
import { createFederation, handleWebFinger } from "../middleware-
|
|
10
|
+
import "../deno-DH972JvX.js";
|
|
11
|
+
import { createFederation, handleWebFinger } from "../middleware-BHJ0xm0L.js";
|
|
12
12
|
import "../client-CoCIaTNO.js";
|
|
13
13
|
import "../router-D9eI0s4b.js";
|
|
14
14
|
import "../types-CPz01LGH.js";
|
|
15
15
|
import "../accept-D7sAxyNa.js";
|
|
16
|
-
import "../key-
|
|
17
|
-
import "../http-
|
|
18
|
-
import "../ld-
|
|
19
|
-
import "../owner-
|
|
20
|
-
import "../proof-
|
|
21
|
-
import "../docloader-
|
|
16
|
+
import "../key-CypuWa94.js";
|
|
17
|
+
import "../http-DFzT4YFG.js";
|
|
18
|
+
import "../ld-CXLtTc0G.js";
|
|
19
|
+
import "../owner-CwMai3jn.js";
|
|
20
|
+
import "../proof-ZuJBOUoi.js";
|
|
21
|
+
import "../docloader-Ck0SCLXX.js";
|
|
22
22
|
import "../kv-cache-Bw2F2ABq.js";
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
23
|
+
import "../inbox-BMLz_-pL.js";
|
|
24
|
+
import "../builder-DbKYZdSy.js";
|
|
25
25
|
import "../collection-CSzG2j1P.js";
|
|
26
26
|
import "../keycache-CpGWAUbj.js";
|
|
27
27
|
import "../negotiation-BlAuS_nr.js";
|
|
28
28
|
import "../retry-mqLf4b-R.js";
|
|
29
|
-
import "../send-
|
|
29
|
+
import "../send-BW73dy6Q.js";
|
|
30
30
|
import "../std__assert-X-_kMxKM.js";
|
|
31
31
|
import "../assert_rejects-0h7I2Esa.js";
|
|
32
32
|
import "../assert_throws-rjdMBf31.js";
|
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./deno-
|
|
6
|
+
import { deno_default } from "./deno-DH972JvX.js";
|
|
7
7
|
import { fulfillAcceptSignature, parseAcceptSignature, validateAcceptSignature } from "./accept-D7sAxyNa.js";
|
|
8
|
-
import { fetchKeyDetailed, validateCryptoKey } from "./key-
|
|
8
|
+
import { fetchKeyDetailed, validateCryptoKey } from "./key-CypuWa94.js";
|
|
9
9
|
import { CryptographicKey } from "@fedify/vocab";
|
|
10
|
+
import { FetchError } from "@fedify/vocab-runtime";
|
|
10
11
|
import { getLogger } from "@logtape/logtape";
|
|
11
12
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
12
13
|
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
|
@@ -15,6 +16,7 @@ import { encodeHex } from "byte-encodings/hex";
|
|
|
15
16
|
import { Item, decodeDict, encodeItem } from "structured-field-values";
|
|
16
17
|
|
|
17
18
|
//#region src/sig/http.ts
|
|
19
|
+
const DEFAULT_MAX_REDIRECTION = 20;
|
|
18
20
|
/**
|
|
19
21
|
* Signs a request using the given private key.
|
|
20
22
|
* @param request The request to sign.
|
|
@@ -865,7 +867,11 @@ function createRedirectRequest(request, location, body) {
|
|
|
865
867
|
* @since 1.6.0
|
|
866
868
|
*/
|
|
867
869
|
async function doubleKnock(request, identity, options = {}) {
|
|
870
|
+
return await doubleKnockInternal(request, identity, options);
|
|
871
|
+
}
|
|
872
|
+
async function doubleKnockInternal(request, identity, options, redirected = 0, visited = /* @__PURE__ */ new Set()) {
|
|
868
873
|
const { specDeterminer, log, tracerProvider, signal } = options;
|
|
874
|
+
visited.add(request.url);
|
|
869
875
|
const origin = new URL(request.url).origin;
|
|
870
876
|
const firstTrySpec = specDeterminer == null ? "rfc9421" : await specDeterminer.determineSpec(origin);
|
|
871
877
|
const body = options.body !== void 0 ? options.body : request.method !== "GET" && request.method !== "HEAD" ? await request.clone().arrayBuffer() : null;
|
|
@@ -880,11 +886,14 @@ async function doubleKnock(request, identity, options = {}) {
|
|
|
880
886
|
signal
|
|
881
887
|
});
|
|
882
888
|
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
|
|
889
|
+
if (redirected >= DEFAULT_MAX_REDIRECTION) throw new FetchError(request.url, `Too many redirections (${redirected + 1})`);
|
|
883
890
|
const location = response.headers.get("Location");
|
|
884
|
-
|
|
891
|
+
const redirectRequest = createRedirectRequest(request, location, body);
|
|
892
|
+
if (visited.has(redirectRequest.url)) throw new FetchError(request.url, `Redirect loop detected: ${redirectRequest.url}`);
|
|
893
|
+
return doubleKnockInternal(redirectRequest, identity, {
|
|
885
894
|
...options,
|
|
886
895
|
body
|
|
887
|
-
});
|
|
896
|
+
}, redirected + 1, visited);
|
|
888
897
|
} else if (response.status === 400 || response.status === 401 || response.status > 401) {
|
|
889
898
|
const logger = getLogger([
|
|
890
899
|
"fedify",
|
|
@@ -959,11 +968,14 @@ async function doubleKnock(request, identity, options = {}) {
|
|
|
959
968
|
signal
|
|
960
969
|
});
|
|
961
970
|
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
|
|
971
|
+
if (redirected >= DEFAULT_MAX_REDIRECTION) throw new FetchError(request.url, `Too many redirections (${redirected + 1})`);
|
|
962
972
|
const location = response.headers.get("Location");
|
|
963
|
-
|
|
973
|
+
const redirectRequest = createRedirectRequest(request, location, body);
|
|
974
|
+
if (visited.has(redirectRequest.url)) throw new FetchError(request.url, `Redirect loop detected: ${redirectRequest.url}`);
|
|
975
|
+
return doubleKnockInternal(redirectRequest, identity, {
|
|
964
976
|
...options,
|
|
965
977
|
body
|
|
966
|
-
});
|
|
978
|
+
}, redirected + 1, visited);
|
|
967
979
|
} else if (response.status !== 400 && response.status !== 401) await specDeterminer?.rememberSpec(origin, spec);
|
|
968
980
|
} else await specDeterminer?.rememberSpec(origin, firstTrySpec);
|
|
969
981
|
return response;
|
|
@@ -7,13 +7,13 @@ import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { encodeHex } from "byte-encodings/hex";
|
|
9
9
|
import { Item, decodeDict, encodeDict, encodeItem } from "structured-field-values";
|
|
10
|
+
import { FetchError, getDocumentLoader } from "@fedify/vocab-runtime";
|
|
10
11
|
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
|
11
12
|
import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
|
12
|
-
import { FetchError, getDocumentLoader } from "@fedify/vocab-runtime";
|
|
13
13
|
|
|
14
14
|
//#region deno.json
|
|
15
15
|
var name = "@fedify/fedify";
|
|
16
|
-
var version = "2.1.
|
|
16
|
+
var version = "2.1.1";
|
|
17
17
|
var license = "MIT";
|
|
18
18
|
var exports = {
|
|
19
19
|
".": "./src/mod.ts",
|
|
@@ -609,6 +609,7 @@ async function fetchKeyInternal(keyId, cls, options = {}) {
|
|
|
609
609
|
|
|
610
610
|
//#endregion
|
|
611
611
|
//#region src/sig/http.ts
|
|
612
|
+
const DEFAULT_MAX_REDIRECTION = 20;
|
|
612
613
|
/**
|
|
613
614
|
* Signs a request using the given private key.
|
|
614
615
|
* @param request The request to sign.
|
|
@@ -1459,7 +1460,11 @@ function createRedirectRequest(request, location, body) {
|
|
|
1459
1460
|
* @since 1.6.0
|
|
1460
1461
|
*/
|
|
1461
1462
|
async function doubleKnock(request, identity, options = {}) {
|
|
1463
|
+
return await doubleKnockInternal(request, identity, options);
|
|
1464
|
+
}
|
|
1465
|
+
async function doubleKnockInternal(request, identity, options, redirected = 0, visited = /* @__PURE__ */ new Set()) {
|
|
1462
1466
|
const { specDeterminer, log, tracerProvider, signal } = options;
|
|
1467
|
+
visited.add(request.url);
|
|
1463
1468
|
const origin = new URL(request.url).origin;
|
|
1464
1469
|
const firstTrySpec = specDeterminer == null ? "rfc9421" : await specDeterminer.determineSpec(origin);
|
|
1465
1470
|
const body = options.body !== void 0 ? options.body : request.method !== "GET" && request.method !== "HEAD" ? await request.clone().arrayBuffer() : null;
|
|
@@ -1474,11 +1479,14 @@ async function doubleKnock(request, identity, options = {}) {
|
|
|
1474
1479
|
signal
|
|
1475
1480
|
});
|
|
1476
1481
|
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
|
|
1482
|
+
if (redirected >= DEFAULT_MAX_REDIRECTION) throw new FetchError(request.url, `Too many redirections (${redirected + 1})`);
|
|
1477
1483
|
const location = response.headers.get("Location");
|
|
1478
|
-
|
|
1484
|
+
const redirectRequest = createRedirectRequest(request, location, body);
|
|
1485
|
+
if (visited.has(redirectRequest.url)) throw new FetchError(request.url, `Redirect loop detected: ${redirectRequest.url}`);
|
|
1486
|
+
return doubleKnockInternal(redirectRequest, identity, {
|
|
1479
1487
|
...options,
|
|
1480
1488
|
body
|
|
1481
|
-
});
|
|
1489
|
+
}, redirected + 1, visited);
|
|
1482
1490
|
} else if (response.status === 400 || response.status === 401 || response.status > 401) {
|
|
1483
1491
|
const logger = getLogger([
|
|
1484
1492
|
"fedify",
|
|
@@ -1553,11 +1561,14 @@ async function doubleKnock(request, identity, options = {}) {
|
|
|
1553
1561
|
signal
|
|
1554
1562
|
});
|
|
1555
1563
|
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
|
|
1564
|
+
if (redirected >= DEFAULT_MAX_REDIRECTION) throw new FetchError(request.url, `Too many redirections (${redirected + 1})`);
|
|
1556
1565
|
const location = response.headers.get("Location");
|
|
1557
|
-
|
|
1566
|
+
const redirectRequest = createRedirectRequest(request, location, body);
|
|
1567
|
+
if (visited.has(redirectRequest.url)) throw new FetchError(request.url, `Redirect loop detected: ${redirectRequest.url}`);
|
|
1568
|
+
return doubleKnockInternal(redirectRequest, identity, {
|
|
1558
1569
|
...options,
|
|
1559
1570
|
body
|
|
1560
|
-
});
|
|
1571
|
+
}, redirected + 1, visited);
|
|
1561
1572
|
} else if (response.status !== 400 && response.status !== 401) await specDeterminer?.rememberSpec(origin, spec);
|
|
1562
1573
|
} else await specDeterminer?.rememberSpec(origin, firstTrySpec);
|
|
1563
1574
|
return response;
|
|
@@ -8,13 +8,13 @@ const __fedify_vocab = require_chunk.__toESM(require("@fedify/vocab"));
|
|
|
8
8
|
const __opentelemetry_api = require_chunk.__toESM(require("@opentelemetry/api"));
|
|
9
9
|
const byte_encodings_hex = require_chunk.__toESM(require("byte-encodings/hex"));
|
|
10
10
|
const structured_field_values = require_chunk.__toESM(require("structured-field-values"));
|
|
11
|
+
const __fedify_vocab_runtime = require_chunk.__toESM(require("@fedify/vocab-runtime"));
|
|
11
12
|
const __opentelemetry_semantic_conventions = require_chunk.__toESM(require("@opentelemetry/semantic-conventions"));
|
|
12
13
|
const byte_encodings_base64 = require_chunk.__toESM(require("byte-encodings/base64"));
|
|
13
|
-
const __fedify_vocab_runtime = require_chunk.__toESM(require("@fedify/vocab-runtime"));
|
|
14
14
|
|
|
15
15
|
//#region deno.json
|
|
16
16
|
var name = "@fedify/fedify";
|
|
17
|
-
var version = "2.1.
|
|
17
|
+
var version = "2.1.1";
|
|
18
18
|
var license = "MIT";
|
|
19
19
|
var exports$1 = {
|
|
20
20
|
".": "./src/mod.ts",
|
|
@@ -610,6 +610,7 @@ async function fetchKeyInternal(keyId, cls, options = {}) {
|
|
|
610
610
|
|
|
611
611
|
//#endregion
|
|
612
612
|
//#region src/sig/http.ts
|
|
613
|
+
const DEFAULT_MAX_REDIRECTION = 20;
|
|
613
614
|
/**
|
|
614
615
|
* Signs a request using the given private key.
|
|
615
616
|
* @param request The request to sign.
|
|
@@ -1460,7 +1461,11 @@ function createRedirectRequest(request, location, body) {
|
|
|
1460
1461
|
* @since 1.6.0
|
|
1461
1462
|
*/
|
|
1462
1463
|
async function doubleKnock(request, identity, options = {}) {
|
|
1464
|
+
return await doubleKnockInternal(request, identity, options);
|
|
1465
|
+
}
|
|
1466
|
+
async function doubleKnockInternal(request, identity, options, redirected = 0, visited = /* @__PURE__ */ new Set()) {
|
|
1463
1467
|
const { specDeterminer, log, tracerProvider, signal } = options;
|
|
1468
|
+
visited.add(request.url);
|
|
1464
1469
|
const origin = new URL(request.url).origin;
|
|
1465
1470
|
const firstTrySpec = specDeterminer == null ? "rfc9421" : await specDeterminer.determineSpec(origin);
|
|
1466
1471
|
const body = options.body !== void 0 ? options.body : request.method !== "GET" && request.method !== "HEAD" ? await request.clone().arrayBuffer() : null;
|
|
@@ -1475,11 +1480,14 @@ async function doubleKnock(request, identity, options = {}) {
|
|
|
1475
1480
|
signal
|
|
1476
1481
|
});
|
|
1477
1482
|
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
|
|
1483
|
+
if (redirected >= DEFAULT_MAX_REDIRECTION) throw new __fedify_vocab_runtime.FetchError(request.url, `Too many redirections (${redirected + 1})`);
|
|
1478
1484
|
const location = response.headers.get("Location");
|
|
1479
|
-
|
|
1485
|
+
const redirectRequest = createRedirectRequest(request, location, body);
|
|
1486
|
+
if (visited.has(redirectRequest.url)) throw new __fedify_vocab_runtime.FetchError(request.url, `Redirect loop detected: ${redirectRequest.url}`);
|
|
1487
|
+
return doubleKnockInternal(redirectRequest, identity, {
|
|
1480
1488
|
...options,
|
|
1481
1489
|
body
|
|
1482
|
-
});
|
|
1490
|
+
}, redirected + 1, visited);
|
|
1483
1491
|
} else if (response.status === 400 || response.status === 401 || response.status > 401) {
|
|
1484
1492
|
const logger = (0, __logtape_logtape.getLogger)([
|
|
1485
1493
|
"fedify",
|
|
@@ -1554,11 +1562,14 @@ async function doubleKnock(request, identity, options = {}) {
|
|
|
1554
1562
|
signal
|
|
1555
1563
|
});
|
|
1556
1564
|
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
|
|
1565
|
+
if (redirected >= DEFAULT_MAX_REDIRECTION) throw new __fedify_vocab_runtime.FetchError(request.url, `Too many redirections (${redirected + 1})`);
|
|
1557
1566
|
const location = response.headers.get("Location");
|
|
1558
|
-
|
|
1567
|
+
const redirectRequest = createRedirectRequest(request, location, body);
|
|
1568
|
+
if (visited.has(redirectRequest.url)) throw new __fedify_vocab_runtime.FetchError(request.url, `Redirect loop detected: ${redirectRequest.url}`);
|
|
1569
|
+
return doubleKnockInternal(redirectRequest, identity, {
|
|
1559
1570
|
...options,
|
|
1560
1571
|
body
|
|
1561
|
-
});
|
|
1572
|
+
}, redirected + 1, visited);
|
|
1562
1573
|
} else if (response.status !== 400 && response.status !== 401) await specDeterminer?.rememberSpec(origin, spec);
|
|
1563
1574
|
} else await specDeterminer?.rememberSpec(origin, firstTrySpec);
|
|
1564
1575
|
return response;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./deno-
|
|
6
|
+
import { deno_default } from "./deno-DH972JvX.js";
|
|
7
7
|
import { Activity, getTypeId } from "@fedify/vocab";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./deno-
|
|
6
|
+
import { deno_default } from "./deno-DH972JvX.js";
|
|
7
7
|
import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
8
8
|
import { FetchError, getDocumentLoader } from "@fedify/vocab-runtime";
|
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
5
|
const require_chunk = require('./chunk-CGaQZ11T.cjs');
|
|
6
|
-
const require_http = require('./http-
|
|
6
|
+
const require_http = require('./http-ca2xny58.cjs');
|
|
7
7
|
const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
|
8
8
|
const es_toolkit = require_chunk.__toESM(require("es-toolkit"));
|
|
9
9
|
const __fedify_vocab_runtime = require_chunk.__toESM(require("@fedify/vocab-runtime"));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { doubleKnock, validateCryptoKey } from "./http-
|
|
5
|
+
import { doubleKnock, validateCryptoKey } from "./http-EUQ6crVa.js";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { curry } from "es-toolkit";
|
|
8
8
|
import { UrlError, createActivityPubRequest, getRemoteDocument, logRequest, preloadedContexts, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./deno-
|
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
|
6
|
+
import { deno_default } from "./deno-DH972JvX.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-CypuWa94.js";
|
|
8
8
|
import { Activity, CryptographicKey, Object as Object$1, getTypeId } from "@fedify/vocab";
|
|
9
9
|
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
10
10
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -3,25 +3,25 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "./deno-
|
|
7
|
-
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-
|
|
6
|
+
import "./deno-DH972JvX.js";
|
|
7
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-BHJ0xm0L.js";
|
|
8
8
|
import "./client-CoCIaTNO.js";
|
|
9
9
|
import "./router-D9eI0s4b.js";
|
|
10
10
|
import "./types-CPz01LGH.js";
|
|
11
11
|
import "./accept-D7sAxyNa.js";
|
|
12
|
-
import "./key-
|
|
13
|
-
import "./http-
|
|
14
|
-
import "./ld-
|
|
15
|
-
import "./owner-
|
|
16
|
-
import "./proof-
|
|
17
|
-
import "./docloader-
|
|
12
|
+
import "./key-CypuWa94.js";
|
|
13
|
+
import "./http-DFzT4YFG.js";
|
|
14
|
+
import "./ld-CXLtTc0G.js";
|
|
15
|
+
import "./owner-CwMai3jn.js";
|
|
16
|
+
import "./proof-ZuJBOUoi.js";
|
|
17
|
+
import "./docloader-Ck0SCLXX.js";
|
|
18
18
|
import "./kv-cache-Bw2F2ABq.js";
|
|
19
|
-
import "./inbox-
|
|
20
|
-
import "./builder-
|
|
19
|
+
import "./inbox-BMLz_-pL.js";
|
|
20
|
+
import "./builder-DbKYZdSy.js";
|
|
21
21
|
import "./collection-CSzG2j1P.js";
|
|
22
22
|
import "./keycache-CpGWAUbj.js";
|
|
23
23
|
import "./negotiation-BlAuS_nr.js";
|
|
24
24
|
import "./retry-mqLf4b-R.js";
|
|
25
|
-
import "./send-
|
|
25
|
+
import "./send-BW73dy6Q.js";
|
|
26
26
|
|
|
27
27
|
export { FederationImpl };
|
|
@@ -3,25 +3,25 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./deno-
|
|
6
|
+
import { deno_default } from "./deno-DH972JvX.js";
|
|
7
7
|
import { getNodeInfo } from "./client-CoCIaTNO.js";
|
|
8
8
|
import { RouterError } from "./router-D9eI0s4b.js";
|
|
9
9
|
import { nodeInfoToJson } from "./types-CPz01LGH.js";
|
|
10
10
|
import { formatAcceptSignature } from "./accept-D7sAxyNa.js";
|
|
11
|
-
import { exportJwk, importJwk, validateCryptoKey } from "./key-
|
|
12
|
-
import { parseRfc9421SignatureInput, verifyRequest, verifyRequestDetailed } from "./http-
|
|
13
|
-
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-
|
|
14
|
-
import { doesActorOwnKey, getKeyOwner } from "./owner-
|
|
15
|
-
import { signObject, verifyObject } from "./proof-
|
|
16
|
-
import { getAuthenticatedDocumentLoader } from "./docloader-
|
|
11
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-CypuWa94.js";
|
|
12
|
+
import { parseRfc9421SignatureInput, verifyRequest, verifyRequestDetailed } from "./http-DFzT4YFG.js";
|
|
13
|
+
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-CXLtTc0G.js";
|
|
14
|
+
import { doesActorOwnKey, getKeyOwner } from "./owner-CwMai3jn.js";
|
|
15
|
+
import { signObject, verifyObject } from "./proof-ZuJBOUoi.js";
|
|
16
|
+
import { getAuthenticatedDocumentLoader } from "./docloader-Ck0SCLXX.js";
|
|
17
17
|
import { kvCache } from "./kv-cache-Bw2F2ABq.js";
|
|
18
|
-
import { routeActivity } from "./inbox-
|
|
19
|
-
import { FederationBuilderImpl } from "./builder-
|
|
18
|
+
import { routeActivity } from "./inbox-BMLz_-pL.js";
|
|
19
|
+
import { FederationBuilderImpl } from "./builder-DbKYZdSy.js";
|
|
20
20
|
import { buildCollectionSynchronizationHeader } from "./collection-CSzG2j1P.js";
|
|
21
21
|
import { KvKeyCache } from "./keycache-CpGWAUbj.js";
|
|
22
22
|
import { acceptsJsonLd } from "./negotiation-BlAuS_nr.js";
|
|
23
23
|
import { createExponentialBackoffPolicy } from "./retry-mqLf4b-R.js";
|
|
24
|
-
import { SendActivityError, extractInboxes, sendActivity } from "./send-
|
|
24
|
+
import { SendActivityError, extractInboxes, sendActivity } from "./send-BW73dy6Q.js";
|
|
25
25
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
26
26
|
import { uniq } from "es-toolkit";
|
|
27
27
|
import { FetchError, getDocumentLoader } from "@fedify/vocab-runtime";
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
5
|
import "./transformers-C3FLHUd6.js";
|
|
6
|
-
import "./http-
|
|
7
|
-
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-
|
|
8
|
-
import "./proof-
|
|
6
|
+
import "./http-EUQ6crVa.js";
|
|
7
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-CvS6hWm3.js";
|
|
8
|
+
import "./proof-6Zw1FW7t.js";
|
|
9
9
|
import "./types-C93Ob9cU.js";
|
|
10
|
-
import "./kv-cache-
|
|
10
|
+
import "./kv-cache-SKgbvvu4.js";
|
|
11
11
|
|
|
12
12
|
export { FederationImpl };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
|
3
|
+
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
|
+
|
|
5
|
+
require('./transformers-3g8GZwkZ.cjs');
|
|
6
|
+
require('./http-ca2xny58.cjs');
|
|
7
|
+
const require_middleware = require('./middleware-CL6XaAFy.cjs');
|
|
8
|
+
require('./proof-sCID81Ua.cjs');
|
|
9
|
+
require('./types-Cd_hszr_.cjs');
|
|
10
|
+
require('./kv-cache-BBJFLMW5.cjs');
|
|
11
|
+
|
|
12
|
+
exports.FederationImpl = require_middleware.FederationImpl;
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
const require_chunk = require('./chunk-CGaQZ11T.cjs');
|
|
6
6
|
const require_transformers = require('./transformers-3g8GZwkZ.cjs');
|
|
7
|
-
const require_http = require('./http-
|
|
8
|
-
const require_proof = require('./proof-
|
|
7
|
+
const require_http = require('./http-ca2xny58.cjs');
|
|
8
|
+
const require_proof = require('./proof-sCID81Ua.cjs');
|
|
9
9
|
const require_types = require('./types-Cd_hszr_.cjs');
|
|
10
|
-
const require_kv_cache = require('./kv-cache-
|
|
10
|
+
const require_kv_cache = require('./kv-cache-BBJFLMW5.cjs');
|
|
11
11
|
const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
|
12
12
|
const __fedify_vocab = require_chunk.__toESM(require("@fedify/vocab"));
|
|
13
13
|
const __opentelemetry_api = require_chunk.__toESM(require("@opentelemetry/api"));
|
|
@@ -15,8 +15,8 @@ const es_toolkit = require_chunk.__toESM(require("es-toolkit"));
|
|
|
15
15
|
const uri_template_router = require_chunk.__toESM(require("uri-template-router"));
|
|
16
16
|
const url_template = require_chunk.__toESM(require("url-template"));
|
|
17
17
|
const byte_encodings_hex = require_chunk.__toESM(require("byte-encodings/hex"));
|
|
18
|
-
const __opentelemetry_semantic_conventions = require_chunk.__toESM(require("@opentelemetry/semantic-conventions"));
|
|
19
18
|
const __fedify_vocab_runtime = require_chunk.__toESM(require("@fedify/vocab-runtime"));
|
|
19
|
+
const __opentelemetry_semantic_conventions = require_chunk.__toESM(require("@opentelemetry/semantic-conventions"));
|
|
20
20
|
const __fedify_webfinger = require_chunk.__toESM(require("@fedify/webfinger"));
|
|
21
21
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
22
22
|
|
|
@@ -340,7 +340,7 @@ var FederationBuilderImpl = class {
|
|
|
340
340
|
this.collectionTypeIds = {};
|
|
341
341
|
}
|
|
342
342
|
async build(options) {
|
|
343
|
-
const { FederationImpl: FederationImpl$1 } = await Promise.resolve().then(() => require("./middleware-
|
|
343
|
+
const { FederationImpl: FederationImpl$1 } = await Promise.resolve().then(() => require("./middleware-BvGP-uXy.cjs"));
|
|
344
344
|
const f = new FederationImpl$1(options);
|
|
345
345
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
346
346
|
f.router = this.router.clone();
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
5
|
import { getDefaultActivityTransformers } from "./transformers-C3FLHUd6.js";
|
|
6
|
-
import { deno_default, doubleKnock, exportJwk, formatAcceptSignature, importJwk, parseRfc9421SignatureInput, validateCryptoKey, verifyRequest, verifyRequestDetailed } from "./http-
|
|
7
|
-
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-
|
|
6
|
+
import { deno_default, doubleKnock, exportJwk, formatAcceptSignature, importJwk, parseRfc9421SignatureInput, validateCryptoKey, verifyRequest, verifyRequestDetailed } from "./http-EUQ6crVa.js";
|
|
7
|
+
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-6Zw1FW7t.js";
|
|
8
8
|
import { getNodeInfo, nodeInfoToJson } from "./types-C93Ob9cU.js";
|
|
9
|
-
import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-
|
|
9
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-SKgbvvu4.js";
|
|
10
10
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
11
11
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
12
12
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
@@ -14,8 +14,8 @@ import { cloneDeep, uniq } from "es-toolkit";
|
|
|
14
14
|
import { Router } from "uri-template-router";
|
|
15
15
|
import { parseTemplate } from "url-template";
|
|
16
16
|
import { encodeHex } from "byte-encodings/hex";
|
|
17
|
-
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_HEADER, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
|
18
17
|
import { FetchError, getDocumentLoader } from "@fedify/vocab-runtime";
|
|
18
|
+
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_HEADER, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
|
19
19
|
import { lookupWebFinger } from "@fedify/webfinger";
|
|
20
20
|
import { domainToASCII } from "node:url";
|
|
21
21
|
|
|
@@ -339,7 +339,7 @@ var FederationBuilderImpl = class {
|
|
|
339
339
|
this.collectionTypeIds = {};
|
|
340
340
|
}
|
|
341
341
|
async build(options) {
|
|
342
|
-
const { FederationImpl: FederationImpl$1 } = await import("./middleware-
|
|
342
|
+
const { FederationImpl: FederationImpl$1 } = await import("./middleware-BVp930fR.js");
|
|
343
343
|
const f = new FederationImpl$1(options);
|
|
344
344
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
345
345
|
f.router = this.router.clone();
|
package/dist/mod.cjs
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
const require_chunk = require('./chunk-CGaQZ11T.cjs');
|
|
6
6
|
const require_transformers = require('./transformers-3g8GZwkZ.cjs');
|
|
7
7
|
require('./compat-DmDDELst.cjs');
|
|
8
|
-
const require_http = require('./http-
|
|
9
|
-
const require_middleware = require('./middleware-
|
|
10
|
-
const require_proof = require('./proof-
|
|
8
|
+
const require_http = require('./http-ca2xny58.cjs');
|
|
9
|
+
const require_middleware = require('./middleware-CL6XaAFy.cjs');
|
|
10
|
+
const require_proof = require('./proof-sCID81Ua.cjs');
|
|
11
11
|
const require_federation = require('./federation-Bp3HI26G.cjs');
|
|
12
12
|
const require_types = require('./types-Cd_hszr_.cjs');
|
|
13
|
-
const require_kv_cache = require('./kv-cache-
|
|
13
|
+
const require_kv_cache = require('./kv-cache-BBJFLMW5.cjs');
|
|
14
14
|
require('./nodeinfo-DuMYTpbZ.cjs');
|
|
15
15
|
const require_runtime = require('./runtime-c2Njxsry.cjs');
|
|
16
16
|
require('./sig-vX39WyWI.cjs');
|
package/dist/mod.js
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
import { __export, __reExport } from "./chunk-DJNbSFdH.js";
|
|
6
6
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./transformers-C3FLHUd6.js";
|
|
7
7
|
import "./compat-Bb4NuTUO.js";
|
|
8
|
-
import { exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, importJwk, parseAcceptSignature, signRequest, validateAcceptSignature, verifyRequest, verifyRequestDetailed } from "./http-
|
|
9
|
-
import { Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-
|
|
10
|
-
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-
|
|
8
|
+
import { exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, importJwk, parseAcceptSignature, signRequest, validateAcceptSignature, verifyRequest, verifyRequestDetailed } from "./http-EUQ6crVa.js";
|
|
9
|
+
import { Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-CvS6hWm3.js";
|
|
10
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-6Zw1FW7t.js";
|
|
11
11
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-DaMfqRm4.js";
|
|
12
12
|
import { getNodeInfo, nodeInfoToJson, parseNodeInfo } from "./types-C93Ob9cU.js";
|
|
13
|
-
import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-
|
|
13
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-SKgbvvu4.js";
|
|
14
14
|
import "./nodeinfo-DoESQxq5.js";
|
|
15
15
|
import { runtime_exports } from "./runtime-poamPCMb.js";
|
|
16
16
|
import "./sig-BNhspNOf.js";
|
|
@@ -7,26 +7,26 @@ import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
|
7
7
|
import "../assert-MZs1qjMx.js";
|
|
8
8
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
9
9
|
import { MemoryKvStore } from "../kv-QzKcOQgP.js";
|
|
10
|
-
import "../deno-
|
|
11
|
-
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-
|
|
10
|
+
import "../deno-DH972JvX.js";
|
|
11
|
+
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-BHJ0xm0L.js";
|
|
12
12
|
import "../client-CoCIaTNO.js";
|
|
13
13
|
import "../router-D9eI0s4b.js";
|
|
14
14
|
import "../types-CPz01LGH.js";
|
|
15
15
|
import "../accept-D7sAxyNa.js";
|
|
16
|
-
import "../key-
|
|
17
|
-
import "../http-
|
|
18
|
-
import "../ld-
|
|
19
|
-
import "../owner-
|
|
20
|
-
import "../proof-
|
|
21
|
-
import "../docloader-
|
|
16
|
+
import "../key-CypuWa94.js";
|
|
17
|
+
import "../http-DFzT4YFG.js";
|
|
18
|
+
import "../ld-CXLtTc0G.js";
|
|
19
|
+
import "../owner-CwMai3jn.js";
|
|
20
|
+
import "../proof-ZuJBOUoi.js";
|
|
21
|
+
import "../docloader-Ck0SCLXX.js";
|
|
22
22
|
import "../kv-cache-Bw2F2ABq.js";
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
23
|
+
import "../inbox-BMLz_-pL.js";
|
|
24
|
+
import "../builder-DbKYZdSy.js";
|
|
25
25
|
import "../collection-CSzG2j1P.js";
|
|
26
26
|
import "../keycache-CpGWAUbj.js";
|
|
27
27
|
import "../negotiation-BlAuS_nr.js";
|
|
28
28
|
import "../retry-mqLf4b-R.js";
|
|
29
|
-
import "../send-
|
|
29
|
+
import "../send-BW73dy6Q.js";
|
|
30
30
|
import "../std__assert-X-_kMxKM.js";
|
|
31
31
|
import "../assert_rejects-0h7I2Esa.js";
|
|
32
32
|
import "../assert_throws-rjdMBf31.js";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./deno-
|
|
6
|
+
import { deno_default } from "./deno-DH972JvX.js";
|
|
7
7
|
import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
8
8
|
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { deno_default, fetchKey, validateCryptoKey } from "./http-
|
|
5
|
+
import { deno_default, fetchKey, validateCryptoKey } from "./http-EUQ6crVa.js";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "@fedify/vocab";
|
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
9
9
|
import { encodeHex } from "byte-encodings/hex";
|
|
10
|
-
import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
|
11
10
|
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
11
|
+
import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
|
12
12
|
import jsonld from "@fedify/vocab-runtime/jsonld";
|
|
13
13
|
import serialize from "json-canon";
|
|
14
14
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./deno-
|
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
|
6
|
+
import { deno_default } from "./deno-DH972JvX.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-CypuWa94.js";
|
|
8
8
|
import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
|
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
|
10
10
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
5
|
const require_chunk = require('./chunk-CGaQZ11T.cjs');
|
|
6
|
-
const require_http = require('./http-
|
|
6
|
+
const require_http = require('./http-ca2xny58.cjs');
|
|
7
7
|
const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
|
8
8
|
const __fedify_vocab = require_chunk.__toESM(require("@fedify/vocab"));
|
|
9
9
|
const __opentelemetry_api = require_chunk.__toESM(require("@opentelemetry/api"));
|
|
10
10
|
const byte_encodings_hex = require_chunk.__toESM(require("byte-encodings/hex"));
|
|
11
|
-
const byte_encodings_base64 = require_chunk.__toESM(require("byte-encodings/base64"));
|
|
12
11
|
const __fedify_vocab_runtime = require_chunk.__toESM(require("@fedify/vocab-runtime"));
|
|
12
|
+
const byte_encodings_base64 = require_chunk.__toESM(require("byte-encodings/base64"));
|
|
13
13
|
const __fedify_vocab_runtime_jsonld = require_chunk.__toESM(require("@fedify/vocab-runtime/jsonld"));
|
|
14
14
|
const json_canon = require_chunk.__toESM(require("json-canon"));
|
|
15
15
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./deno-
|
|
7
|
-
import { doubleKnock } from "./http-
|
|
6
|
+
import { deno_default } from "./deno-DH972JvX.js";
|
|
7
|
+
import { doubleKnock } from "./http-DFzT4YFG.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
|
package/dist/sig/http.test.js
CHANGED
|
@@ -7,10 +7,10 @@ import { esm_default } from "../esm-nLm00z9V.js";
|
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import "../deno-
|
|
10
|
+
import "../deno-DH972JvX.js";
|
|
11
11
|
import "../accept-D7sAxyNa.js";
|
|
12
|
-
import { exportJwk } from "../key-
|
|
13
|
-
import { createRfc9421SignatureBase, doubleKnock, formatRfc9421Signature, formatRfc9421SignatureParameters, parseRfc9421Signature, parseRfc9421SignatureInput, signRequest, timingSafeEqual, verifyRequest, verifyRequestDetailed } from "../http-
|
|
12
|
+
import { exportJwk } from "../key-CypuWa94.js";
|
|
13
|
+
import { createRfc9421SignatureBase, doubleKnock, formatRfc9421Signature, formatRfc9421SignatureParameters, parseRfc9421Signature, parseRfc9421SignatureInput, signRequest, timingSafeEqual, verifyRequest, verifyRequestDetailed } from "../http-DFzT4YFG.js";
|
|
14
14
|
import { assertExists, assertStringIncludes } from "../std__assert-X-_kMxKM.js";
|
|
15
15
|
import { assertFalse, assertRejects } from "../assert_rejects-0h7I2Esa.js";
|
|
16
16
|
import { assertThrows } from "../assert_throws-rjdMBf31.js";
|
|
@@ -981,6 +981,49 @@ test("doubleKnock() complex redirect chain test", async () => {
|
|
|
981
981
|
for (const loggedReq of logs) assert(loggedReq.headers.has("Signature-Input") || loggedReq.headers.has("Signature"), "Each request should be signed with either RFC 9421 or draft-cavage");
|
|
982
982
|
esm_default.hardReset();
|
|
983
983
|
});
|
|
984
|
+
test("doubleKnock() throws on too many redirects", async () => {
|
|
985
|
+
esm_default.spyGlobal();
|
|
986
|
+
let requestCount = 0;
|
|
987
|
+
esm_default.post("begin:https://example.com/too-many-redirects/", (cl) => {
|
|
988
|
+
requestCount++;
|
|
989
|
+
const index = Number(cl.url.split("/").at(-1));
|
|
990
|
+
return Response.redirect(`https://example.com/too-many-redirects/${index + 1}`, 302);
|
|
991
|
+
});
|
|
992
|
+
const request = new Request("https://example.com/too-many-redirects/0", {
|
|
993
|
+
method: "POST",
|
|
994
|
+
body: "Redirect loop",
|
|
995
|
+
headers: { "Content-Type": "text/plain" }
|
|
996
|
+
});
|
|
997
|
+
await assertRejects(() => doubleKnock(request, {
|
|
998
|
+
keyId: rsaPublicKey2.id,
|
|
999
|
+
privateKey: rsaPrivateKey2
|
|
1000
|
+
}), Error, "Too many redirections");
|
|
1001
|
+
assertEquals(requestCount, 21);
|
|
1002
|
+
esm_default.hardReset();
|
|
1003
|
+
});
|
|
1004
|
+
test("doubleKnock() detects redirect loops", async () => {
|
|
1005
|
+
esm_default.spyGlobal();
|
|
1006
|
+
let requestCount = 0;
|
|
1007
|
+
esm_default.post("https://example.com/redirect-loop-a", () => {
|
|
1008
|
+
requestCount++;
|
|
1009
|
+
return Response.redirect("https://example.com/redirect-loop-b", 302);
|
|
1010
|
+
});
|
|
1011
|
+
esm_default.post("https://example.com/redirect-loop-b", () => {
|
|
1012
|
+
requestCount++;
|
|
1013
|
+
return Response.redirect("https://example.com/redirect-loop-a", 302);
|
|
1014
|
+
});
|
|
1015
|
+
const request = new Request("https://example.com/redirect-loop-a", {
|
|
1016
|
+
method: "POST",
|
|
1017
|
+
body: "Redirect loop",
|
|
1018
|
+
headers: { "Content-Type": "text/plain" }
|
|
1019
|
+
});
|
|
1020
|
+
await assertRejects(() => doubleKnock(request, {
|
|
1021
|
+
keyId: rsaPublicKey2.id,
|
|
1022
|
+
privateKey: rsaPrivateKey2
|
|
1023
|
+
}), Error, "Redirect loop detected");
|
|
1024
|
+
assertEquals(requestCount, 2);
|
|
1025
|
+
esm_default.hardReset();
|
|
1026
|
+
});
|
|
984
1027
|
test("doubleKnock() async specDeterminer test", async () => {
|
|
985
1028
|
esm_default.spyGlobal();
|
|
986
1029
|
let requestCount = 0;
|
package/dist/sig/key.test.js
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
7
7
|
import "../assert-MZs1qjMx.js";
|
|
8
8
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
9
|
-
import "../deno-
|
|
10
|
-
import { exportJwk, fetchKey, fetchKeyDetailed, generateCryptoKeyPair, importJwk, validateCryptoKey } from "../key-
|
|
9
|
+
import "../deno-DH972JvX.js";
|
|
10
|
+
import { exportJwk, fetchKey, fetchKeyDetailed, generateCryptoKeyPair, importJwk, validateCryptoKey } from "../key-CypuWa94.js";
|
|
11
11
|
import "../std__assert-X-_kMxKM.js";
|
|
12
12
|
import { assertRejects } from "../assert_rejects-0h7I2Esa.js";
|
|
13
13
|
import { assertThrows } from "../assert_throws-rjdMBf31.js";
|
package/dist/sig/ld.test.js
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
7
7
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
8
|
-
import "../deno-
|
|
9
|
-
import { generateCryptoKeyPair } from "../key-
|
|
10
|
-
import { attachSignature, createSignature, detachSignature, signJsonLd, verifyJsonLd, verifySignature } from "../ld-
|
|
8
|
+
import "../deno-DH972JvX.js";
|
|
9
|
+
import { generateCryptoKeyPair } from "../key-CypuWa94.js";
|
|
10
|
+
import { attachSignature, createSignature, detachSignature, signJsonLd, verifyJsonLd, verifySignature } from "../ld-CXLtTc0G.js";
|
|
11
11
|
import { assertFalse, assertRejects } from "../assert_rejects-0h7I2Esa.js";
|
|
12
12
|
import { assertThrows } from "../assert_throws-rjdMBf31.js";
|
|
13
13
|
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-BFve7QQv.js";
|
package/dist/sig/mod.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
|
-
const require_http = require('../http-
|
|
6
|
-
const require_proof = require('../proof-
|
|
5
|
+
const require_http = require('../http-ca2xny58.cjs');
|
|
6
|
+
const require_proof = require('../proof-sCID81Ua.cjs');
|
|
7
7
|
require('../sig-vX39WyWI.cjs');
|
|
8
8
|
|
|
9
9
|
exports.attachSignature = require_proof.attachSignature;
|
package/dist/sig/mod.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, importJwk, parseAcceptSignature, signRequest, validateAcceptSignature, verifyRequest, verifyRequestDetailed } from "../http-
|
|
6
|
-
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../proof-
|
|
5
|
+
import { exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, importJwk, parseAcceptSignature, signRequest, validateAcceptSignature, verifyRequest, verifyRequestDetailed } from "../http-EUQ6crVa.js";
|
|
6
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../proof-6Zw1FW7t.js";
|
|
7
7
|
import "../sig-BNhspNOf.js";
|
|
8
8
|
|
|
9
9
|
export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
package/dist/sig/owner.test.js
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
7
7
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
8
8
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
9
|
-
import "../deno-
|
|
10
|
-
import "../key-
|
|
11
|
-
import { doesActorOwnKey, getKeyOwner } from "../owner-
|
|
9
|
+
import "../deno-DH972JvX.js";
|
|
10
|
+
import "../key-CypuWa94.js";
|
|
11
|
+
import { doesActorOwnKey, getKeyOwner } from "../owner-CwMai3jn.js";
|
|
12
12
|
import "../std__assert-X-_kMxKM.js";
|
|
13
13
|
import { assertFalse } from "../assert_rejects-0h7I2Esa.js";
|
|
14
14
|
import "../assert_throws-rjdMBf31.js";
|
package/dist/sig/proof.test.js
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
7
7
|
import "../assert-MZs1qjMx.js";
|
|
8
8
|
import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
|
|
9
|
-
import "../deno-
|
|
10
|
-
import "../key-
|
|
11
|
-
import { createProof, signObject, verifyObject, verifyProof } from "../proof-
|
|
9
|
+
import "../deno-DH972JvX.js";
|
|
10
|
+
import "../key-CypuWa94.js";
|
|
11
|
+
import { createProof, signObject, verifyObject, verifyProof } from "../proof-ZuJBOUoi.js";
|
|
12
12
|
import "../std__assert-X-_kMxKM.js";
|
|
13
13
|
import { assertRejects } from "../assert_rejects-0h7I2Esa.js";
|
|
14
14
|
import "../assert_throws-rjdMBf31.js";
|
|
@@ -7,11 +7,11 @@ import { esm_default } from "../esm-nLm00z9V.js";
|
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import "../deno-
|
|
10
|
+
import "../deno-DH972JvX.js";
|
|
11
11
|
import "../accept-D7sAxyNa.js";
|
|
12
|
-
import "../key-
|
|
13
|
-
import { verifyRequest } from "../http-
|
|
14
|
-
import { getAuthenticatedDocumentLoader } from "../docloader-
|
|
12
|
+
import "../key-CypuWa94.js";
|
|
13
|
+
import { verifyRequest } from "../http-DFzT4YFG.js";
|
|
14
|
+
import { getAuthenticatedDocumentLoader } from "../docloader-Ck0SCLXX.js";
|
|
15
15
|
import "../std__assert-X-_kMxKM.js";
|
|
16
16
|
import { assertRejects } from "../assert_rejects-0h7I2Esa.js";
|
|
17
17
|
import "../assert_throws-rjdMBf31.js";
|
package/dist/utils/mod.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
|
-
require('../http-
|
|
6
|
-
const require_kv_cache = require('../kv-cache-
|
|
5
|
+
require('../http-ca2xny58.cjs');
|
|
6
|
+
const require_kv_cache = require('../kv-cache-BBJFLMW5.cjs');
|
|
7
7
|
require('../utils-BQ9KqEK9.cjs');
|
|
8
8
|
|
|
9
9
|
exports.getAuthenticatedDocumentLoader = require_kv_cache.getAuthenticatedDocumentLoader;
|
package/dist/utils/mod.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import "../http-
|
|
6
|
-
import { getAuthenticatedDocumentLoader, kvCache } from "../kv-cache-
|
|
5
|
+
import "../http-EUQ6crVa.js";
|
|
6
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "../kv-cache-SKgbvvu4.js";
|
|
7
7
|
import "../utils-Dn5OPdSW.js";
|
|
8
8
|
|
|
9
9
|
export { getAuthenticatedDocumentLoader, kvCache };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/fedify",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "An ActivityPub server framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ActivityPub",
|
|
@@ -144,9 +144,9 @@
|
|
|
144
144
|
"uri-template-router": "^1.0.0",
|
|
145
145
|
"url-template": "^3.1.1",
|
|
146
146
|
"urlpattern-polyfill": "^10.1.0",
|
|
147
|
-
"@fedify/vocab": "2.1.
|
|
148
|
-
"@fedify/
|
|
149
|
-
"@fedify/
|
|
147
|
+
"@fedify/vocab-runtime": "2.1.1",
|
|
148
|
+
"@fedify/webfinger": "2.1.1",
|
|
149
|
+
"@fedify/vocab": "2.1.1"
|
|
150
150
|
},
|
|
151
151
|
"devDependencies": {
|
|
152
152
|
"@std/assert": "npm:@jsr/std__assert@^0.226.0",
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"typescript": "^5.9.3",
|
|
160
160
|
"wrangler": "^4.17.0",
|
|
161
161
|
"@fedify/fixture": "2.0.0",
|
|
162
|
-
"@fedify/vocab-tools": "^2.1.
|
|
162
|
+
"@fedify/vocab-tools": "^2.1.1"
|
|
163
163
|
},
|
|
164
164
|
"scripts": {
|
|
165
165
|
"build:self": "tsdown",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
const { Temporal } = require("@js-temporal/polyfill");
|
|
3
|
-
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
|
-
|
|
5
|
-
require('./transformers-3g8GZwkZ.cjs');
|
|
6
|
-
require('./http-B2ESb34f.cjs');
|
|
7
|
-
const require_middleware = require('./middleware-dCLPVGcv.cjs');
|
|
8
|
-
require('./proof-CzpgAyMy.cjs');
|
|
9
|
-
require('./types-Cd_hszr_.cjs');
|
|
10
|
-
require('./kv-cache-FoyLv1vG.cjs');
|
|
11
|
-
|
|
12
|
-
exports.FederationImpl = require_middleware.FederationImpl;
|