@fedify/fedify 2.4.0-dev.2200 → 2.4.0-dev.2212
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/audience-CHQ-FlLD.mjs +95 -0
- package/dist/{builder-BGSNMnVH.mjs → builder-CKAVFvcH.mjs} +2 -2
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/public-audience.test.mjs +1 -1
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{compound-proof-Zpg7Fbk9.mjs → compound-proof-BP5SOdXv.mjs} +2 -2
- package/dist/{context-B2rlkkyJ.mjs → context-8Tu9kea0.mjs} +2 -0
- package/dist/{context-CDcAgm4l.d.cts → context-Bl_Y7T_3.d.cts} +80 -1
- package/dist/{context-9T--NSo4.d.ts → context-DMd11IAu.d.ts} +80 -1
- package/dist/{deno-CxoV48e0.mjs → deno-BKp9fYB3.mjs} +1 -1
- package/dist/{docloader-U141HKIl.mjs → docloader-BjJreYQU.mjs} +3 -3
- package/dist/federation/audience.test.d.mts +2 -0
- package/dist/federation/audience.test.mjs +130 -0
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/compound-fanout.test.mjs +4 -4
- package/dist/federation/handler-compound-proof.test.mjs +5 -5
- package/dist/federation/handler.test.mjs +7 -7
- package/dist/federation/hashlink-media.test.mjs +3 -3
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/metrics.test.mjs +2 -2
- package/dist/federation/middleware.test.mjs +9 -9
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.d.cts +3 -3
- package/dist/federation/mod.d.ts +3 -3
- package/dist/federation/mod.js +1 -1
- package/dist/federation/outgoing-proof.test.mjs +6 -6
- package/dist/federation/portable-actor.test.mjs +4 -4
- package/dist/federation/portable-chain.test.mjs +4 -4
- package/dist/federation/portable-collection.test.mjs +8 -6
- package/dist/federation/portable-delivery.test.d.mts +2 -0
- package/dist/federation/portable-delivery.test.mjs +746 -0
- package/dist/federation/portable-gateway-keys.test.mjs +6 -6
- package/dist/federation/portable-inbox.test.mjs +5 -5
- package/dist/federation/portable-parse-uri.test.mjs +2 -2
- package/dist/federation/portable-route-activity.test.mjs +3 -3
- package/dist/federation/portable.test.mjs +234 -19
- package/dist/federation/send.test.mjs +4 -4
- package/dist/federation/tasks/enqueue.test.mjs +2 -2
- package/dist/federation/tasks/tasks.test.mjs +3 -3
- package/dist/federation/temporal.test.mjs +1 -1
- package/dist/federation/webfinger.test.mjs +3 -3
- package/dist/{federation-Ij8VLHpy.cjs → federation-B-0EXZPH.cjs} +679 -35
- package/dist/{http-BQq1Uldg.mjs → http--IGUT1mg.mjs} +5 -5
- package/dist/{http-D8XakCKn.cjs → http-ByBlnY3D.cjs} +1 -1
- package/dist/{http-CshNXXui.js → http-Di8yiDMY.js} +1 -1
- package/dist/{key-DYgoirTo.mjs → key-ChfV9C3v.mjs} +2 -2
- package/dist/{kv-cache-f_GNq0e7.cjs → kv-cache-BDwUzxBJ.cjs} +1 -1
- package/dist/{kv-cache-D0Mn-VQW.mjs → kv-cache-DFIUR-E5.mjs} +1 -1
- package/dist/{kv-cache-Bpnt_Cck.js → kv-cache-DpwDPt9V.js} +1 -1
- package/dist/{ld-eIekvNtm.mjs → ld-DBBVabBC.mjs} +3 -3
- package/dist/{metrics-BVpdjsaR.mjs → metrics-DPQKFkiJ.mjs} +1 -1
- package/dist/{middleware-BbTJ6C1-.mjs → middleware-BW7-tHAG.mjs} +422 -44
- package/dist/{middleware-rpYJG85a.mjs → middleware-G9zpxUsD.mjs} +1 -1
- package/dist/{middleware-CS3H_4tQ.js → middleware-VXGLiHtY.js} +681 -37
- package/dist/{mod-B3OBLj5g.d.ts → mod-BVNGHgVr.d.ts} +1 -1
- package/dist/{mod-D58KCqUg.d.cts → mod-Cyy1Wahy.d.cts} +1 -1
- package/dist/mod.cjs +4 -4
- package/dist/mod.d.cts +4 -4
- package/dist/mod.d.ts +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/{owner-DpxyMeo9.mjs → owner-BW5VsXG3.mjs} +3 -3
- package/dist/{portable-collection-DyJwtPz1.cjs → portable-collection-CXcAlwei.cjs} +1 -1
- package/dist/{portable-collection-DOL3l2C9.mjs → portable-collection-Ct99JsBe.mjs} +2 -2
- package/dist/{portable-collection-BvJ5om91.js → portable-collection-FTPa5D91.js} +1 -1
- package/dist/{portable-key-B8kTV4n8.mjs → portable-key-U3lW06QJ.mjs} +1 -1
- package/dist/{proof-B9DEHHiO.mjs → proof-MFz2960e.mjs} +4 -4
- package/dist/{send-CZckda2X.mjs → send-Duj8xys1.mjs} +191 -10
- package/dist/sig/compound-proof-discovery.test.mjs +1 -1
- package/dist/sig/compound-proof-producer.test.mjs +1 -1
- package/dist/sig/compound-proof-verification.test.mjs +3 -3
- package/dist/sig/compound-proof.test.mjs +3 -3
- package/dist/sig/http.test.mjs +3 -3
- package/dist/sig/key-owner-evidence.test.mjs +2 -2
- package/dist/sig/key.test.mjs +2 -2
- 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/portable-collection.test.mjs +2 -2
- package/dist/sig/portable-key-id.test.mjs +2 -2
- package/dist/sig/portable-key.test.mjs +7 -7
- package/dist/sig/proof.test.mjs +4 -4
- package/dist/{temporal-Cc1ymEup.mjs → temporal-CVcPKB1N.mjs} +1 -1
- package/dist/testing/kv.test.mjs +1 -1
- package/dist/testing/mod.d.mts +79 -0
- package/dist/testing/mod.mjs +2 -2
- package/dist/{testing-C1itIjqW.mjs → testing-t8xDeJZ5.mjs} +1 -1
- package/dist/utils/docloader.test.mjs +6 -6
- package/dist/utils/kv-cache.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/sig/http.test.mjs
CHANGED
|
@@ -12,12 +12,12 @@ import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
|
12
12
|
import "../std__assert-DvMDRPes.mjs";
|
|
13
13
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
14
14
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
15
|
-
import { n as exportJwk } from "../key-
|
|
16
|
-
import { a as listRequestSignatures, c as selectRequestSignature, f as verifyRequest, i as formatRfc9421SignatureParameters, l as signRequest, n as doubleKnock, o as parseRfc9421Signature, p as verifyRequestDetailed, r as formatRfc9421Signature, s as parseRfc9421SignatureInput, t as createRfc9421SignatureBase, u as timingSafeEqual } from "../http
|
|
15
|
+
import { n as exportJwk } from "../key-ChfV9C3v.mjs";
|
|
16
|
+
import { a as listRequestSignatures, c as selectRequestSignature, f as verifyRequest, i as formatRfc9421SignatureParameters, l as signRequest, n as doubleKnock, o as parseRfc9421Signature, p as verifyRequestDetailed, r as formatRfc9421Signature, s as parseRfc9421SignatureInput, t as createRfc9421SignatureBase, u as timingSafeEqual } from "../http--IGUT1mg.mjs";
|
|
17
17
|
import { a as rsaPrivateKey3, i as rsaPrivateKey2, l as rsaPublicKey5, n as ed25519PrivateKey, o as rsaPublicKey1, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
18
18
|
import { t as KvKeyCache } from "../keycache-Da8A8mZa.mjs";
|
|
19
|
-
import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
20
19
|
import { FetchError, exportSpki, getDocumentLoader } from "@fedify/vocab-runtime";
|
|
20
|
+
import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
21
21
|
import { encodeBase64 } from "byte-encodings/base64";
|
|
22
22
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_string_includes.js
|
|
23
23
|
/**
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
+
import { n as getCanonicalPortableId } from "../portable-key-id-Ca30-hOa.mjs";
|
|
4
5
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
5
6
|
import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
|
|
6
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
7
8
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
8
|
-
import { n as getCanonicalPortableId } from "../portable-key-id-Ca30-hOa.mjs";
|
|
9
9
|
import { a as promoteKeyOwnerEvidence, i as parseKeyOwnerEvidence, n as attachKeyOwnerEvidence, r as getVerifiedKeyOwnerEvidence } from "../key-owner-evidence-APB6NpSk.mjs";
|
|
10
10
|
import { r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
11
11
|
import { CryptographicKey, Person } from "@fedify/vocab";
|
|
12
|
-
import { test } from "@fedify/fixture";
|
|
13
12
|
import { exportDidKey, parseIri } from "@fedify/vocab-runtime";
|
|
13
|
+
import { test } from "@fedify/fixture";
|
|
14
14
|
//#region src/sig/key-owner-evidence.test.ts
|
|
15
15
|
const did = await exportDidKey(ed25519PublicKey.publicKey);
|
|
16
16
|
const rawActorId = `ap://${did}/actors/alice`;
|
package/dist/sig/key.test.mjs
CHANGED
|
@@ -6,11 +6,11 @@ import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
|
6
6
|
import "../std__assert-DvMDRPes.mjs";
|
|
7
7
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
8
8
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
9
|
-
import { a as fetchKeyDetailed, c as validateCryptoKey, i as fetchKey, n as exportJwk, o as generateCryptoKeyPair, s as importJwk } from "../key-
|
|
9
|
+
import { a as fetchKeyDetailed, c as validateCryptoKey, i as fetchKey, n as exportJwk, o as generateCryptoKeyPair, s as importJwk } from "../key-ChfV9C3v.mjs";
|
|
10
10
|
import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
11
11
|
import { CryptographicKey, Multikey } from "@fedify/vocab";
|
|
12
|
-
import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
13
12
|
import { FetchError, exportDidKey } from "@fedify/vocab-runtime";
|
|
13
|
+
import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
14
14
|
//#region src/sig/key.test.ts
|
|
15
15
|
test("validateCryptoKey()", async () => {
|
|
16
16
|
const pkcs1v15 = await crypto.subtle.generateKey({
|
package/dist/sig/ld.test.mjs
CHANGED
|
@@ -8,8 +8,8 @@ import { t as assertInstanceOf } from "../assert_instance_of-mrXWWNY-.mjs";
|
|
|
8
8
|
import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
9
9
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
10
10
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
11
|
-
import { o as generateCryptoKeyPair } from "../key-
|
|
12
|
-
import { a as compactJsonLd, f as isInvalidUrlTypeError, g as verifySignature, h as verifyJsonLd, i as attachSignature, n as UnsafeJsonLdError, o as createSignature, p as signJsonLd, s as detachSignature, u as hasSignatureLike } from "../ld-
|
|
11
|
+
import { o as generateCryptoKeyPair } from "../key-ChfV9C3v.mjs";
|
|
12
|
+
import { a as compactJsonLd, f as isInvalidUrlTypeError, g as verifySignature, h as verifyJsonLd, i as attachSignature, n as UnsafeJsonLdError, o as createSignature, p as signJsonLd, s as detachSignature, u as hasSignatureLike } from "../ld-DBBVabBC.mjs";
|
|
13
13
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
14
14
|
import { CryptographicKey } from "@fedify/vocab";
|
|
15
15
|
import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
package/dist/sig/mod.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_http = require("../http-
|
|
4
|
-
const require_portable_collection = require("../portable-collection-
|
|
3
|
+
const require_http = require("../http-ByBlnY3D.cjs");
|
|
4
|
+
const require_portable_collection = require("../portable-collection-CXcAlwei.cjs");
|
|
5
5
|
exports.attachSignature = require_http.attachSignature;
|
|
6
6
|
exports.createProof = require_http.createProof;
|
|
7
7
|
exports.createSignature = require_http.createSignature;
|
package/dist/sig/mod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { D as createSignature, H as fetchKeyDetailed, I as verifyJsonLd, L as verifySignature, O as detachSignature, P as signJsonLd, T as attachSignature, U as generateCryptoKeyPair, V as fetchKey, W as importJwk, _ as verifyObject, _t as validateAcceptSignature, a as signRequest, c as verifyRequestDetailed, gt as parseAcceptSignature, h as signObject, ht as fulfillAcceptSignature, j as hasSignatureLike, m as hasProofLike, mt as formatAcceptSignature, p as createProof, s as verifyRequest, v as verifyPortableObjectProof, x as verifyProof, z as exportJwk } from "../http-
|
|
4
|
-
import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "../portable-collection-
|
|
3
|
+
import { D as createSignature, H as fetchKeyDetailed, I as verifyJsonLd, L as verifySignature, O as detachSignature, P as signJsonLd, T as attachSignature, U as generateCryptoKeyPair, V as fetchKey, W as importJwk, _ as verifyObject, _t as validateAcceptSignature, a as signRequest, c as verifyRequestDetailed, gt as parseAcceptSignature, h as signObject, ht as fulfillAcceptSignature, j as hasSignatureLike, m as hasProofLike, mt as formatAcceptSignature, p as createProof, s as verifyRequest, v as verifyPortableObjectProof, x as verifyProof, z as exportJwk } from "../http-Di8yiDMY.js";
|
|
4
|
+
import { n as doesActorOwnKey, r as getKeyOwner, t as verifyPortableObject } from "../portable-collection-FTPa5D91.js";
|
|
5
5
|
export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, hasProofLike, hasSignatureLike, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyPortableObject, verifyPortableObjectProof, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
package/dist/sig/owner.test.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
|
|
|
6
6
|
import "../std__assert-DvMDRPes.mjs";
|
|
7
7
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
8
8
|
import { o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
9
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-
|
|
9
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-BW5VsXG3.mjs";
|
|
10
10
|
import { Create, CryptographicKey, lookupObject } from "@fedify/vocab";
|
|
11
11
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
12
12
|
//#region src/sig/owner.test.ts
|
|
@@ -2,10 +2,10 @@ import "temporal-polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { n as ed25519PrivateKey, r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
|
|
5
|
-
import { t as verifyPortableObject } from "../portable-collection-
|
|
5
|
+
import { t as verifyPortableObject } from "../portable-collection-Ct99JsBe.mjs";
|
|
6
6
|
import { Collection, CollectionPage, Note, OrderedCollection, Person, traverseCollection } from "@fedify/vocab";
|
|
7
|
-
import { test } from "@fedify/fixture";
|
|
8
7
|
import { FetchError, encodeMultibase, exportDidKey, preloadedContexts } from "@fedify/vocab-runtime";
|
|
8
|
+
import { test } from "@fedify/fixture";
|
|
9
9
|
import { deepStrictEqual, ok, strictEqual } from "node:assert/strict";
|
|
10
10
|
import serialize from "json-canon";
|
|
11
11
|
//#region src/sig/portable-collection.test.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
+
import { f as isSameObjectId, t as getAuthenticationOrigin } from "../portable-key-id-Ca30-hOa.mjs";
|
|
4
5
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
5
6
|
import { t as assertFalse } from "../assert_false-CPdRnc3E.mjs";
|
|
6
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
7
8
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
8
|
-
import { f as isSameObjectId, t as getAuthenticationOrigin } from "../portable-key-id-Ca30-hOa.mjs";
|
|
9
9
|
import { r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
|
|
10
|
-
import { test } from "@fedify/fixture";
|
|
11
10
|
import { exportDidKey, parseIri } from "@fedify/vocab-runtime";
|
|
11
|
+
import { test } from "@fedify/fixture";
|
|
12
12
|
//#region src/sig/portable-key-id.test.ts
|
|
13
13
|
const did = await exportDidKey(ed25519PublicKey.publicKey);
|
|
14
14
|
const otherDid = await exportDidKey((await crypto.subtle.generateKey("Ed25519", true, ["sign", "verify"])).publicKey);
|
|
@@ -2,17 +2,17 @@ import { Temporal } from "temporal-polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
5
|
-
import { a as fetchKeyDetailed, i as fetchKey } from "../key-
|
|
6
|
-
import { h as verifyJsonLd, p as signJsonLd } from "../ld-
|
|
7
|
-
import { d as verifyProof, r as createProof } from "../proof-
|
|
8
|
-
import { n as resolvePortableActorKey } from "../portable-key-
|
|
9
|
-
import { f as verifyRequest, l as signRequest, p as verifyRequestDetailed } from "../http
|
|
5
|
+
import { a as fetchKeyDetailed, i as fetchKey } from "../key-ChfV9C3v.mjs";
|
|
6
|
+
import { h as verifyJsonLd, p as signJsonLd } from "../ld-DBBVabBC.mjs";
|
|
7
|
+
import { d as verifyProof, r as createProof } from "../proof-MFz2960e.mjs";
|
|
8
|
+
import { n as resolvePortableActorKey } from "../portable-key-U3lW06QJ.mjs";
|
|
9
|
+
import { f as verifyRequest, l as signRequest, p as verifyRequestDetailed } from "../http--IGUT1mg.mjs";
|
|
10
10
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
11
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-
|
|
11
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-BW5VsXG3.mjs";
|
|
12
12
|
import { t as KvKeyCache } from "../keycache-Da8A8mZa.mjs";
|
|
13
13
|
import { Create, CryptographicKey, Multikey, Note, Person } from "@fedify/vocab";
|
|
14
|
-
import { test } from "@fedify/fixture";
|
|
15
14
|
import { FetchError, encodeMultibase, exportDidKey, exportSpki, parseIri, preloadedContexts } from "@fedify/vocab-runtime";
|
|
15
|
+
import { test } from "@fedify/fixture";
|
|
16
16
|
import { deepStrictEqual, ok, strictEqual } from "node:assert/strict";
|
|
17
17
|
import serialize from "json-canon";
|
|
18
18
|
//#region src/sig/portable-key.test.ts
|
package/dist/sig/proof.test.mjs
CHANGED
|
@@ -10,13 +10,13 @@ import "../std__assert-DvMDRPes.mjs";
|
|
|
10
10
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
11
11
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
12
12
|
import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-4IJqPYos.mjs";
|
|
13
|
-
import { a as signObject, c as verifyPortableObjectProof, d as verifyProof, i as hasProofLike, r as createProof, s as verifyObject } from "../proof-
|
|
14
|
-
import { f as verifyRequest } from "../http
|
|
13
|
+
import { a as signObject, c as verifyPortableObjectProof, d as verifyProof, i as hasProofLike, r as createProof, s as verifyObject } from "../proof-MFz2960e.mjs";
|
|
14
|
+
import { f as verifyRequest } from "../http--IGUT1mg.mjs";
|
|
15
15
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
16
|
-
import { t as getAuthenticatedDocumentLoader } from "../docloader-
|
|
16
|
+
import { t as getAuthenticatedDocumentLoader } from "../docloader-BjJreYQU.mjs";
|
|
17
17
|
import { Create, DataIntegrityProof, Document, Multikey, Note, PUBLIC_COLLECTION, Place, Translation } from "@fedify/vocab";
|
|
18
|
-
import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
19
18
|
import { decodeMultibase, encodeMultibase, exportDidKey, exportMultibaseKey, formatIri, importMultibaseKey, parseIri } from "@fedify/vocab-runtime";
|
|
19
|
+
import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
20
20
|
import { decodeHex } from "byte-encodings/hex";
|
|
21
21
|
import serialize from "json-canon";
|
|
22
22
|
//#region src/sig/proof.test.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "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-DBBVabBC.mjs";
|
|
5
5
|
import jsonld from "@fedify/vocab-runtime/jsonld";
|
|
6
6
|
//#region src/federation/temporal.ts
|
|
7
7
|
function isPlainObject(value) {
|
package/dist/testing/kv.test.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
|
6
6
|
import { t as ManualClockKvStore } from "../kv-DBRWVx3Q.mjs";
|
|
7
7
|
import { n as baseOptions, o as stringSchema, t as MockQueue } from "../tasks-IG3pHfvZ.mjs";
|
|
8
8
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
9
|
-
import { o as createFederation } from "../middleware-
|
|
9
|
+
import { o as createFederation } from "../middleware-BW7-tHAG.mjs";
|
|
10
10
|
//#region src/testing/kv.test.ts
|
|
11
11
|
test("ManualClockKvStore keeps an entry at its exact expiration instant", async () => {
|
|
12
12
|
const kv = new ManualClockKvStore();
|
package/dist/testing/mod.d.mts
CHANGED
|
@@ -1253,6 +1253,18 @@ interface FanoutMessage {
|
|
|
1253
1253
|
readonly inboxes: Readonly<Record<string, {
|
|
1254
1254
|
readonly actorIds: readonly string[];
|
|
1255
1255
|
readonly sharedInbox: boolean;
|
|
1256
|
+
/**
|
|
1257
|
+
* The canonical form of the FEP-ef61 portable inbox that the inbox
|
|
1258
|
+
* stands for.
|
|
1259
|
+
* @internal
|
|
1260
|
+
*/
|
|
1261
|
+
readonly portableInbox?: string;
|
|
1262
|
+
/**
|
|
1263
|
+
* The compatible identifiers of the portable inbox on each gateway to
|
|
1264
|
+
* deliver through, in order.
|
|
1265
|
+
* @internal
|
|
1266
|
+
*/
|
|
1267
|
+
readonly gatewayInboxes?: readonly string[];
|
|
1256
1268
|
}>>;
|
|
1257
1269
|
readonly activity: unknown;
|
|
1258
1270
|
readonly activityId?: string;
|
|
@@ -1296,6 +1308,27 @@ interface OutboxMessage {
|
|
|
1296
1308
|
* @internal
|
|
1297
1309
|
*/
|
|
1298
1310
|
readonly circuitHeldSince?: string;
|
|
1311
|
+
/**
|
|
1312
|
+
* The canonical form of the FEP-ef61 portable inbox that {@link inbox}, its
|
|
1313
|
+
* compatible identifier on a gateway, stands for.
|
|
1314
|
+
* @internal
|
|
1315
|
+
*/
|
|
1316
|
+
readonly portableInbox?: string;
|
|
1317
|
+
/**
|
|
1318
|
+
* The compatible identifiers of the FEP-ef61 portable inbox on each gateway
|
|
1319
|
+
* that is still to be tried, in order. {@link inbox} is the first one.
|
|
1320
|
+
* If there is more than one, the activity is delivered through the first
|
|
1321
|
+
* gateway that accepts it.
|
|
1322
|
+
* @internal
|
|
1323
|
+
*/
|
|
1324
|
+
readonly gatewayInboxes?: readonly string[];
|
|
1325
|
+
/**
|
|
1326
|
+
* The times before which each of {@link gatewayInboxes} must not be tried
|
|
1327
|
+
* again, as their responses' `Retry-After` headers requested, keyed by
|
|
1328
|
+
* the inbox URL, in ISO 8601.
|
|
1329
|
+
* @internal
|
|
1330
|
+
*/
|
|
1331
|
+
readonly gatewayNotBefore?: Readonly<Record<string, string>>;
|
|
1299
1332
|
readonly traceContext: Readonly<Record<string, string>>;
|
|
1300
1333
|
}
|
|
1301
1334
|
/**
|
|
@@ -4170,6 +4203,52 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
4170
4203
|
* [instance actor]: https://swicg.github.io/activitypub-http-signature/#instance-actor
|
|
4171
4204
|
*/
|
|
4172
4205
|
getSignedKeyOwner(options: GetKeyOwnerOptions): Promise<Actor | null>;
|
|
4206
|
+
/**
|
|
4207
|
+
* Checks whether the request is signed by an actor who belongs to
|
|
4208
|
+
* the intended audience of an object, i.e., the owner of the signed key
|
|
4209
|
+
* (see {@link RequestContext.getSignedKeyOwner}) is one of the object's
|
|
4210
|
+
* `to`, `cc`, `bto`, `bcc`, and `audience`, or a member of one of them
|
|
4211
|
+
* according to the `isMember` option.
|
|
4212
|
+
*
|
|
4213
|
+
* Everyone belongs to the audience of a publicly addressed object, so it
|
|
4214
|
+
* returns `true` for such an object even if the request is not signed.
|
|
4215
|
+
*
|
|
4216
|
+
* This can be used in authorization predicates for serving non-public
|
|
4217
|
+
* objects, which [FEP-ef61] requires of gateways serving portable objects.
|
|
4218
|
+
* [FEP-ef61] portable IDs are compared by their canonical forms, so
|
|
4219
|
+
* an `ap:` URI, an `ap+ef61:` URI, and a compatible identifier on any
|
|
4220
|
+
* gateway refer to the same actor.
|
|
4221
|
+
*
|
|
4222
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
4223
|
+
*
|
|
4224
|
+
* @param object The object whose audience is checked.
|
|
4225
|
+
* @param options Options for checking the audience.
|
|
4226
|
+
* @returns `true` if the object is publicly addressed, or the request is
|
|
4227
|
+
* signed by an actor who belongs to its audience.
|
|
4228
|
+
* @since 2.4.0
|
|
4229
|
+
*/
|
|
4230
|
+
isSignedByAudience(object: Object$1, options?: IsSignedByAudienceOptions): Promise<boolean>;
|
|
4231
|
+
}
|
|
4232
|
+
/**
|
|
4233
|
+
* Options for {@link RequestContext.isSignedByAudience} method.
|
|
4234
|
+
* @since 2.4.0
|
|
4235
|
+
*/
|
|
4236
|
+
interface IsSignedByAudienceOptions extends GetKeyOwnerOptions {
|
|
4237
|
+
/**
|
|
4238
|
+
* Checks whether the actor who signed the request is a member of
|
|
4239
|
+
* an addressee of the object that is not the actor itself, e.g.,
|
|
4240
|
+
* a followers collection. Fedify does not resolve collections by itself,
|
|
4241
|
+
* as only the application can tell their members reliably.
|
|
4242
|
+
*
|
|
4243
|
+
* It is called for each such addressee in order until it returns `true`.
|
|
4244
|
+
* If it is omitted, only the actors that the object addresses directly
|
|
4245
|
+
* belong to its audience.
|
|
4246
|
+
* @param addressee The ID of the addressee, e.g., the ID of a followers
|
|
4247
|
+
* collection.
|
|
4248
|
+
* @param actor The actor who signed the request.
|
|
4249
|
+
* @returns `true` if the actor is a member of the addressee.
|
|
4250
|
+
*/
|
|
4251
|
+
isMember?: (addressee: URL, actor: Actor) => boolean | Promise<boolean>;
|
|
4173
4252
|
}
|
|
4174
4253
|
/**
|
|
4175
4254
|
* A context for inbox listeners.
|
package/dist/testing/mod.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import "temporal-polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { r as testDefinitions } from "../dist-DJQM4u7i.mjs";
|
|
5
|
-
import { n as createOutboxContext, r as createRequestContext, t as createInboxContext } from "../context-
|
|
5
|
+
import { n as createOutboxContext, r as createRequestContext, t as createInboxContext } from "../context-8Tu9kea0.mjs";
|
|
6
6
|
import { t as ManualClockKvStore } from "../kv-DBRWVx3Q.mjs";
|
|
7
7
|
import { a as numberSchema, i as makeSchema, n as baseOptions, o as stringSchema, r as envelopeSchema, t as MockQueue } from "../tasks-IG3pHfvZ.mjs";
|
|
8
|
-
import "../testing-
|
|
8
|
+
import "../testing-t8xDeJZ5.mjs";
|
|
9
9
|
export { ManualClockKvStore, MockQueue, baseOptions, createInboxContext, createOutboxContext, createRequestContext, envelopeSchema, makeSchema, numberSchema, stringSchema, testDefinitions };
|
|
@@ -2,7 +2,7 @@ import "temporal-polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import "./dist-DJQM4u7i.mjs";
|
|
5
|
-
import "./context-
|
|
5
|
+
import "./context-8Tu9kea0.mjs";
|
|
6
6
|
import "./kv-DBRWVx3Q.mjs";
|
|
7
7
|
import "./tasks-IG3pHfvZ.mjs";
|
|
8
8
|
export {};
|
|
@@ -5,12 +5,12 @@ import { t as esm_default } from "../esm-BHXXx4Wx.mjs";
|
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
6
6
|
import "../std__assert-DvMDRPes.mjs";
|
|
7
7
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
8
|
-
import { f as verifyRequest } from "../http
|
|
8
|
+
import { f as verifyRequest } from "../http--IGUT1mg.mjs";
|
|
9
9
|
import { i as rsaPrivateKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
10
|
-
import { t as getAuthenticatedDocumentLoader } from "../docloader-
|
|
10
|
+
import { t as getAuthenticatedDocumentLoader } from "../docloader-BjJreYQU.mjs";
|
|
11
11
|
import { configure, reset } from "@logtape/logtape";
|
|
12
|
-
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
13
12
|
import { FetchError, UrlError } from "@fedify/vocab-runtime";
|
|
13
|
+
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
14
14
|
import dns from "node:dns/promises";
|
|
15
15
|
import { deepStrictEqual, ok, rejects } from "node:assert/strict";
|
|
16
16
|
//#region src/utils/docloader.test.ts
|
|
@@ -567,16 +567,16 @@ test("getAuthenticatedDocumentLoader() times out", async (t) => {
|
|
|
567
567
|
let requests = 0;
|
|
568
568
|
esm_default.get(url, async () => {
|
|
569
569
|
requests++;
|
|
570
|
-
await delay(
|
|
570
|
+
await delay(200);
|
|
571
571
|
return new Response(null, { status: 401 });
|
|
572
572
|
});
|
|
573
573
|
try {
|
|
574
574
|
await rejects(getAuthenticatedDocumentLoader(identity, {
|
|
575
575
|
allowPrivateAddress: true,
|
|
576
|
-
timeout:
|
|
576
|
+
timeout: 300
|
|
577
577
|
})(url), (e) => assertTimeoutFetchError(e, url));
|
|
578
578
|
deepStrictEqual(requests, 2);
|
|
579
|
-
await delay(
|
|
579
|
+
await delay(250);
|
|
580
580
|
deepStrictEqual(requests, 2);
|
|
581
581
|
} finally {
|
|
582
582
|
esm_default.hardReset();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as kvCache, t as MockKvStore } from "../kv-cache-
|
|
4
|
+
import { n as kvCache, t as MockKvStore } from "../kv-cache-DFIUR-E5.mjs";
|
|
5
|
+
import { preloadedContexts } from "@fedify/vocab-runtime";
|
|
5
6
|
import { deepStrictEqual, throws } from "node:assert";
|
|
6
7
|
import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
7
|
-
import { preloadedContexts } from "@fedify/vocab-runtime";
|
|
8
8
|
//#region src/utils/kv-cache.test.ts
|
|
9
9
|
test("kvCache()", async (t) => {
|
|
10
10
|
const kv = new MockKvStore();
|
package/dist/utils/mod.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_kv_cache = require("../kv-cache-
|
|
3
|
+
const require_kv_cache = require("../kv-cache-BDwUzxBJ.cjs");
|
|
4
4
|
exports.getAuthenticatedDocumentLoader = require_kv_cache.getAuthenticatedDocumentLoader;
|
|
5
5
|
exports.kvCache = require_kv_cache.kvCache;
|
package/dist/utils/mod.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Temporal } from "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-DpwDPt9V.js";
|
|
4
4
|
export { getAuthenticatedDocumentLoader, kvCache };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/fedify",
|
|
3
|
-
"version": "2.4.0-dev.
|
|
3
|
+
"version": "2.4.0-dev.2212+26ce9858",
|
|
4
4
|
"description": "An ActivityPub server framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ActivityPub",
|
|
@@ -151,10 +151,10 @@
|
|
|
151
151
|
"structured-field-values": "^2.0.4",
|
|
152
152
|
"temporal-polyfill": "^1.0.1",
|
|
153
153
|
"urlpattern-polyfill": "^10.1.0",
|
|
154
|
-
"@fedify/
|
|
155
|
-
"@fedify/
|
|
156
|
-
"@fedify/vocab-runtime": "2.4.0-dev.
|
|
157
|
-
"@fedify/
|
|
154
|
+
"@fedify/vocab": "2.4.0-dev.2212+26ce9858",
|
|
155
|
+
"@fedify/webfinger": "2.4.0-dev.2212+26ce9858",
|
|
156
|
+
"@fedify/vocab-runtime": "2.4.0-dev.2212+26ce9858",
|
|
157
|
+
"@fedify/uri-template": "2.4.0-dev.2212+26ce9858"
|
|
158
158
|
},
|
|
159
159
|
"devDependencies": {
|
|
160
160
|
"@std/assert": "npm:@jsr/std__assert@^0.226.0",
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
"typescript": "^6.0.0",
|
|
168
168
|
"wrangler": "^4.17.0",
|
|
169
169
|
"@fedify/fixture": "2.0.0",
|
|
170
|
-
"@fedify/vocab-tools": "^2.4.0-dev.
|
|
170
|
+
"@fedify/vocab-tools": "^2.4.0-dev.2212+26ce9858"
|
|
171
171
|
},
|
|
172
172
|
"scripts": {
|
|
173
173
|
"build:self": "tsdown",
|