@fedify/fedify 2.1.26 → 2.1.27
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-9KbL1CoC.mjs → builder-CKQkP3a2.mjs} +3 -3
- package/dist/compat/transformers.test.mjs +2 -2
- package/dist/{deno-ChmEXNOv.mjs → deno-BR2CGENT.mjs} +1 -1
- package/dist/{docloader-DEVImb5e.mjs → docloader-BDHKVMoV.mjs} +2 -2
- package/dist/federation/builder.test.mjs +2 -2
- package/dist/federation/collection.test.mjs +1 -1
- package/dist/federation/handler.test.mjs +7 -7
- package/dist/federation/idempotency.test.mjs +3 -3
- package/dist/federation/inbox.test.mjs +1 -1
- package/dist/federation/keycache.test.mjs +33 -2
- package/dist/federation/kv.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +7 -7
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.js +1 -1
- package/dist/federation/send.test.mjs +3 -3
- package/dist/federation/temporal.test.mjs +1 -1
- package/dist/federation/webfinger.test.mjs +2 -2
- package/dist/{http-BOH-uFLj.cjs → http-CsQRvInz.cjs} +1 -1
- package/dist/{http-CeK9QmL_.js → http-DQVY5EMT.js} +1 -1
- package/dist/{http-B_M80hBW.mjs → http-QzHm1vsW.mjs} +2 -2
- package/dist/{inbox-B_O6TjZS.mjs → inbox-DEXoNgGa.mjs} +1 -1
- package/dist/{key-BJcK-1Av.mjs → key-CDIMbgsc.mjs} +1 -1
- package/dist/{keycache-CaO7wyQA.mjs → keycache-RFlZObU3.mjs} +23 -2
- package/dist/{kv-cache-BlOG31SS.cjs → kv-cache-FfmHQljR.cjs} +1 -1
- package/dist/{kv-cache-CEJICY0R.js → kv-cache-cTsPZ49Z.js} +1 -1
- package/dist/{ld-YAXn6sG8.mjs → ld-BpkaBh2H.mjs} +2 -2
- package/dist/{middleware-DHGVHIUj.cjs → middleware-Bla8jBXk.cjs} +26 -6
- package/dist/{middleware-DmTWC5VG.mjs → middleware-C9vVE-6R.mjs} +1 -1
- package/dist/{middleware-Co_QOX9H.mjs → middleware-DVaturw-.mjs} +15 -15
- package/dist/{middleware-dGW2gSDG.cjs → middleware-Ddrg18eD.cjs} +1 -1
- package/dist/{middleware-C-45wr85.js → middleware-DwEVn3gK.js} +25 -5
- package/dist/mod.cjs +4 -4
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/client.test.mjs +1 -1
- package/dist/nodeinfo/handler.test.mjs +2 -2
- package/dist/nodeinfo/types.test.mjs +1 -1
- package/dist/otel/exporter.test.mjs +1 -1
- package/dist/{owner-B3ZkY-Ov.mjs → owner-DnOwKsK6.mjs} +2 -2
- package/dist/{proof-DIGrz49z.mjs → proof-CShmVLWt.mjs} +2 -2
- package/dist/{proof-DzOl2GlQ.cjs → proof-JfqNWc2E.cjs} +1 -1
- package/dist/{proof-BeGIkK97.js → proof-uEay4EIq.js} +1 -1
- package/dist/{send-N2w1IwXT.mjs → send-DCg0WblG.mjs} +2 -2
- package/dist/sig/http.test.mjs +62 -3
- package/dist/sig/key.test.mjs +1 -1
- package/dist/sig/ld.test.mjs +2 -2
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/proof.test.mjs +1 -1
- package/dist/{temporal-CpT0u5Mx.mjs → temporal-C96jXvaM.mjs} +1 -1
- package/dist/utils/docloader.test.mjs +2 -2
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +6 -6
- /package/dist/{client-DM72NZuk.mjs → client-CjDMsn4a.mjs} +0 -0
- /package/dist/{collection-ChgDTHLz.mjs → collection-BD6-SZ6O.mjs} +0 -0
- /package/dist/{kv-BrZHNugx.mjs → kv-HvthQAHr.mjs} +0 -0
- /package/dist/{types-C37hquWI.mjs → types-DCP0WLdt.mjs} +0 -0
|
@@ -2,8 +2,8 @@ import "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { n as RouterError, t as Router } from "./router-CrMLXoOr.mjs";
|
|
5
|
-
import { n as version, t as name } from "./deno-
|
|
6
|
-
import { t as InboxListenerSet } from "./inbox-
|
|
5
|
+
import { n as version, t as name } from "./deno-BR2CGENT.mjs";
|
|
6
|
+
import { t as InboxListenerSet } from "./inbox-DEXoNgGa.mjs";
|
|
7
7
|
import { getTypeId } from "@fedify/vocab";
|
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -44,7 +44,7 @@ var FederationBuilderImpl = class {
|
|
|
44
44
|
this.collectionTypeIds = {};
|
|
45
45
|
}
|
|
46
46
|
async build(options) {
|
|
47
|
-
const { FederationImpl } = await import("./middleware-
|
|
47
|
+
const { FederationImpl } = await import("./middleware-C9vVE-6R.mjs");
|
|
48
48
|
const f = new FederationImpl(options);
|
|
49
49
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
50
50
|
f.router = this.router.clone();
|
|
@@ -3,8 +3,8 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
|
|
6
|
-
import { t as MemoryKvStore } from "../kv-
|
|
7
|
-
import { _ as autoIdAssigner, g as actorDehydrator, n as FederationImpl } from "../middleware-
|
|
6
|
+
import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
|
|
7
|
+
import { _ as autoIdAssigner, g as actorDehydrator, n as FederationImpl } from "../middleware-DVaturw-.mjs";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
import { Follow, Person } from "@fedify/vocab";
|
|
10
10
|
//#region src/compat/transformers.test.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { s as validateCryptoKey } from "./key-
|
|
5
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { s as validateCryptoKey } from "./key-CDIMbgsc.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-QzHm1vsW.mjs";
|
|
6
6
|
import { curry } from "es-toolkit";
|
|
7
7
|
import { FetchError, UrlError, createActivityPubRequest, getRemoteDocument, logRequest, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -4,8 +4,8 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import { i as assertExists, n as assertStrictEquals } from "../std__assert-BUOJXi-Z.mjs";
|
|
6
6
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
7
|
-
import { t as MemoryKvStore } from "../kv-
|
|
8
|
-
import { n as createFederationBuilder } from "../builder-
|
|
7
|
+
import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
|
|
8
|
+
import { n as createFederationBuilder } from "../builder-CKQkP3a2.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
import { Activity, Note, Person } from "@fedify/vocab";
|
|
11
11
|
//#region src/federation/builder.test.ts
|
|
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import "../std__assert-BUOJXi-Z.mjs";
|
|
6
|
-
import { n as digest, t as buildCollectionSynchronizationHeader } from "../collection-
|
|
6
|
+
import { n as digest, t as buildCollectionSynchronizationHeader } from "../collection-BD6-SZ6O.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
import { decodeHex } from "byte-encodings/hex";
|
|
9
9
|
//#region src/federation/collection.test.ts
|
|
@@ -7,14 +7,14 @@ import "../std__assert-BUOJXi-Z.mjs";
|
|
|
7
7
|
import { t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
8
8
|
import { t as assert } from "../assert-BhQd8QHP.mjs";
|
|
9
9
|
import { r as parseAcceptSignature } from "../accept-BavzedPB.mjs";
|
|
10
|
-
import { a as generateCryptoKeyPair } from "../key-
|
|
11
|
-
import { s as signRequest } from "../http-
|
|
10
|
+
import { a as generateCryptoKeyPair } from "../key-CDIMbgsc.mjs";
|
|
11
|
+
import { s as signRequest } from "../http-QzHm1vsW.mjs";
|
|
12
12
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-CtZLJq76.mjs";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { a as createFederation, c as handleCollection, d as handleObject, f as respondWithObject, l as handleCustomCollection, p as respondWithObjectIfAcceptable, s as handleActor, u as handleInbox } from "../middleware-
|
|
17
|
-
import { t as InboxListenerSet } from "../inbox-
|
|
13
|
+
import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
|
|
14
|
+
import { a as compactJsonLd, f as signJsonLd } from "../ld-BpkaBh2H.mjs";
|
|
15
|
+
import { n as signObject } from "../proof-CShmVLWt.mjs";
|
|
16
|
+
import { a as createFederation, c as handleCollection, d as handleObject, f as respondWithObject, l as handleCustomCollection, p as respondWithObjectIfAcceptable, s as handleActor, u as handleInbox } from "../middleware-DVaturw-.mjs";
|
|
17
|
+
import { t as InboxListenerSet } from "../inbox-DEXoNgGa.mjs";
|
|
18
18
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
19
19
|
import { Create, CryptographicKey, Multikey, Note, Person } from "@fedify/vocab";
|
|
20
20
|
import { FetchError } from "@fedify/vocab-runtime";
|
|
@@ -4,9 +4,9 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import "../std__assert-BUOJXi-Z.mjs";
|
|
6
6
|
import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { a as createFederation } from "../middleware-
|
|
7
|
+
import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
|
|
8
|
+
import { n as signObject } from "../proof-CShmVLWt.mjs";
|
|
9
|
+
import { a as createFederation } from "../middleware-DVaturw-.mjs";
|
|
10
10
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
11
11
|
import { Create, Follow, Person } from "@fedify/vocab";
|
|
12
12
|
//#region src/federation/idempotency.test.ts
|
|
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
6
|
-
import { t as InboxListenerSet } from "../inbox-
|
|
6
|
+
import { t as InboxListenerSet } from "../inbox-DEXoNgGa.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
import { Activity, Create, Invite, Offer, Update } from "@fedify/vocab";
|
|
9
9
|
//#region src/federation/inbox.test.ts
|
|
@@ -3,8 +3,8 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
6
|
+
import { t as KvKeyCache } from "../keycache-RFlZObU3.mjs";
|
|
7
|
+
import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
import { CryptographicKey, Multikey } from "@fedify/vocab";
|
|
10
10
|
//#region src/federation/keycache.test.ts
|
|
@@ -101,6 +101,37 @@ test("KvKeyCache fetch error metadata", async () => {
|
|
|
101
101
|
await cache.setFetchError(keyId, null);
|
|
102
102
|
assertEquals(await cache.getFetchError(keyId), void 0);
|
|
103
103
|
});
|
|
104
|
+
test("KvKeyCache reads legacy fetch errors", async () => {
|
|
105
|
+
const kv = new MemoryKvStore();
|
|
106
|
+
const keyId = new URL("https://example.com/key");
|
|
107
|
+
await kv.set([
|
|
108
|
+
"pk",
|
|
109
|
+
"__fetchError",
|
|
110
|
+
keyId.href
|
|
111
|
+
], {
|
|
112
|
+
errorName: "FetchError",
|
|
113
|
+
errorMessage: "Legacy failure"
|
|
114
|
+
});
|
|
115
|
+
const result = await new KvKeyCache(kv, ["pk"]).getFetchError(keyId);
|
|
116
|
+
assert(result != null && "error" in result);
|
|
117
|
+
assertEquals(result.error.constructor, Error);
|
|
118
|
+
assertEquals(result.error.name, "FetchError");
|
|
119
|
+
assertEquals(result.error.message, "Legacy failure");
|
|
120
|
+
assertEquals(result.error.cause, void 0);
|
|
121
|
+
});
|
|
122
|
+
test("KvKeyCache keeps unknown error types generic", async () => {
|
|
123
|
+
class CustomError extends Error {}
|
|
124
|
+
const kv = new MemoryKvStore();
|
|
125
|
+
const keyId = new URL("https://example.com/key");
|
|
126
|
+
const error = new CustomError("Custom failure");
|
|
127
|
+
error.name = "FetchError";
|
|
128
|
+
await new KvKeyCache(kv, ["pk"]).setFetchError(keyId, { error });
|
|
129
|
+
const result = await new KvKeyCache(kv, ["pk"]).getFetchError(keyId);
|
|
130
|
+
assert(result != null && "error" in result);
|
|
131
|
+
assertEquals(result.error.constructor, Error);
|
|
132
|
+
assertEquals(result.error.name, "FetchError");
|
|
133
|
+
assertEquals(result.error.message, "Custom failure");
|
|
134
|
+
});
|
|
104
135
|
test("KvKeyCache unavailable entries expire", async () => {
|
|
105
136
|
const cache = new KvKeyCache(new MemoryKvStore(), ["pk"], { unavailableKeyTtl: Temporal.Duration.from({ milliseconds: 1 }) });
|
|
106
137
|
const keyId = new URL("https://example.com/expired");
|
|
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import "../std__assert-BUOJXi-Z.mjs";
|
|
6
|
-
import { t as MemoryKvStore } from "../kv-
|
|
6
|
+
import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
//#region src/federation/kv.test.ts
|
|
9
9
|
test("MemoryKvStore", async (t) => {
|
|
@@ -9,14 +9,14 @@ import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z
|
|
|
9
9
|
import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
|
|
10
10
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
11
11
|
import { t as assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
|
|
12
|
-
import { l as verifyRequest, s as signRequest } from "../http-
|
|
12
|
+
import { l as verifyRequest, s as signRequest } from "../http-QzHm1vsW.mjs";
|
|
13
13
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
14
|
-
import { t as getAuthenticatedDocumentLoader } from "../docloader-
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { a as createFederation, i as KvSpecDeterminer, n as FederationImpl, r as InboxContextImpl, t as ContextImpl } from "../middleware-
|
|
14
|
+
import { t as getAuthenticatedDocumentLoader } from "../docloader-BDHKVMoV.mjs";
|
|
15
|
+
import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
|
|
16
|
+
import { a as compactJsonLd, f as signJsonLd, m as verifyJsonLd, s as detachSignature } from "../ld-BpkaBh2H.mjs";
|
|
17
|
+
import { t as doesActorOwnKey } from "../owner-DnOwKsK6.mjs";
|
|
18
|
+
import { n as signObject, r as verifyObject } from "../proof-CShmVLWt.mjs";
|
|
19
|
+
import { a as createFederation, i as KvSpecDeterminer, n as FederationImpl, r as InboxContextImpl, t as ContextImpl } from "../middleware-DVaturw-.mjs";
|
|
20
20
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
21
21
|
import * as vocab from "@fedify/vocab";
|
|
22
22
|
import { Create, Offer, Person, getTypeId, lookupObject } from "@fedify/vocab";
|
package/dist/federation/mod.cjs
CHANGED
|
@@ -2,7 +2,7 @@ const { Temporal } = require("@js-temporal/polyfill");
|
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
4
|
require("../chunk-DDcVe30Y.cjs");
|
|
5
|
-
const require_middleware = require("../middleware-
|
|
5
|
+
const require_middleware = require("../middleware-Bla8jBXk.cjs");
|
|
6
6
|
let es_toolkit = require("es-toolkit");
|
|
7
7
|
//#region src/federation/kv.ts
|
|
8
8
|
/**
|
package/dist/federation/mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "../middleware-
|
|
3
|
+
import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "../middleware-DwEVn3gK.js";
|
|
4
4
|
import { isEqual } from "es-toolkit";
|
|
5
5
|
//#region src/federation/kv.ts
|
|
6
6
|
/**
|
|
@@ -7,10 +7,10 @@ import "../std__assert-BUOJXi-Z.mjs";
|
|
|
7
7
|
import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
8
8
|
import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
|
|
9
9
|
import { t as assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
|
|
10
|
-
import { l as verifyRequest } from "../http-
|
|
10
|
+
import { l as verifyRequest } from "../http-QzHm1vsW.mjs";
|
|
11
11
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
12
|
-
import { t as doesActorOwnKey } from "../owner-
|
|
13
|
-
import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "../send-
|
|
12
|
+
import { t as doesActorOwnKey } from "../owner-DnOwKsK6.mjs";
|
|
13
|
+
import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "../send-DCg0WblG.mjs";
|
|
14
14
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
15
15
|
import { Activity, Application, Endpoints, Group, Person, Service } from "@fedify/vocab";
|
|
16
16
|
import { FetchError, UrlError } from "@fedify/vocab-runtime";
|
|
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import "../std__assert-BUOJXi-Z.mjs";
|
|
5
5
|
import { n as assertFalse } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
6
6
|
import { t as assert } from "../assert-BhQd8QHP.mjs";
|
|
7
|
-
import { t as hasMalformedKnownTemporalLiteral } from "../temporal-
|
|
7
|
+
import { t as hasMalformedKnownTemporalLiteral } from "../temporal-C96jXvaM.mjs";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
//#region src/federation/temporal.test.ts
|
|
10
10
|
test("hasMalformedKnownTemporalLiteral() detects expanded proof timestamps", async () => {
|
|
@@ -4,8 +4,8 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { n as createRequestContext } from "../context-Juj6bdHC.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-BUOJXi-Z.mjs";
|
|
7
|
-
import { t as MemoryKvStore } from "../kv-
|
|
8
|
-
import { a as createFederation, o as handleWebFinger } from "../middleware-
|
|
7
|
+
import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
|
|
8
|
+
import { a as createFederation, o as handleWebFinger } from "../middleware-DVaturw-.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
import { Image, Link, Person } from "@fedify/vocab";
|
|
11
11
|
//#region src/federation/webfinger.test.ts
|
|
@@ -11,7 +11,7 @@ let _opentelemetry_semantic_conventions = require("@opentelemetry/semantic-conve
|
|
|
11
11
|
let byte_encodings_base64 = require("byte-encodings/base64");
|
|
12
12
|
//#region deno.json
|
|
13
13
|
var name = "@fedify/fedify";
|
|
14
|
-
var version = "2.1.
|
|
14
|
+
var version = "2.1.27";
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region src/sig/accept.ts
|
|
17
17
|
/**
|
|
@@ -10,7 +10,7 @@ import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL } fro
|
|
|
10
10
|
import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
|
11
11
|
//#region deno.json
|
|
12
12
|
var name = "@fedify/fedify";
|
|
13
|
-
var version = "2.1.
|
|
13
|
+
var version = "2.1.27";
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/sig/accept.ts
|
|
16
16
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
4
|
+
import { n as version, t as name } from "./deno-BR2CGENT.mjs";
|
|
5
5
|
import { i as validateAcceptSignature, n as fulfillAcceptSignature, r as parseAcceptSignature } from "./accept-BavzedPB.mjs";
|
|
6
|
-
import { i as fetchKeyDetailed, s as validateCryptoKey } from "./key-
|
|
6
|
+
import { i as fetchKeyDetailed, s as validateCryptoKey } from "./key-CDIMbgsc.mjs";
|
|
7
7
|
import { CryptographicKey } from "@fedify/vocab";
|
|
8
8
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
9
9
|
import { FetchError } from "@fedify/vocab-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
4
|
+
import { n as version, t as name } from "./deno-BR2CGENT.mjs";
|
|
5
5
|
import { Activity, getTypeId } from "@fedify/vocab";
|
|
6
6
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
4
|
+
import { n as version, t as name } from "./deno-BR2CGENT.mjs";
|
|
5
5
|
import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
6
6
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
7
7
|
import { FetchError, getDocumentLoader } from "@fedify/vocab-runtime";
|
|
@@ -2,6 +2,7 @@ import { Temporal } from "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { CryptographicKey, Multikey } from "@fedify/vocab";
|
|
5
|
+
import { FetchError, UrlError } from "@fedify/vocab-runtime";
|
|
5
6
|
//#region src/federation/keycache.ts
|
|
6
7
|
const KEY_CACHE_GENERATION = "2";
|
|
7
8
|
var KvKeyCache = class {
|
|
@@ -76,8 +77,15 @@ var KvKeyCache = class {
|
|
|
76
77
|
})
|
|
77
78
|
};
|
|
78
79
|
else if ("errorName" in cached && typeof cached.errorName === "string" && "errorMessage" in cached && typeof cached.errorMessage === "string") {
|
|
79
|
-
|
|
80
|
+
let error;
|
|
81
|
+
if ("errorType" in cached && cached.errorType === "FetchError" && "errorUrl" in cached && typeof cached.errorUrl === "string" && URL.canParse(cached.errorUrl)) {
|
|
82
|
+
error = new FetchError(cached.errorUrl);
|
|
83
|
+
error.message = cached.errorMessage;
|
|
84
|
+
} else if ("errorType" in cached && cached.errorType === "UrlError" && "errorReason" in cached && (cached.errorReason === "dns" || cached.errorReason === "disallowed")) error = new UrlError(cached.errorMessage, { reason: cached.errorReason });
|
|
85
|
+
else error = new Error(cached.errorMessage);
|
|
80
86
|
error.name = cached.errorName;
|
|
87
|
+
if ("errorCause" in cached && cached.errorCause != null && typeof cached.errorCause === "object" && "name" in cached.errorCause && typeof cached.errorCause.name === "string" && "message" in cached.errorCause && typeof cached.errorCause.message === "string") if ("isDomException" in cached.errorCause && cached.errorCause.isDomException === true) error.cause = new DOMException(cached.errorCause.message, cached.errorCause.name);
|
|
88
|
+
else error.cause = Object.assign(new Error(cached.errorCause.message), { name: cached.errorCause.name });
|
|
81
89
|
return { error };
|
|
82
90
|
}
|
|
83
91
|
}
|
|
@@ -95,9 +103,22 @@ var KvKeyCache = class {
|
|
|
95
103
|
}, { ttl: this.unavailableKeyTtl });
|
|
96
104
|
return;
|
|
97
105
|
}
|
|
106
|
+
const cause = error.error.cause;
|
|
98
107
|
await this.kv.set(this.#getFetchErrorKey(keyId), {
|
|
99
108
|
errorName: error.error.name,
|
|
100
|
-
errorMessage: error.error.message
|
|
109
|
+
errorMessage: error.error.message,
|
|
110
|
+
...error.error instanceof FetchError ? {
|
|
111
|
+
errorType: "FetchError",
|
|
112
|
+
errorUrl: error.error.url.href
|
|
113
|
+
} : error.error instanceof UrlError ? {
|
|
114
|
+
errorType: "UrlError",
|
|
115
|
+
errorReason: error.error.reason
|
|
116
|
+
} : {},
|
|
117
|
+
...cause instanceof Error || cause instanceof DOMException ? { errorCause: {
|
|
118
|
+
name: cause.name,
|
|
119
|
+
message: cause.message,
|
|
120
|
+
isDomException: cause instanceof DOMException
|
|
121
|
+
} } : {}
|
|
101
122
|
}, { ttl: this.unavailableKeyTtl });
|
|
102
123
|
}
|
|
103
124
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
require("./chunk-DDcVe30Y.cjs");
|
|
4
|
-
const require_http = require("./http-
|
|
4
|
+
const require_http = require("./http-CsQRvInz.cjs");
|
|
5
5
|
let _logtape_logtape = require("@logtape/logtape");
|
|
6
6
|
let es_toolkit = require("es-toolkit");
|
|
7
7
|
let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { f as validateCryptoKey, t as doubleKnock } from "./http-
|
|
3
|
+
import { f as validateCryptoKey, t as doubleKnock } from "./http-DQVY5EMT.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { curry } from "es-toolkit";
|
|
6
6
|
import { FetchError, UrlError, createActivityPubRequest, getRemoteDocument, logRequest, preloadedContexts, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { r as fetchKey, s as validateCryptoKey } from "./key-
|
|
4
|
+
import { n as version, t as name } from "./deno-BR2CGENT.mjs";
|
|
5
|
+
import { r as fetchKey, s as validateCryptoKey } from "./key-CDIMbgsc.mjs";
|
|
6
6
|
import { Activity, CryptographicKey, Object as Object$1, getTypeId } from "@fedify/vocab";
|
|
7
7
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
@@ -2,10 +2,10 @@ const { Temporal } = require("@js-temporal/polyfill");
|
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
const require_chunk = require("./chunk-DDcVe30Y.cjs");
|
|
4
4
|
const require_transformers = require("./transformers-NeAONrAq.cjs");
|
|
5
|
-
const require_http = require("./http-
|
|
5
|
+
const require_http = require("./http-CsQRvInz.cjs");
|
|
6
6
|
const require_types = require("./types-DRPjmHVV.cjs");
|
|
7
|
-
const require_proof = require("./proof-
|
|
8
|
-
const require_kv_cache = require("./kv-cache-
|
|
7
|
+
const require_proof = require("./proof-JfqNWc2E.cjs");
|
|
8
|
+
const require_kv_cache = require("./kv-cache-FfmHQljR.cjs");
|
|
9
9
|
let _logtape_logtape = require("@logtape/logtape");
|
|
10
10
|
let _fedify_vocab = require("@fedify/vocab");
|
|
11
11
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
@@ -337,7 +337,7 @@ var FederationBuilderImpl = class {
|
|
|
337
337
|
this.collectionTypeIds = {};
|
|
338
338
|
}
|
|
339
339
|
async build(options) {
|
|
340
|
-
const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-
|
|
340
|
+
const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-Ddrg18eD.cjs"));
|
|
341
341
|
const f = new FederationImpl(options);
|
|
342
342
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
343
343
|
f.router = this.router.clone();
|
|
@@ -943,8 +943,15 @@ var KvKeyCache = class {
|
|
|
943
943
|
})
|
|
944
944
|
};
|
|
945
945
|
else if ("errorName" in cached && typeof cached.errorName === "string" && "errorMessage" in cached && typeof cached.errorMessage === "string") {
|
|
946
|
-
|
|
946
|
+
let error;
|
|
947
|
+
if ("errorType" in cached && cached.errorType === "FetchError" && "errorUrl" in cached && typeof cached.errorUrl === "string" && URL.canParse(cached.errorUrl)) {
|
|
948
|
+
error = new _fedify_vocab_runtime.FetchError(cached.errorUrl);
|
|
949
|
+
error.message = cached.errorMessage;
|
|
950
|
+
} else if ("errorType" in cached && cached.errorType === "UrlError" && "errorReason" in cached && (cached.errorReason === "dns" || cached.errorReason === "disallowed")) error = new _fedify_vocab_runtime.UrlError(cached.errorMessage, { reason: cached.errorReason });
|
|
951
|
+
else error = new Error(cached.errorMessage);
|
|
947
952
|
error.name = cached.errorName;
|
|
953
|
+
if ("errorCause" in cached && cached.errorCause != null && typeof cached.errorCause === "object" && "name" in cached.errorCause && typeof cached.errorCause.name === "string" && "message" in cached.errorCause && typeof cached.errorCause.message === "string") if ("isDomException" in cached.errorCause && cached.errorCause.isDomException === true) error.cause = new DOMException(cached.errorCause.message, cached.errorCause.name);
|
|
954
|
+
else error.cause = Object.assign(new Error(cached.errorCause.message), { name: cached.errorCause.name });
|
|
948
955
|
return { error };
|
|
949
956
|
}
|
|
950
957
|
}
|
|
@@ -962,9 +969,22 @@ var KvKeyCache = class {
|
|
|
962
969
|
}, { ttl: this.unavailableKeyTtl });
|
|
963
970
|
return;
|
|
964
971
|
}
|
|
972
|
+
const cause = error.error.cause;
|
|
965
973
|
await this.kv.set(this.#getFetchErrorKey(keyId), {
|
|
966
974
|
errorName: error.error.name,
|
|
967
|
-
errorMessage: error.error.message
|
|
975
|
+
errorMessage: error.error.message,
|
|
976
|
+
...error.error instanceof _fedify_vocab_runtime.FetchError ? {
|
|
977
|
+
errorType: "FetchError",
|
|
978
|
+
errorUrl: error.error.url.href
|
|
979
|
+
} : error.error instanceof _fedify_vocab_runtime.UrlError ? {
|
|
980
|
+
errorType: "UrlError",
|
|
981
|
+
errorReason: error.error.reason
|
|
982
|
+
} : {},
|
|
983
|
+
...cause instanceof Error || cause instanceof DOMException ? { errorCause: {
|
|
984
|
+
name: cause.name,
|
|
985
|
+
message: cause.message,
|
|
986
|
+
isDomException: cause instanceof DOMException
|
|
987
|
+
} } : {}
|
|
968
988
|
}, { ttl: this.unavailableKeyTtl });
|
|
969
989
|
}
|
|
970
990
|
};
|
|
@@ -2,25 +2,25 @@ import { Temporal } from "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { n as RouterError } from "./router-CrMLXoOr.mjs";
|
|
5
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
+
import { n as version, t as name } from "./deno-BR2CGENT.mjs";
|
|
6
6
|
import { t as formatAcceptSignature } from "./accept-BavzedPB.mjs";
|
|
7
|
-
import { o as importJwk, s as validateCryptoKey, t as exportJwk } from "./key-
|
|
8
|
-
import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-
|
|
9
|
-
import { t as getAuthenticatedDocumentLoader } from "./docloader-
|
|
7
|
+
import { o as importJwk, s as validateCryptoKey, t as exportJwk } from "./key-CDIMbgsc.mjs";
|
|
8
|
+
import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-QzHm1vsW.mjs";
|
|
9
|
+
import { t as getAuthenticatedDocumentLoader } from "./docloader-BDHKVMoV.mjs";
|
|
10
10
|
import { n as kvCache } from "./kv-cache-DqEKe5E0.mjs";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { n as
|
|
14
|
-
import {
|
|
15
|
-
import { t as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
11
|
+
import { t as KvKeyCache } from "./keycache-RFlZObU3.mjs";
|
|
12
|
+
import { a as compactJsonLd, c as getNormalizationContextLoader, d as isInvalidUrlTypeError, f as signJsonLd, g as wrapContextLoaderForJsonLd, l as hasSignature, p as verifyCompactJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as isClearlyMalformedContextReference } from "./ld-BpkaBh2H.mjs";
|
|
13
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-DnOwKsK6.mjs";
|
|
14
|
+
import { n as signObject, r as verifyObject } from "./proof-CShmVLWt.mjs";
|
|
15
|
+
import { d as readBoundedText, l as BodyTooLargeError, t as getNodeInfo, u as MAX_BODY_SIZE } from "./client-CjDMsn4a.mjs";
|
|
16
|
+
import { t as nodeInfoToJson } from "./types-DCP0WLdt.mjs";
|
|
17
|
+
import { n as routeActivity } from "./inbox-DEXoNgGa.mjs";
|
|
18
|
+
import { t as FederationBuilderImpl } from "./builder-CKQkP3a2.mjs";
|
|
19
|
+
import { t as buildCollectionSynchronizationHeader } from "./collection-BD6-SZ6O.mjs";
|
|
20
20
|
import { t as acceptsJsonLd } from "./negotiation-BehA2uul.mjs";
|
|
21
|
-
import { t as hasMalformedKnownTemporalLiteral } from "./temporal-
|
|
21
|
+
import { t as hasMalformedKnownTemporalLiteral } from "./temporal-C96jXvaM.mjs";
|
|
22
22
|
import { t as createExponentialBackoffPolicy } from "./retry-B_E3V_Dx.mjs";
|
|
23
|
-
import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-
|
|
23
|
+
import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-DCg0WblG.mjs";
|
|
24
24
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
25
25
|
import { lookupWebFinger } from "@fedify/webfinger";
|
|
26
26
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
|
-
const require_middleware = require("./middleware-
|
|
3
|
+
const require_middleware = require("./middleware-Bla8jBXk.cjs");
|
|
4
4
|
exports.FederationImpl = require_middleware.FederationImpl;
|
|
@@ -2,10 +2,10 @@ import { Temporal } from "@js-temporal/polyfill";
|
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
3
|
import { t as __exportAll } from "./chunk-CRNNMoPX.js";
|
|
4
4
|
import { r as getDefaultActivityTransformers } from "./transformers-BGMIq1cs.js";
|
|
5
|
-
import { a as verifyRequestDetailed, d as importJwk, f as validateCryptoKey, i as verifyRequest, m as formatAcceptSignature, n as parseRfc9421SignatureInput, o as exportJwk, t as doubleKnock, v as name, y as version } from "./http-
|
|
5
|
+
import { a as verifyRequestDetailed, d as importJwk, f as validateCryptoKey, i as verifyRequest, m as formatAcceptSignature, n as parseRfc9421SignatureInput, o as exportJwk, t as doubleKnock, v as name, y as version } from "./http-DQVY5EMT.js";
|
|
6
6
|
import { a as MAX_BODY_SIZE, i as BodyTooLargeError, n as getNodeInfo, o as readBoundedText, t as nodeInfoToJson } from "./types-miAYfiGO.js";
|
|
7
|
-
import { _ as signJsonLd, a as doesActorOwnKey, c as assertSafeJsonLd, f as detachSignature, g as isInvalidUrlTypeError, h as isClearlyMalformedContextReference, m as hasSignature, n as signObject, o as getKeyOwner, p as getNormalizationContextLoader, r as verifyObject, s as InvalidContextReferenceError, u as compactJsonLd, v as verifyCompactJsonLd, x as wrapContextLoaderForJsonLd } from "./proof-
|
|
8
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
7
|
+
import { _ as signJsonLd, a as doesActorOwnKey, c as assertSafeJsonLd, f as detachSignature, g as isInvalidUrlTypeError, h as isClearlyMalformedContextReference, m as hasSignature, n as signObject, o as getKeyOwner, p as getNormalizationContextLoader, r as verifyObject, s as InvalidContextReferenceError, u as compactJsonLd, v as verifyCompactJsonLd, x as wrapContextLoaderForJsonLd } from "./proof-uEay4EIq.js";
|
|
8
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-cTsPZ49Z.js";
|
|
9
9
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
10
10
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
11
11
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
@@ -942,8 +942,15 @@ var KvKeyCache = class {
|
|
|
942
942
|
})
|
|
943
943
|
};
|
|
944
944
|
else if ("errorName" in cached && typeof cached.errorName === "string" && "errorMessage" in cached && typeof cached.errorMessage === "string") {
|
|
945
|
-
|
|
945
|
+
let error;
|
|
946
|
+
if ("errorType" in cached && cached.errorType === "FetchError" && "errorUrl" in cached && typeof cached.errorUrl === "string" && URL.canParse(cached.errorUrl)) {
|
|
947
|
+
error = new FetchError(cached.errorUrl);
|
|
948
|
+
error.message = cached.errorMessage;
|
|
949
|
+
} else if ("errorType" in cached && cached.errorType === "UrlError" && "errorReason" in cached && (cached.errorReason === "dns" || cached.errorReason === "disallowed")) error = new UrlError(cached.errorMessage, { reason: cached.errorReason });
|
|
950
|
+
else error = new Error(cached.errorMessage);
|
|
946
951
|
error.name = cached.errorName;
|
|
952
|
+
if ("errorCause" in cached && cached.errorCause != null && typeof cached.errorCause === "object" && "name" in cached.errorCause && typeof cached.errorCause.name === "string" && "message" in cached.errorCause && typeof cached.errorCause.message === "string") if ("isDomException" in cached.errorCause && cached.errorCause.isDomException === true) error.cause = new DOMException(cached.errorCause.message, cached.errorCause.name);
|
|
953
|
+
else error.cause = Object.assign(new Error(cached.errorCause.message), { name: cached.errorCause.name });
|
|
947
954
|
return { error };
|
|
948
955
|
}
|
|
949
956
|
}
|
|
@@ -961,9 +968,22 @@ var KvKeyCache = class {
|
|
|
961
968
|
}, { ttl: this.unavailableKeyTtl });
|
|
962
969
|
return;
|
|
963
970
|
}
|
|
971
|
+
const cause = error.error.cause;
|
|
964
972
|
await this.kv.set(this.#getFetchErrorKey(keyId), {
|
|
965
973
|
errorName: error.error.name,
|
|
966
|
-
errorMessage: error.error.message
|
|
974
|
+
errorMessage: error.error.message,
|
|
975
|
+
...error.error instanceof FetchError ? {
|
|
976
|
+
errorType: "FetchError",
|
|
977
|
+
errorUrl: error.error.url.href
|
|
978
|
+
} : error.error instanceof UrlError ? {
|
|
979
|
+
errorType: "UrlError",
|
|
980
|
+
errorReason: error.error.reason
|
|
981
|
+
} : {},
|
|
982
|
+
...cause instanceof Error || cause instanceof DOMException ? { errorCause: {
|
|
983
|
+
name: cause.name,
|
|
984
|
+
message: cause.message,
|
|
985
|
+
isDomException: cause instanceof DOMException
|
|
986
|
+
} } : {}
|
|
967
987
|
}, { ttl: this.unavailableKeyTtl });
|
|
968
988
|
}
|
|
969
989
|
};
|
package/dist/mod.cjs
CHANGED
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
4
4
|
require("./chunk-DDcVe30Y.cjs");
|
|
5
5
|
const require_transformers = require("./transformers-NeAONrAq.cjs");
|
|
6
6
|
require("./compat/mod.cjs");
|
|
7
|
-
const require_http = require("./http-
|
|
8
|
-
const require_middleware = require("./middleware-
|
|
7
|
+
const require_http = require("./http-CsQRvInz.cjs");
|
|
8
|
+
const require_middleware = require("./middleware-Bla8jBXk.cjs");
|
|
9
9
|
const require_types = require("./types-DRPjmHVV.cjs");
|
|
10
|
-
const require_proof = require("./proof-
|
|
11
|
-
const require_kv_cache = require("./kv-cache-
|
|
10
|
+
const require_proof = require("./proof-JfqNWc2E.cjs");
|
|
11
|
+
const require_kv_cache = require("./kv-cache-FfmHQljR.cjs");
|
|
12
12
|
const require_federation_mod = require("./federation/mod.cjs");
|
|
13
13
|
require("./nodeinfo/mod.cjs");
|
|
14
14
|
require("./runtime/mod.cjs");
|
package/dist/mod.js
CHANGED
|
@@ -3,11 +3,11 @@ import { URLPattern } from "urlpattern-polyfill";
|
|
|
3
3
|
import "./chunk-CRNNMoPX.js";
|
|
4
4
|
import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-BGMIq1cs.js";
|
|
5
5
|
import "./compat/mod.js";
|
|
6
|
-
import { _ as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKey, d as importJwk, g as parseAcceptSignature, h as fulfillAcceptSignature, i as verifyRequest, l as fetchKeyDetailed, m as formatAcceptSignature, o as exportJwk, r as signRequest, u as generateCryptoKeyPair } from "./http-
|
|
7
|
-
import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "./middleware-
|
|
6
|
+
import { _ as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKey, d as importJwk, g as parseAcceptSignature, h as fulfillAcceptSignature, i as verifyRequest, l as fetchKeyDetailed, m as formatAcceptSignature, o as exportJwk, r as signRequest, u as generateCryptoKeyPair } from "./http-DQVY5EMT.js";
|
|
7
|
+
import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "./middleware-DwEVn3gK.js";
|
|
8
8
|
import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-miAYfiGO.js";
|
|
9
|
-
import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "./proof-
|
|
10
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
9
|
+
import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "./proof-uEay4EIq.js";
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-cTsPZ49Z.js";
|
|
11
11
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation/mod.js";
|
|
12
12
|
import "./nodeinfo/mod.js";
|
|
13
13
|
import "./runtime/mod.js";
|
|
@@ -5,7 +5,7 @@ import { t as esm_default } from "../esm-DVILvP5e.mjs";
|
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-BUOJXi-Z.mjs";
|
|
7
7
|
import { n as assertInstanceOf } from "../assert-BhQd8QHP.mjs";
|
|
8
|
-
import { a as parseProtocol, c as parseUsage, i as parseOutboundService, n as parseInboundService, o as parseServices, r as parseNodeInfo, s as parseSoftware, t as getNodeInfo } from "../client-
|
|
8
|
+
import { a as parseProtocol, c as parseUsage, i as parseOutboundService, n as parseInboundService, o as parseServices, r as parseNodeInfo, s as parseSoftware, t as getNodeInfo } from "../client-CjDMsn4a.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
import { UrlError } from "@fedify/vocab-runtime";
|
|
11
11
|
import { configure, reset } from "@logtape/logtape";
|
|
@@ -4,8 +4,8 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { n as createRequestContext } from "../context-Juj6bdHC.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-BUOJXi-Z.mjs";
|
|
7
|
-
import { t as MemoryKvStore } from "../kv-
|
|
8
|
-
import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-
|
|
7
|
+
import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
|
|
8
|
+
import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-DVaturw-.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
//#region src/nodeinfo/handler.test.ts
|
|
11
11
|
test("handleNodeInfo()", async () => {
|
|
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import "../std__assert-BUOJXi-Z.mjs";
|
|
6
6
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
7
|
-
import { t as nodeInfoToJson } from "../types-
|
|
7
|
+
import { t as nodeInfoToJson } from "../types-DCP0WLdt.mjs";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
//#region src/nodeinfo/types.test.ts
|
|
10
10
|
test("nodeInfoToJson()", () => {
|
|
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import "../std__assert-BUOJXi-Z.mjs";
|
|
6
|
-
import { t as MemoryKvStore } from "../kv-
|
|
6
|
+
import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
import { SpanKind, SpanStatusCode, TraceFlags } from "@opentelemetry/api";
|
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { c as verifyKeyOwnership, n as fetchActorDocument, t as exportJwk } from "./key-
|
|
4
|
+
import { n as version, t as name } from "./deno-BR2CGENT.mjs";
|
|
5
|
+
import { c as verifyKeyOwnership, n as fetchActorDocument, t as exportJwk } from "./key-CDIMbgsc.mjs";
|
|
6
6
|
import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { r as fetchKey, s as validateCryptoKey } from "./key-
|
|
4
|
+
import { n as version, t as name } from "./deno-BR2CGENT.mjs";
|
|
5
|
+
import { r as fetchKey, s as validateCryptoKey } from "./key-CDIMbgsc.mjs";
|
|
6
6
|
import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
|
|
7
7
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
const require_chunk = require("./chunk-DDcVe30Y.cjs");
|
|
4
|
-
const require_http = require("./http-
|
|
4
|
+
const require_http = require("./http-CsQRvInz.cjs");
|
|
5
5
|
let _logtape_logtape = require("@logtape/logtape");
|
|
6
6
|
let _fedify_vocab = require("@fedify/vocab");
|
|
7
7
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { c as fetchKey, f as validateCryptoKey, o as exportJwk, p as verifyKeyOwnership, s as fetchActorDocument, v as name, y as version } from "./http-
|
|
3
|
+
import { c as fetchKey, f as validateCryptoKey, o as exportJwk, p as verifyKeyOwnership, s as fetchActorDocument, v as name, y as version } from "./http-DQVY5EMT.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "@fedify/vocab";
|
|
6
6
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { n as version, t as name } from "./deno-BR2CGENT.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-QzHm1vsW.mjs";
|
|
6
6
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
7
7
|
import { FetchError, UrlError, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
package/dist/sig/http.test.mjs
CHANGED
|
@@ -7,11 +7,13 @@ import { i as assertExists, t as assertStringIncludes } from "../std__assert-BUO
|
|
|
7
7
|
import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
8
8
|
import { t as assert } from "../assert-BhQd8QHP.mjs";
|
|
9
9
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
10
|
-
import { t as exportJwk } from "../key-
|
|
11
|
-
import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase, u as verifyRequestDetailed } from "../http-
|
|
10
|
+
import { t as exportJwk } from "../key-CDIMbgsc.mjs";
|
|
11
|
+
import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase, u as verifyRequestDetailed } from "../http-QzHm1vsW.mjs";
|
|
12
12
|
import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-CtZLJq76.mjs";
|
|
13
|
+
import { t as KvKeyCache } from "../keycache-RFlZObU3.mjs";
|
|
14
|
+
import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
|
|
13
15
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
14
|
-
import { FetchError, exportSpki } from "@fedify/vocab-runtime";
|
|
16
|
+
import { FetchError, UrlError, exportSpki } from "@fedify/vocab-runtime";
|
|
15
17
|
import { encodeBase64 } from "byte-encodings/base64";
|
|
16
18
|
//#region src/sig/http.test.ts
|
|
17
19
|
test("signRequest() [draft-cavage]", async () => {
|
|
@@ -230,6 +232,63 @@ test("verifyRequestDetailed() records failure details on span", async () => {
|
|
|
230
232
|
assertEquals(span.attributes["http_signatures.key_id"], keyId.href);
|
|
231
233
|
assertEquals(span.attributes["http_signatures.key_fetch_status"], 410);
|
|
232
234
|
});
|
|
235
|
+
test("verifyRequestDetailed() preserves cached key fetch errors", async (t) => {
|
|
236
|
+
const keyId = new URL("https://unreachable.example/actors/alice#main-key");
|
|
237
|
+
const timeout = new FetchError("https://unreachable.example/resolved-key", "Timed out after 100 ms");
|
|
238
|
+
timeout.cause = new DOMException("The operation timed out", "TimeoutError");
|
|
239
|
+
const failures = [
|
|
240
|
+
timeout,
|
|
241
|
+
new UrlError("DNS lookup failed", {
|
|
242
|
+
reason: "dns",
|
|
243
|
+
cause: /* @__PURE__ */ new TypeError("No usable IP addresses")
|
|
244
|
+
}),
|
|
245
|
+
new UrlError("Private IP address is not allowed")
|
|
246
|
+
];
|
|
247
|
+
for (const failure of failures) await t.step(failure.message, async () => {
|
|
248
|
+
const kv = new MemoryKvStore();
|
|
249
|
+
let fetches = 0;
|
|
250
|
+
const documentLoader = (url) => {
|
|
251
|
+
if (url === keyId.href) {
|
|
252
|
+
fetches++;
|
|
253
|
+
throw failure;
|
|
254
|
+
}
|
|
255
|
+
return mockDocumentLoader(url);
|
|
256
|
+
};
|
|
257
|
+
for (const cached of [false, true]) {
|
|
258
|
+
const result = await verifyRequestDetailed(await signRequest(new Request("https://example.com/inbox", {
|
|
259
|
+
method: "POST",
|
|
260
|
+
body: "Test activity"
|
|
261
|
+
}), rsaPrivateKey2, keyId), {
|
|
262
|
+
documentLoader,
|
|
263
|
+
contextLoader: mockDocumentLoader,
|
|
264
|
+
keyCache: new KvKeyCache(kv, ["pk"])
|
|
265
|
+
});
|
|
266
|
+
assertFalse(result.verified);
|
|
267
|
+
assert(result.reason.type === "keyFetchError");
|
|
268
|
+
assert("error" in result.reason.result);
|
|
269
|
+
const error = result.reason.result.error;
|
|
270
|
+
assertEquals(error.name, failure.name);
|
|
271
|
+
assertEquals(error.message, failure.message);
|
|
272
|
+
if (failure instanceof FetchError) {
|
|
273
|
+
assert(error instanceof FetchError);
|
|
274
|
+
assertEquals(error.url.href, failure.url.href);
|
|
275
|
+
assertEquals(error.response, void 0);
|
|
276
|
+
assert(error.cause instanceof DOMException);
|
|
277
|
+
assertEquals(error.cause.name, "TimeoutError");
|
|
278
|
+
assertEquals(error.cause.message, "The operation timed out");
|
|
279
|
+
} else {
|
|
280
|
+
assert(error instanceof UrlError);
|
|
281
|
+
assertEquals(error.reason, failure.reason);
|
|
282
|
+
if (failure.cause instanceof Error) {
|
|
283
|
+
assert(error.cause instanceof Error);
|
|
284
|
+
assertEquals(error.cause.name, failure.cause.name);
|
|
285
|
+
assertEquals(error.cause.message, failure.cause.message);
|
|
286
|
+
} else assertEquals(error.cause, void 0);
|
|
287
|
+
}
|
|
288
|
+
assertEquals(fetches, 1, cached ? "Cached failure was refetched" : "");
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
});
|
|
233
292
|
test("signRequest() and verifyRequest() [rfc9421] implementation", async () => {
|
|
234
293
|
const currentTimestamp = 1709626184;
|
|
235
294
|
const currentTime = Temporal.Instant.from("2024-03-05T08:09:44Z");
|
package/dist/sig/key.test.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import "../std__assert-BUOJXi-Z.mjs";
|
|
|
6
6
|
import { t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
7
7
|
import { t as assert } from "../assert-BhQd8QHP.mjs";
|
|
8
8
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
9
|
-
import { a as generateCryptoKeyPair, i as fetchKeyDetailed, o as importJwk, r as fetchKey, s as validateCryptoKey, t as exportJwk } from "../key-
|
|
9
|
+
import { a as generateCryptoKeyPair, i as fetchKeyDetailed, o as importJwk, r as fetchKey, s as validateCryptoKey, t as exportJwk } from "../key-CDIMbgsc.mjs";
|
|
10
10
|
import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
11
11
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
12
12
|
import { CryptographicKey, Multikey } from "@fedify/vocab";
|
package/dist/sig/ld.test.mjs
CHANGED
|
@@ -5,9 +5,9 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
|
5
5
|
import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
6
6
|
import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
|
|
7
7
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
8
|
-
import { a as generateCryptoKeyPair } from "../key-
|
|
8
|
+
import { a as generateCryptoKeyPair } from "../key-CDIMbgsc.mjs";
|
|
9
9
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
10
|
-
import { a as compactJsonLd, d as isInvalidUrlTypeError, f as signJsonLd, h as verifySignature, i as attachSignature, m as verifyJsonLd, n as UnsafeJsonLdError, o as createSignature, s as detachSignature } from "../ld-
|
|
10
|
+
import { a as compactJsonLd, d as isInvalidUrlTypeError, f as signJsonLd, h as verifySignature, i as attachSignature, m as verifyJsonLd, n as UnsafeJsonLdError, o as createSignature, s as detachSignature } from "../ld-BpkaBh2H.mjs";
|
|
11
11
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
12
12
|
import { CryptographicKey } from "@fedify/vocab";
|
|
13
13
|
import { encodeBase64 } from "byte-encodings/base64";
|
package/dist/sig/mod.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const require_http = require("../http-
|
|
5
|
-
const require_proof = require("../proof-
|
|
4
|
+
const require_http = require("../http-CsQRvInz.cjs");
|
|
5
|
+
const require_proof = require("../proof-JfqNWc2E.cjs");
|
|
6
6
|
exports.attachSignature = require_proof.attachSignature;
|
|
7
7
|
exports.createProof = require_proof.createProof;
|
|
8
8
|
exports.createSignature = require_proof.createSignature;
|
package/dist/sig/mod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { _ as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKey, d as importJwk, g as parseAcceptSignature, h as fulfillAcceptSignature, i as verifyRequest, l as fetchKeyDetailed, m as formatAcceptSignature, o as exportJwk, r as signRequest, u as generateCryptoKeyPair } from "../http-
|
|
4
|
-
import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "../proof-
|
|
3
|
+
import { _ as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKey, d as importJwk, g as parseAcceptSignature, h as fulfillAcceptSignature, i as verifyRequest, l as fetchKeyDetailed, m as formatAcceptSignature, o as exportJwk, r as signRequest, u as generateCryptoKeyPair } from "../http-DQVY5EMT.js";
|
|
4
|
+
import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "../proof-uEay4EIq.js";
|
|
5
5
|
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.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import "../std__assert-BUOJXi-Z.mjs";
|
|
|
6
6
|
import { n as assertFalse } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
7
7
|
import { t as assert } from "../assert-BhQd8QHP.mjs";
|
|
8
8
|
import { o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-CtZLJq76.mjs";
|
|
9
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-
|
|
9
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-DnOwKsK6.mjs";
|
|
10
10
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
11
11
|
import { Create, CryptographicKey, lookupObject } from "@fedify/vocab";
|
|
12
12
|
//#region src/sig/owner.test.ts
|
package/dist/sig/proof.test.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import "../std__assert-BUOJXi-Z.mjs";
|
|
|
6
6
|
import { t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
7
7
|
import { n as assertInstanceOf } from "../assert-BhQd8QHP.mjs";
|
|
8
8
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
9
|
-
import { i as verifyProof, n as signObject, r as verifyObject, t as createProof } from "../proof-
|
|
9
|
+
import { i as verifyProof, n as signObject, r as verifyObject, t as createProof } from "../proof-CShmVLWt.mjs";
|
|
10
10
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
11
11
|
import { Create, DataIntegrityProof, Multikey, Note, Place } from "@fedify/vocab";
|
|
12
12
|
import { decodeMultibase, importMultibaseKey } from "@fedify/vocab-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { c as getNormalizationContextLoader } from "./ld-
|
|
4
|
+
import { c as getNormalizationContextLoader } from "./ld-BpkaBh2H.mjs";
|
|
5
5
|
import jsonld from "@fedify/vocab-runtime/jsonld";
|
|
6
6
|
//#region src/federation/temporal.ts
|
|
7
7
|
function isPlainObject(value) {
|
|
@@ -5,9 +5,9 @@ import { t as esm_default } from "../esm-DVILvP5e.mjs";
|
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-BUOJXi-Z.mjs";
|
|
7
7
|
import { t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
8
|
-
import { l as verifyRequest } from "../http-
|
|
8
|
+
import { l as verifyRequest } from "../http-QzHm1vsW.mjs";
|
|
9
9
|
import { i as rsaPrivateKey2 } from "../keys-CtZLJq76.mjs";
|
|
10
|
-
import { t as getAuthenticatedDocumentLoader } from "../docloader-
|
|
10
|
+
import { t as getAuthenticatedDocumentLoader } from "../docloader-BDHKVMoV.mjs";
|
|
11
11
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
12
12
|
import { FetchError, UrlError } from "@fedify/vocab-runtime";
|
|
13
13
|
import { configure, reset } from "@logtape/logtape";
|
package/dist/utils/mod.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const require_kv_cache = require("../kv-cache-
|
|
4
|
+
const require_kv_cache = require("../kv-cache-FfmHQljR.cjs");
|
|
5
5
|
exports.getAuthenticatedDocumentLoader = require_kv_cache.getAuthenticatedDocumentLoader;
|
|
6
6
|
exports.kvCache = require_kv_cache.kvCache;
|
package/dist/utils/mod.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "../kv-cache-
|
|
3
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "../kv-cache-cTsPZ49Z.js";
|
|
4
4
|
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.27",
|
|
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": "2.1.27",
|
|
148
|
+
"@fedify/vocab-runtime": "2.1.27",
|
|
149
|
+
"@fedify/webfinger": "2.1.27"
|
|
150
150
|
},
|
|
151
151
|
"devDependencies": {
|
|
152
152
|
"@std/assert": "npm:@jsr/std__assert@^0.226.0",
|
|
@@ -158,8 +158,8 @@
|
|
|
158
158
|
"tsx": "^4.19.4",
|
|
159
159
|
"typescript": "^6.0.0",
|
|
160
160
|
"wrangler": "^4.17.0",
|
|
161
|
-
"@fedify/
|
|
162
|
-
"@fedify/
|
|
161
|
+
"@fedify/fixture": "2.0.0",
|
|
162
|
+
"@fedify/vocab-tools": "^2.1.27"
|
|
163
163
|
},
|
|
164
164
|
"scripts": {
|
|
165
165
|
"build:self": "tsdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|