@fedify/fedify 2.1.1 → 2.2.0-dev.610
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-DbKYZdSy.js → builder-Bkqx5fo0.js} +3 -3
- package/dist/compat/transformers.test.js +11 -11
- package/dist/{deno-DH972JvX.js → deno-CMcbjYDs.js} +1 -1
- package/dist/{docloader-Ck0SCLXX.js → docloader-ORTT1bPi.js} +4 -3
- 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-ca2xny58.cjs → http-BDf1pBmE.cjs} +4 -3
- package/dist/{http-DFzT4YFG.js → http-By9CCocC.js} +5 -4
- package/dist/{http-EUQ6crVa.js → http-DLQMXj_1.js} +4 -3
- package/dist/{inbox-BMLz_-pL.js → inbox-CTJeEur6.js} +1 -1
- package/dist/{key-CypuWa94.js → key-OaS_196P.js} +1 -1
- package/dist/{kv-cache-SKgbvvu4.js → kv-cache-COnBmjEC.js} +3 -2
- package/dist/{kv-cache-BBJFLMW5.cjs → kv-cache-DG491NbS.cjs} +3 -2
- package/dist/{ld-CXLtTc0G.js → ld-5udwE1JY.js} +2 -2
- package/dist/{middleware-CvS6hWm3.js → middleware-3FSu2a2W.js} +4 -4
- package/dist/{middleware-BVp930fR.js → middleware-BzcyJjau.js} +4 -4
- package/dist/{middleware-CL6XaAFy.cjs → middleware-CFuio6Y_.cjs} +4 -4
- package/dist/{middleware-BHJ0xm0L.js → middleware-DRWIaDqh.js} +10 -10
- package/dist/{middleware-B8FJuMM0.js → middleware-HlNnBIDX.js} +11 -11
- package/dist/middleware-i-8IYJwY.cjs +12 -0
- package/dist/{mod-Cs2dYEwI.d.ts → mod-DCbh1JQ5.d.ts} +1 -0
- package/dist/{mod-Bx9jcLB8.d.cts → mod-jfnweK2w.d.cts} +1 -0
- package/dist/mod.cjs +4 -4
- package/dist/mod.d.cts +1 -1
- package/dist/mod.d.ts +1 -1
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/handler.test.js +11 -11
- package/dist/{owner-CwMai3jn.js → owner-DuRG_QYg.js} +1 -1
- package/dist/{proof-ZuJBOUoi.js → proof-DFffIwhK.js} +2 -2
- package/dist/{proof-6Zw1FW7t.js → proof-DG0_Hm4d.js} +1 -1
- package/dist/{proof-sCID81Ua.cjs → proof-WJjJMjvC.cjs} +1 -1
- package/dist/{send-BW73dy6Q.js → send-CJAMZwWu.js} +2 -2
- package/dist/sig/http.test.js +23 -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 +20 -4
- package/dist/utils/mod.cjs +2 -2
- package/dist/utils/mod.d.cts +1 -1
- package/dist/utils/mod.d.ts +1 -1
- package/dist/utils/mod.js +2 -2
- package/package.json +5 -5
- package/dist/middleware-BvGP-uXy.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-CMcbjYDs.js";
|
|
7
7
|
import { Router, RouterError } from "./router-D9eI0s4b.js";
|
|
8
|
-
import { InboxListenerSet } from "./inbox-
|
|
8
|
+
import { InboxListenerSet } from "./inbox-CTJeEur6.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-HlNnBIDX.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-CMcbjYDs.js";
|
|
11
|
+
import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-DRWIaDqh.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-OaS_196P.js";
|
|
17
|
+
import "../http-By9CCocC.js";
|
|
18
|
+
import "../ld-5udwE1JY.js";
|
|
19
|
+
import "../owner-DuRG_QYg.js";
|
|
20
|
+
import "../proof-DFffIwhK.js";
|
|
21
|
+
import "../docloader-ORTT1bPi.js";
|
|
22
22
|
import "../kv-cache-Bw2F2ABq.js";
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
23
|
+
import "../inbox-CTJeEur6.js";
|
|
24
|
+
import "../builder-Bkqx5fo0.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-CJAMZwWu.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-OaS_196P.js";
|
|
7
|
+
import { doubleKnock } from "./http-By9CCocC.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";
|
|
@@ -26,7 +26,7 @@ const logger = getLogger([
|
|
|
26
26
|
* @throws {TypeError} If the key is invalid or unsupported.
|
|
27
27
|
* @since 0.4.0
|
|
28
28
|
*/
|
|
29
|
-
function getAuthenticatedDocumentLoader(identity, { allowPrivateAddress, userAgent, specDeterminer, tracerProvider } = {}) {
|
|
29
|
+
function getAuthenticatedDocumentLoader(identity, { allowPrivateAddress, maxRedirection, userAgent, specDeterminer, tracerProvider } = {}) {
|
|
30
30
|
validateCryptoKey(identity.privateKey);
|
|
31
31
|
async function load(url, options) {
|
|
32
32
|
if (!allowPrivateAddress) try {
|
|
@@ -40,6 +40,7 @@ function getAuthenticatedDocumentLoader(identity, { allowPrivateAddress, userAge
|
|
|
40
40
|
}
|
|
41
41
|
const originalRequest = createActivityPubRequest(url, { userAgent });
|
|
42
42
|
const response = await doubleKnock(originalRequest, identity, {
|
|
43
|
+
maxRedirection,
|
|
43
44
|
specDeterminer,
|
|
44
45
|
log: curry(logRequest)(logger),
|
|
45
46
|
tracerProvider,
|
|
@@ -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-CMcbjYDs.js";
|
|
11
11
|
import "../router-D9eI0s4b.js";
|
|
12
|
-
import "../inbox-
|
|
13
|
-
import { createFederationBuilder } from "../builder-
|
|
12
|
+
import "../inbox-CTJeEur6.js";
|
|
13
|
+
import { createFederationBuilder } from "../builder-Bkqx5fo0.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-CMcbjYDs.js";
|
|
11
|
+
import { createFederation, handleActor, handleCollection, handleCustomCollection, handleInbox, handleObject, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-DRWIaDqh.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-OaS_196P.js";
|
|
17
|
+
import { signRequest } from "../http-By9CCocC.js";
|
|
18
|
+
import "../ld-5udwE1JY.js";
|
|
19
|
+
import "../owner-DuRG_QYg.js";
|
|
20
|
+
import "../proof-DFffIwhK.js";
|
|
21
|
+
import "../docloader-ORTT1bPi.js";
|
|
22
22
|
import "../kv-cache-Bw2F2ABq.js";
|
|
23
|
-
import { InboxListenerSet } from "../inbox-
|
|
24
|
-
import "../builder-
|
|
23
|
+
import { InboxListenerSet } from "../inbox-CTJeEur6.js";
|
|
24
|
+
import "../builder-Bkqx5fo0.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-CJAMZwWu.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-CMcbjYDs.js";
|
|
11
|
+
import { createFederation } from "../middleware-DRWIaDqh.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-OaS_196P.js";
|
|
17
|
+
import "../http-By9CCocC.js";
|
|
18
|
+
import "../ld-5udwE1JY.js";
|
|
19
|
+
import "../owner-DuRG_QYg.js";
|
|
20
|
+
import { signObject } from "../proof-DFffIwhK.js";
|
|
21
|
+
import "../docloader-ORTT1bPi.js";
|
|
22
22
|
import "../kv-cache-Bw2F2ABq.js";
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
23
|
+
import "../inbox-CTJeEur6.js";
|
|
24
|
+
import "../builder-Bkqx5fo0.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-CJAMZwWu.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-CMcbjYDs.js";
|
|
8
|
+
import { InboxListenerSet } from "../inbox-CTJeEur6.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-CMcbjYDs.js";
|
|
12
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "../middleware-DRWIaDqh.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-OaS_196P.js";
|
|
18
|
+
import { signRequest, verifyRequest } from "../http-By9CCocC.js";
|
|
19
|
+
import { detachSignature, signJsonLd, verifyJsonLd } from "../ld-5udwE1JY.js";
|
|
20
|
+
import { doesActorOwnKey } from "../owner-DuRG_QYg.js";
|
|
21
|
+
import { signObject, verifyObject } from "../proof-DFffIwhK.js";
|
|
22
|
+
import { getAuthenticatedDocumentLoader } from "../docloader-ORTT1bPi.js";
|
|
23
23
|
import "../kv-cache-Bw2F2ABq.js";
|
|
24
|
-
import "../inbox-
|
|
25
|
-
import "../builder-
|
|
24
|
+
import "../inbox-CTJeEur6.js";
|
|
25
|
+
import "../builder-Bkqx5fo0.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-CJAMZwWu.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-BDf1pBmE.cjs');
|
|
7
|
+
const require_middleware = require('../middleware-CFuio6Y_.cjs');
|
|
8
|
+
require('../proof-WJjJMjvC.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-DG491NbS.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-DLQMXj_1.js";
|
|
7
|
+
import { Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable } from "../middleware-3FSu2a2W.js";
|
|
8
|
+
import "../proof-DG0_Hm4d.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-COnBmjEC.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-CMcbjYDs.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-OaS_196P.js";
|
|
13
|
+
import { verifyRequest } from "../http-By9CCocC.js";
|
|
14
|
+
import { doesActorOwnKey } from "../owner-DuRG_QYg.js";
|
|
15
|
+
import { SendActivityError, extractInboxes, sendActivity } from "../send-CJAMZwWu.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-CMcbjYDs.js";
|
|
11
|
+
import { createFederation, handleWebFinger } from "../middleware-DRWIaDqh.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-OaS_196P.js";
|
|
17
|
+
import "../http-By9CCocC.js";
|
|
18
|
+
import "../ld-5udwE1JY.js";
|
|
19
|
+
import "../owner-DuRG_QYg.js";
|
|
20
|
+
import "../proof-DFffIwhK.js";
|
|
21
|
+
import "../docloader-ORTT1bPi.js";
|
|
22
22
|
import "../kv-cache-Bw2F2ABq.js";
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
23
|
+
import "../inbox-CTJeEur6.js";
|
|
24
|
+
import "../builder-Bkqx5fo0.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-CJAMZwWu.js";
|
|
30
30
|
import "../std__assert-X-_kMxKM.js";
|
|
31
31
|
import "../assert_rejects-0h7I2Esa.js";
|
|
32
32
|
import "../assert_throws-rjdMBf31.js";
|
|
@@ -14,7 +14,7 @@ const byte_encodings_base64 = require_chunk.__toESM(require("byte-encodings/base
|
|
|
14
14
|
|
|
15
15
|
//#region deno.json
|
|
16
16
|
var name = "@fedify/fedify";
|
|
17
|
-
var version = "2.
|
|
17
|
+
var version = "2.2.0-dev.610+2d418352";
|
|
18
18
|
var license = "MIT";
|
|
19
19
|
var exports$1 = {
|
|
20
20
|
".": "./src/mod.ts",
|
|
@@ -1465,6 +1465,7 @@ async function doubleKnock(request, identity, options = {}) {
|
|
|
1465
1465
|
}
|
|
1466
1466
|
async function doubleKnockInternal(request, identity, options, redirected = 0, visited = /* @__PURE__ */ new Set()) {
|
|
1467
1467
|
const { specDeterminer, log, tracerProvider, signal } = options;
|
|
1468
|
+
const maximumRedirection = options.maxRedirection ?? DEFAULT_MAX_REDIRECTION;
|
|
1468
1469
|
visited.add(request.url);
|
|
1469
1470
|
const origin = new URL(request.url).origin;
|
|
1470
1471
|
const firstTrySpec = specDeterminer == null ? "rfc9421" : await specDeterminer.determineSpec(origin);
|
|
@@ -1480,7 +1481,7 @@ async function doubleKnockInternal(request, identity, options, redirected = 0, v
|
|
|
1480
1481
|
signal
|
|
1481
1482
|
});
|
|
1482
1483
|
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
|
|
1483
|
-
if (redirected >=
|
|
1484
|
+
if (redirected >= maximumRedirection) throw new __fedify_vocab_runtime.FetchError(request.url, `Too many redirections (${redirected + 1})`);
|
|
1484
1485
|
const location = response.headers.get("Location");
|
|
1485
1486
|
const redirectRequest = createRedirectRequest(request, location, body);
|
|
1486
1487
|
if (visited.has(redirectRequest.url)) throw new __fedify_vocab_runtime.FetchError(request.url, `Redirect loop detected: ${redirectRequest.url}`);
|
|
@@ -1562,7 +1563,7 @@ async function doubleKnockInternal(request, identity, options, redirected = 0, v
|
|
|
1562
1563
|
signal
|
|
1563
1564
|
});
|
|
1564
1565
|
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
|
|
1565
|
-
if (redirected >=
|
|
1566
|
+
if (redirected >= maximumRedirection) throw new __fedify_vocab_runtime.FetchError(request.url, `Too many redirections (${redirected + 1})`);
|
|
1566
1567
|
const location = response.headers.get("Location");
|
|
1567
1568
|
const redirectRequest = createRedirectRequest(request, location, body);
|
|
1568
1569
|
if (visited.has(redirectRequest.url)) throw new __fedify_vocab_runtime.FetchError(request.url, `Redirect loop detected: ${redirectRequest.url}`);
|
|
@@ -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-CMcbjYDs.js";
|
|
7
7
|
import { fulfillAcceptSignature, parseAcceptSignature, validateAcceptSignature } from "./accept-D7sAxyNa.js";
|
|
8
|
-
import { fetchKeyDetailed, validateCryptoKey } from "./key-
|
|
8
|
+
import { fetchKeyDetailed, validateCryptoKey } from "./key-OaS_196P.js";
|
|
9
9
|
import { CryptographicKey } from "@fedify/vocab";
|
|
10
10
|
import { FetchError } from "@fedify/vocab-runtime";
|
|
11
11
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -871,6 +871,7 @@ async function doubleKnock(request, identity, options = {}) {
|
|
|
871
871
|
}
|
|
872
872
|
async function doubleKnockInternal(request, identity, options, redirected = 0, visited = /* @__PURE__ */ new Set()) {
|
|
873
873
|
const { specDeterminer, log, tracerProvider, signal } = options;
|
|
874
|
+
const maximumRedirection = options.maxRedirection ?? DEFAULT_MAX_REDIRECTION;
|
|
874
875
|
visited.add(request.url);
|
|
875
876
|
const origin = new URL(request.url).origin;
|
|
876
877
|
const firstTrySpec = specDeterminer == null ? "rfc9421" : await specDeterminer.determineSpec(origin);
|
|
@@ -886,7 +887,7 @@ async function doubleKnockInternal(request, identity, options, redirected = 0, v
|
|
|
886
887
|
signal
|
|
887
888
|
});
|
|
888
889
|
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
|
|
889
|
-
if (redirected >=
|
|
890
|
+
if (redirected >= maximumRedirection) throw new FetchError(request.url, `Too many redirections (${redirected + 1})`);
|
|
890
891
|
const location = response.headers.get("Location");
|
|
891
892
|
const redirectRequest = createRedirectRequest(request, location, body);
|
|
892
893
|
if (visited.has(redirectRequest.url)) throw new FetchError(request.url, `Redirect loop detected: ${redirectRequest.url}`);
|
|
@@ -968,7 +969,7 @@ async function doubleKnockInternal(request, identity, options, redirected = 0, v
|
|
|
968
969
|
signal
|
|
969
970
|
});
|
|
970
971
|
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
|
|
971
|
-
if (redirected >=
|
|
972
|
+
if (redirected >= maximumRedirection) throw new FetchError(request.url, `Too many redirections (${redirected + 1})`);
|
|
972
973
|
const location = response.headers.get("Location");
|
|
973
974
|
const redirectRequest = createRedirectRequest(request, location, body);
|
|
974
975
|
if (visited.has(redirectRequest.url)) throw new FetchError(request.url, `Redirect loop detected: ${redirectRequest.url}`);
|
|
@@ -13,7 +13,7 @@ import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
|
|
13
13
|
|
|
14
14
|
//#region deno.json
|
|
15
15
|
var name = "@fedify/fedify";
|
|
16
|
-
var version = "2.
|
|
16
|
+
var version = "2.2.0-dev.610+2d418352";
|
|
17
17
|
var license = "MIT";
|
|
18
18
|
var exports = {
|
|
19
19
|
".": "./src/mod.ts",
|
|
@@ -1464,6 +1464,7 @@ async function doubleKnock(request, identity, options = {}) {
|
|
|
1464
1464
|
}
|
|
1465
1465
|
async function doubleKnockInternal(request, identity, options, redirected = 0, visited = /* @__PURE__ */ new Set()) {
|
|
1466
1466
|
const { specDeterminer, log, tracerProvider, signal } = options;
|
|
1467
|
+
const maximumRedirection = options.maxRedirection ?? DEFAULT_MAX_REDIRECTION;
|
|
1467
1468
|
visited.add(request.url);
|
|
1468
1469
|
const origin = new URL(request.url).origin;
|
|
1469
1470
|
const firstTrySpec = specDeterminer == null ? "rfc9421" : await specDeterminer.determineSpec(origin);
|
|
@@ -1479,7 +1480,7 @@ async function doubleKnockInternal(request, identity, options, redirected = 0, v
|
|
|
1479
1480
|
signal
|
|
1480
1481
|
});
|
|
1481
1482
|
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
|
|
1482
|
-
if (redirected >=
|
|
1483
|
+
if (redirected >= maximumRedirection) throw new FetchError(request.url, `Too many redirections (${redirected + 1})`);
|
|
1483
1484
|
const location = response.headers.get("Location");
|
|
1484
1485
|
const redirectRequest = createRedirectRequest(request, location, body);
|
|
1485
1486
|
if (visited.has(redirectRequest.url)) throw new FetchError(request.url, `Redirect loop detected: ${redirectRequest.url}`);
|
|
@@ -1561,7 +1562,7 @@ async function doubleKnockInternal(request, identity, options, redirected = 0, v
|
|
|
1561
1562
|
signal
|
|
1562
1563
|
});
|
|
1563
1564
|
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
|
|
1564
|
-
if (redirected >=
|
|
1565
|
+
if (redirected >= maximumRedirection) throw new FetchError(request.url, `Too many redirections (${redirected + 1})`);
|
|
1565
1566
|
const location = response.headers.get("Location");
|
|
1566
1567
|
const redirectRequest = createRedirectRequest(request, location, body);
|
|
1567
1568
|
if (visited.has(redirectRequest.url)) throw new FetchError(request.url, `Redirect loop detected: ${redirectRequest.url}`);
|
|
@@ -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-CMcbjYDs.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-CMcbjYDs.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";
|
|
@@ -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-DLQMXj_1.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";
|
|
@@ -24,7 +24,7 @@ const logger$1 = getLogger([
|
|
|
24
24
|
* @throws {TypeError} If the key is invalid or unsupported.
|
|
25
25
|
* @since 0.4.0
|
|
26
26
|
*/
|
|
27
|
-
function getAuthenticatedDocumentLoader(identity, { allowPrivateAddress, userAgent, specDeterminer, tracerProvider } = {}) {
|
|
27
|
+
function getAuthenticatedDocumentLoader(identity, { allowPrivateAddress, maxRedirection, userAgent, specDeterminer, tracerProvider } = {}) {
|
|
28
28
|
validateCryptoKey(identity.privateKey);
|
|
29
29
|
async function load(url, options) {
|
|
30
30
|
if (!allowPrivateAddress) try {
|
|
@@ -38,6 +38,7 @@ function getAuthenticatedDocumentLoader(identity, { allowPrivateAddress, userAge
|
|
|
38
38
|
}
|
|
39
39
|
const originalRequest = createActivityPubRequest(url, { userAgent });
|
|
40
40
|
const response = await doubleKnock(originalRequest, identity, {
|
|
41
|
+
maxRedirection,
|
|
41
42
|
specDeterminer,
|
|
42
43
|
log: curry(logRequest)(logger$1),
|
|
43
44
|
tracerProvider,
|
|
@@ -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-BDf1pBmE.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"));
|
|
@@ -25,7 +25,7 @@ const logger$1 = (0, __logtape_logtape.getLogger)([
|
|
|
25
25
|
* @throws {TypeError} If the key is invalid or unsupported.
|
|
26
26
|
* @since 0.4.0
|
|
27
27
|
*/
|
|
28
|
-
function getAuthenticatedDocumentLoader(identity, { allowPrivateAddress, userAgent, specDeterminer, tracerProvider } = {}) {
|
|
28
|
+
function getAuthenticatedDocumentLoader(identity, { allowPrivateAddress, maxRedirection, userAgent, specDeterminer, tracerProvider } = {}) {
|
|
29
29
|
require_http.validateCryptoKey(identity.privateKey);
|
|
30
30
|
async function load(url, options) {
|
|
31
31
|
if (!allowPrivateAddress) try {
|
|
@@ -39,6 +39,7 @@ function getAuthenticatedDocumentLoader(identity, { allowPrivateAddress, userAge
|
|
|
39
39
|
}
|
|
40
40
|
const originalRequest = (0, __fedify_vocab_runtime.createActivityPubRequest)(url, { userAgent });
|
|
41
41
|
const response = await require_http.doubleKnock(originalRequest, identity, {
|
|
42
|
+
maxRedirection,
|
|
42
43
|
specDeterminer,
|
|
43
44
|
log: (0, es_toolkit.curry)(__fedify_vocab_runtime.logRequest)(logger$1),
|
|
44
45
|
tracerProvider,
|
|
@@ -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-CMcbjYDs.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-OaS_196P.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,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-DLQMXj_1.js";
|
|
7
|
+
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-DG0_Hm4d.js";
|
|
8
8
|
import { getNodeInfo, nodeInfoToJson } from "./types-C93Ob9cU.js";
|
|
9
|
-
import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-
|
|
9
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-COnBmjEC.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";
|
|
@@ -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-BzcyJjau.js");
|
|
343
343
|
const f = new FederationImpl$1(options);
|
|
344
344
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
345
345
|
f.router = this.router.clone();
|
|
@@ -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-DLQMXj_1.js";
|
|
7
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-3FSu2a2W.js";
|
|
8
|
+
import "./proof-DG0_Hm4d.js";
|
|
9
9
|
import "./types-C93Ob9cU.js";
|
|
10
|
-
import "./kv-cache-
|
|
10
|
+
import "./kv-cache-COnBmjEC.js";
|
|
11
11
|
|
|
12
12
|
export { 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-BDf1pBmE.cjs');
|
|
8
|
+
const require_proof = require('./proof-WJjJMjvC.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-DG491NbS.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"));
|
|
@@ -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-i-8IYJwY.cjs"));
|
|
344
344
|
const f = new FederationImpl$1(options);
|
|
345
345
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
346
346
|
f.router = this.router.clone();
|
|
@@ -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-CMcbjYDs.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-OaS_196P.js";
|
|
12
|
+
import { parseRfc9421SignatureInput, verifyRequest, verifyRequestDetailed } from "./http-By9CCocC.js";
|
|
13
|
+
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-5udwE1JY.js";
|
|
14
|
+
import { doesActorOwnKey, getKeyOwner } from "./owner-DuRG_QYg.js";
|
|
15
|
+
import { signObject, verifyObject } from "./proof-DFffIwhK.js";
|
|
16
|
+
import { getAuthenticatedDocumentLoader } from "./docloader-ORTT1bPi.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-CTJeEur6.js";
|
|
19
|
+
import { FederationBuilderImpl } from "./builder-Bkqx5fo0.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-CJAMZwWu.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,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-CMcbjYDs.js";
|
|
7
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-DRWIaDqh.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-OaS_196P.js";
|
|
13
|
+
import "./http-By9CCocC.js";
|
|
14
|
+
import "./ld-5udwE1JY.js";
|
|
15
|
+
import "./owner-DuRG_QYg.js";
|
|
16
|
+
import "./proof-DFffIwhK.js";
|
|
17
|
+
import "./docloader-ORTT1bPi.js";
|
|
18
18
|
import "./kv-cache-Bw2F2ABq.js";
|
|
19
|
-
import "./inbox-
|
|
20
|
-
import "./builder-
|
|
19
|
+
import "./inbox-CTJeEur6.js";
|
|
20
|
+
import "./builder-Bkqx5fo0.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-CJAMZwWu.js";
|
|
26
26
|
|
|
27
27
|
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-BDf1pBmE.cjs');
|
|
7
|
+
const require_middleware = require('./middleware-CFuio6Y_.cjs');
|
|
8
|
+
require('./proof-WJjJMjvC.cjs');
|
|
9
|
+
require('./types-Cd_hszr_.cjs');
|
|
10
|
+
require('./kv-cache-DG491NbS.cjs');
|
|
11
|
+
|
|
12
|
+
exports.FederationImpl = require_middleware.FederationImpl;
|
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-BDf1pBmE.cjs');
|
|
9
|
+
const require_middleware = require('./middleware-CFuio6Y_.cjs');
|
|
10
|
+
const require_proof = require('./proof-WJjJMjvC.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-DG491NbS.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.d.cts
CHANGED
|
@@ -8,7 +8,7 @@ import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from
|
|
|
8
8
|
import { WebFingerHandlerParameters, handleWebFinger } from "./mod-em2Il1eD.cjs";
|
|
9
9
|
import "./mod-gq_Xfdz8.cjs";
|
|
10
10
|
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-Coe7KEgX.cjs";
|
|
11
|
-
import { getAuthenticatedDocumentLoader, kvCache } from "./mod-
|
|
11
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "./mod-jfnweK2w.cjs";
|
|
12
12
|
|
|
13
13
|
//#region src/mod.d.ts
|
|
14
14
|
declare namespace mod_d_exports$1 {
|
package/dist/mod.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { WebFingerHandlerParameters, handleWebFinger } from "./mod-D6MdymW7.js";
|
|
|
11
11
|
import "./mod-AGjRfPjT.js";
|
|
12
12
|
import { mod_d_exports } from "./mod-D6HodEq7.js";
|
|
13
13
|
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-D6dOd--H.js";
|
|
14
|
-
import { getAuthenticatedDocumentLoader, kvCache } from "./mod-
|
|
14
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "./mod-DCbh1JQ5.js";
|
|
15
15
|
|
|
16
16
|
//#region src/mod.d.ts
|
|
17
17
|
declare namespace mod_d_exports$1 {
|
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-DLQMXj_1.js";
|
|
9
|
+
import { Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-3FSu2a2W.js";
|
|
10
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-DG0_Hm4d.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-COnBmjEC.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-CMcbjYDs.js";
|
|
11
|
+
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-DRWIaDqh.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-OaS_196P.js";
|
|
17
|
+
import "../http-By9CCocC.js";
|
|
18
|
+
import "../ld-5udwE1JY.js";
|
|
19
|
+
import "../owner-DuRG_QYg.js";
|
|
20
|
+
import "../proof-DFffIwhK.js";
|
|
21
|
+
import "../docloader-ORTT1bPi.js";
|
|
22
22
|
import "../kv-cache-Bw2F2ABq.js";
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
23
|
+
import "../inbox-CTJeEur6.js";
|
|
24
|
+
import "../builder-Bkqx5fo0.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-CJAMZwWu.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-CMcbjYDs.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";
|
|
@@ -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-CMcbjYDs.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-OaS_196P.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";
|
|
@@ -2,7 +2,7 @@
|
|
|
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-DLQMXj_1.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";
|
|
@@ -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-BDf1pBmE.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"));
|
|
@@ -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-CMcbjYDs.js";
|
|
7
|
+
import { doubleKnock } from "./http-By9CCocC.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-CMcbjYDs.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-OaS_196P.js";
|
|
13
|
+
import { createRfc9421SignatureBase, doubleKnock, formatRfc9421Signature, formatRfc9421SignatureParameters, parseRfc9421Signature, parseRfc9421SignatureInput, signRequest, timingSafeEqual, verifyRequest, verifyRequestDetailed } from "../http-By9CCocC.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";
|
|
@@ -1001,6 +1001,26 @@ test("doubleKnock() throws on too many redirects", async () => {
|
|
|
1001
1001
|
assertEquals(requestCount, 21);
|
|
1002
1002
|
esm_default.hardReset();
|
|
1003
1003
|
});
|
|
1004
|
+
test("doubleKnock() respects maxRedirection option", async () => {
|
|
1005
|
+
esm_default.spyGlobal();
|
|
1006
|
+
let requestCount = 0;
|
|
1007
|
+
esm_default.post("begin:https://example.com/custom-too-many-redirects/", (cl) => {
|
|
1008
|
+
requestCount++;
|
|
1009
|
+
const index = Number(cl.url.split("/").at(-1));
|
|
1010
|
+
return Response.redirect(`https://example.com/custom-too-many-redirects/${index + 1}`, 302);
|
|
1011
|
+
});
|
|
1012
|
+
const request = new Request("https://example.com/custom-too-many-redirects/0", {
|
|
1013
|
+
method: "POST",
|
|
1014
|
+
body: "Redirect loop",
|
|
1015
|
+
headers: { "Content-Type": "text/plain" }
|
|
1016
|
+
});
|
|
1017
|
+
await assertRejects(() => doubleKnock(request, {
|
|
1018
|
+
keyId: rsaPublicKey2.id,
|
|
1019
|
+
privateKey: rsaPrivateKey2
|
|
1020
|
+
}, { maxRedirection: 1 }), Error, "Too many redirections");
|
|
1021
|
+
assertEquals(requestCount, 2);
|
|
1022
|
+
esm_default.hardReset();
|
|
1023
|
+
});
|
|
1004
1024
|
test("doubleKnock() detects redirect loops", async () => {
|
|
1005
1025
|
esm_default.spyGlobal();
|
|
1006
1026
|
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-CMcbjYDs.js";
|
|
10
|
+
import { exportJwk, fetchKey, fetchKeyDetailed, generateCryptoKeyPair, importJwk, validateCryptoKey } from "../key-OaS_196P.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-CMcbjYDs.js";
|
|
9
|
+
import { generateCryptoKeyPair } from "../key-OaS_196P.js";
|
|
10
|
+
import { attachSignature, createSignature, detachSignature, signJsonLd, verifyJsonLd, verifySignature } from "../ld-5udwE1JY.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-BDf1pBmE.cjs');
|
|
6
|
+
const require_proof = require('../proof-WJjJMjvC.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-DLQMXj_1.js";
|
|
6
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../proof-DG0_Hm4d.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-CMcbjYDs.js";
|
|
10
|
+
import "../key-OaS_196P.js";
|
|
11
|
+
import { doesActorOwnKey, getKeyOwner } from "../owner-DuRG_QYg.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-CMcbjYDs.js";
|
|
10
|
+
import "../key-OaS_196P.js";
|
|
11
|
+
import { createProof, signObject, verifyObject, verifyProof } from "../proof-DFffIwhK.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-CMcbjYDs.js";
|
|
11
11
|
import "../accept-D7sAxyNa.js";
|
|
12
|
-
import "../key-
|
|
13
|
-
import { verifyRequest } from "../http-
|
|
14
|
-
import { getAuthenticatedDocumentLoader } from "../docloader-
|
|
12
|
+
import "../key-OaS_196P.js";
|
|
13
|
+
import { verifyRequest } from "../http-By9CCocC.js";
|
|
14
|
+
import { getAuthenticatedDocumentLoader } from "../docloader-ORTT1bPi.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";
|
|
@@ -57,6 +57,22 @@ test("getAuthenticatedDocumentLoader()", async (t) => {
|
|
|
57
57
|
});
|
|
58
58
|
assertRejects(() => loader("http://localhost"), UrlError);
|
|
59
59
|
});
|
|
60
|
+
await t.step("custom max redirection", async () => {
|
|
61
|
+
esm_default.spyGlobal();
|
|
62
|
+
let requestCount = 0;
|
|
63
|
+
esm_default.get("begin:https://example.com/custom-too-many-redirects/", (cl) => {
|
|
64
|
+
requestCount++;
|
|
65
|
+
const index = Number(cl.url.split("/").at(-1));
|
|
66
|
+
return Response.redirect(`https://example.com/custom-too-many-redirects/${index + 1}`, 302);
|
|
67
|
+
});
|
|
68
|
+
const loader = getAuthenticatedDocumentLoader({
|
|
69
|
+
keyId: new URL("https://example.com/key2"),
|
|
70
|
+
privateKey: rsaPrivateKey2
|
|
71
|
+
}, { maxRedirection: 1 });
|
|
72
|
+
await assertRejects(() => loader("https://example.com/custom-too-many-redirects/0"), Error, "Too many redirections");
|
|
73
|
+
assertEquals(requestCount, 2);
|
|
74
|
+
esm_default.hardReset();
|
|
75
|
+
});
|
|
60
76
|
});
|
|
61
77
|
test("getAuthenticatedDocumentLoader() cancellation", {
|
|
62
78
|
sanitizeResources: false,
|
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-BDf1pBmE.cjs');
|
|
6
|
+
const require_kv_cache = require('../kv-cache-DG491NbS.cjs');
|
|
7
7
|
require('../utils-BQ9KqEK9.cjs');
|
|
8
8
|
|
|
9
9
|
exports.getAuthenticatedDocumentLoader = require_kv_cache.getAuthenticatedDocumentLoader;
|
package/dist/utils/mod.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../http-BudnHZE2.cjs";
|
|
2
2
|
import "../kv-BL4nlICN.cjs";
|
|
3
|
-
import { getAuthenticatedDocumentLoader, kvCache } from "../mod-
|
|
3
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "../mod-jfnweK2w.cjs";
|
|
4
4
|
export { getAuthenticatedDocumentLoader, kvCache };
|
package/dist/utils/mod.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ import { Temporal } from "@js-temporal/polyfill";
|
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
3
|
import "../http-Dax_FIBo.js";
|
|
4
4
|
import "../kv-DXEUEP6z.js";
|
|
5
|
-
import { getAuthenticatedDocumentLoader, kvCache } from "../mod-
|
|
5
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "../mod-DCbh1JQ5.js";
|
|
6
6
|
export { getAuthenticatedDocumentLoader, kvCache };
|
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-DLQMXj_1.js";
|
|
6
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "../kv-cache-COnBmjEC.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.
|
|
3
|
+
"version": "2.2.0-dev.610+2d418352",
|
|
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
|
|
148
|
-
"@fedify/
|
|
149
|
-
"@fedify/
|
|
147
|
+
"@fedify/vocab": "2.2.0-dev.610+2d418352",
|
|
148
|
+
"@fedify/vocab-runtime": "2.2.0-dev.610+2d418352",
|
|
149
|
+
"@fedify/webfinger": "2.2.0-dev.610+2d418352"
|
|
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.
|
|
162
|
+
"@fedify/vocab-tools": "^2.2.0-dev.610+2d418352"
|
|
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-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;
|