@fedify/fedify 2.0.0-pr.451.1731 → 2.0.0-pr.457.1754
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/README.md +3 -0
- package/dist/{actor-GwnlqPRv.js → actor--EIM8WJq.js} +1 -1
- package/dist/{actor-CRQwUlsr.js → actor-BkClSt23.js} +185 -186
- package/dist/{actor-Ci-5y3ml.cjs → actor-C1V-Vbaa.cjs} +186 -187
- package/dist/{actor-Cd2CREO0.d.ts → actor-DqFajh9s.d.ts} +2 -2
- package/dist/{actor-DDhZuMGl.d.cts → actor-f2NtjyCg.d.cts} +2 -2
- package/dist/{builder-BflZmL4k.js → builder-Drp8J0wC.js} +3 -3
- package/dist/{client-Cle5j1T1.d.cts → client-94iWEfQa.d.cts} +1 -1
- package/dist/{client-Bkaw0_PR.d.ts → client-BsGzbnV-.d.ts} +1 -1
- package/dist/{client-DylapB-t.js → client-pY7-3icS.js} +1 -1
- package/dist/compat/mod.d.cts +11 -12
- package/dist/compat/mod.d.ts +11 -12
- package/dist/compat/transformers.test.js +16 -16
- package/dist/{context-DqFifMwj.d.ts → context-DG0huGW-.d.ts} +26 -56
- package/dist/{context-BOYzcFSe.d.cts → context-DJ8aSy2Q.d.cts} +26 -56
- package/dist/{docloader-BpcE9hBI.js → docloader-BhDPeZk3.js} +4 -5
- package/dist/{esm-DjbC-dsH.js → esm-D2byLwNf.js} +1 -1
- package/dist/federation/builder.test.js +4 -4
- package/dist/federation/collection.test.js +2 -2
- package/dist/federation/handler.test.js +17 -17
- package/dist/federation/idempotency.test.js +17 -17
- package/dist/federation/inbox.test.js +3 -3
- package/dist/federation/keycache.test.js +3 -3
- package/dist/federation/kv.test.js +2 -2
- package/dist/federation/middleware.test.js +18 -18
- package/dist/federation/mod.cjs +9 -10
- package/dist/federation/mod.d.cts +11 -12
- package/dist/federation/mod.d.ts +11 -12
- package/dist/federation/mod.js +9 -10
- package/dist/federation/mq.test.js +2 -2
- package/dist/federation/negotiation.test.js +2 -2
- package/dist/federation/retry.test.js +2 -2
- package/dist/federation/router.test.js +2 -2
- package/dist/federation/send.test.js +9 -9
- package/dist/{http-BE7aFuqn.d.ts → http-BbO0ejuk.d.ts} +1 -1
- package/dist/{http-CCUJdi0H.js → http-CQraRgim.js} +2 -2
- package/dist/{http-BzsavjR2.js → http-ChVy_Zs1.js} +2 -2
- package/dist/{http-DtUGyvkU.cjs → http-Dc-3AhVQ.cjs} +5 -5
- package/dist/{http-B6SKO6NJ.d.cts → http-M8k5mKc0.d.cts} +1 -1
- package/dist/{inbox-DizLjfhC.js → inbox-c2HespXf.js} +1 -1
- package/dist/{key-De1MJH3k.js → key-DfjYEehd.js} +2 -2
- package/dist/{keycache-D2HiBv4F.js → keycache-Bqod49Je.js} +1 -1
- package/dist/{keys-B4ZjS1Ot.js → keys-DpfNqWw3.js} +1 -1
- package/dist/kv-cache--YUzf-BE.cjs +134 -0
- package/dist/kv-cache-BHyEN0Z7.js +122 -0
- package/dist/kv-cache-DN9pfMBe.js +94 -0
- package/dist/{ld-Dux3_Cw2.js → ld-DxH5pJEy.js} +2 -2
- package/dist/{lookup-Bep-EOgr.js → lookup-C5pO70ss.js} +188 -298
- package/dist/lookup-CHu82YNt.cjs +272 -0
- package/dist/{lookup-Bql--V-C.js → lookup-UlFMEz4S.js} +128 -60
- package/dist/middleware-BPWWS7Li.js +15 -0
- package/dist/middleware-BZRfF01Z.cjs +15 -0
- package/dist/{middleware-DrpnHeGO.cjs → middleware-BjvG3FSg.cjs} +18 -19
- package/dist/{middleware-D7tP9Tq6.js → middleware-CnVcyowb.js} +13 -13
- package/dist/middleware-d26uv3fL.js +26 -0
- package/dist/{middleware-BBTmHKGh.js → middleware-f2BqmeAn.js} +8 -9
- package/dist/{mod-CLKu6Uo_.d.cts → mod-0noXw66R.d.cts} +4 -4
- package/dist/{mod-DLIidI_j.d.ts → mod-B2iOw50L.d.ts} +2 -2
- package/dist/{mod-Cm97bAiT.d.ts → mod-B9M-8jm2.d.ts} +4 -4
- package/dist/{mod-CRENK2dd.d.ts → mod-BlVovdcy.d.ts} +2 -3
- package/dist/{mod-CaWbCg0N.d.ts → mod-BoHnwOCs.d.ts} +2 -2
- package/dist/{mod--K7l84wp.d.cts → mod-BxRCHTz-.d.cts} +2 -3
- package/dist/{mod-DuclhZjh.d.cts → mod-C58MZ7Wx.d.cts} +1 -1
- package/dist/{mod-D9XZsft2.d.cts → mod-DJcZDvjA.d.cts} +2 -2
- package/dist/{mod-COlOrmr9.d.cts → mod-DgdBYYa0.d.cts} +2 -2
- package/dist/{mod-CB80AlIA.d.ts → mod-Ds0mpFZU.d.ts} +1 -1
- package/dist/mod.cjs +13 -15
- package/dist/mod.d.cts +15 -16
- package/dist/mod.d.ts +16 -17
- package/dist/mod.js +14 -15
- package/dist/nodeinfo/client.test.js +4 -4
- package/dist/nodeinfo/handler.test.js +16 -16
- package/dist/nodeinfo/mod.cjs +2 -3
- package/dist/nodeinfo/mod.d.cts +2 -3
- package/dist/nodeinfo/mod.d.ts +2 -3
- package/dist/nodeinfo/mod.js +2 -3
- package/dist/nodeinfo/types.test.js +2 -2
- package/dist/{owner-dkg5OpSC.d.cts → owner-B4HbyP8s.d.cts} +2 -2
- package/dist/{owner-Zq8du9WO.js → owner-BqWkxhC_.js} +2 -2
- package/dist/{owner-CktUdA0h.d.ts → owner-kQRGVXG1.d.ts} +2 -2
- package/dist/{proof-0PY1LDZY.cjs → proof-DHEZDAfy.cjs} +7 -7
- package/dist/{proof-aIlK5BTc.js → proof-DKHqWkww.js} +3 -3
- package/dist/{proof-C5S_3hdJ.js → proof-DjnaYscE.js} +2 -2
- package/dist/{send-BbVnlsQO.js → send-DG2jH3Yb.js} +2 -2
- package/dist/sig/http.test.js +7 -7
- package/dist/sig/key.test.js +5 -5
- package/dist/sig/ld.test.js +6 -6
- package/dist/sig/mod.cjs +5 -6
- package/dist/sig/mod.d.cts +5 -6
- package/dist/sig/mod.d.ts +5 -6
- package/dist/sig/mod.js +5 -6
- package/dist/sig/owner.test.js +6 -6
- package/dist/sig/proof.test.js +6 -6
- package/dist/testing/docloader.test.js +2 -2
- package/dist/testing/mod.d.ts +16 -72
- package/dist/testing/mod.js +2 -2
- package/dist/{testing-BkidWE0N.js → testing-CUOkRXmb.js} +1 -1
- package/dist/{types-CXnyjUdK.js → types-BtUjyi5y.js} +1 -1
- package/dist/{types-BDNYgodm.cjs → types-CWgzGaqk.cjs} +3 -3
- package/dist/utils/docloader.test.js +9 -8
- package/dist/utils/kv-cache.test.js +4 -3
- package/dist/utils/mod.cjs +5 -7
- package/dist/utils/mod.d.cts +5 -6
- package/dist/utils/mod.d.ts +5 -6
- package/dist/utils/mod.js +6 -7
- package/dist/vocab/actor.test.js +4 -4
- package/dist/vocab/lookup.test.js +3 -3
- package/dist/vocab/mod.cjs +3 -4
- package/dist/vocab/mod.d.cts +3 -4
- package/dist/vocab/mod.d.ts +3 -4
- package/dist/vocab/mod.js +3 -4
- package/dist/vocab/type.test.js +2 -2
- package/dist/vocab/vocab.test.js +3 -3
- package/dist/{vocab-Dapemq3v.cjs → vocab-DWCgeSMU.cjs} +3 -4
- package/dist/{vocab-BiKK7m2H.js → vocab-HZjpFucb.js} +2 -3
- package/dist/webfinger/handler.test.js +16 -16
- package/dist/webfinger/lookup.test.js +3 -3
- package/dist/webfinger/mod.cjs +2 -3
- package/dist/webfinger/mod.d.cts +1 -2
- package/dist/webfinger/mod.d.ts +1 -2
- package/dist/webfinger/mod.js +2 -3
- package/dist/x/cfworkers.d.cts +2 -2
- package/dist/x/cfworkers.d.ts +2 -2
- package/dist/x/cfworkers.test.js +2 -2
- package/dist/x/hono.d.cts +10 -11
- package/dist/x/hono.d.ts +10 -11
- package/dist/x/sveltekit.d.cts +10 -11
- package/dist/x/sveltekit.d.ts +10 -11
- package/package.json +4 -5
- package/dist/kv-cache-3VK2-wq_.cjs +0 -4279
- package/dist/kv-cache-DNvS-egZ.js +0 -4236
- package/dist/kv-cache-rR-Cnl95.js +0 -4267
- package/dist/lookup-BmGuy-Ps.cjs +0 -210
- package/dist/middleware-BUZSGsQH.js +0 -16
- package/dist/middleware-BusTq7Js.cjs +0 -16
- package/dist/middleware-tZdLtCWz.js +0 -26
- package/dist/request-BbHkedIU.d.cts +0 -35
- package/dist/request-Bc5CHBqO.cjs +0 -208
- package/dist/request-C0Ags1gQ.js +0 -184
- package/dist/request-U1t6zZtk.d.ts +0 -39
- package/dist/utils/request.test.d.ts +0 -3
- package/dist/utils/request.test.js +0 -48
- package/dist/utils/url.test.d.ts +0 -3
- package/dist/utils/url.test.js +0 -41
- /package/dist/{federation-DOuZpcAw.cjs → federation-CRpdnOMS.cjs} +0 -0
- /package/dist/{federation-pZJsapBn.js → federation-jcR8-ZxP.js} +0 -0
- /package/dist/{kv-Dt06smFt.d.ts → kv-BKNZ-Tb-.d.ts} +0 -0
- /package/dist/{kv-BMKIFXNW.d.cts → kv-Bxr0Q87_.d.cts} +0 -0
- /package/dist/{mod-FZd39qVq.d.cts → mod-B-hUPT2N.d.cts} +0 -0
- /package/dist/{mod-B-ZQqbGe.d.ts → mod-CVgZgliM.d.ts} +0 -0
- /package/dist/{mod-CjsiSl7_.d.ts → mod-xIj-IT58.d.ts} +0 -0
- /package/dist/{mq-CPRJk4mZ.d.ts → mq-CUKlBw08.d.ts} +0 -0
- /package/dist/{mq-B7R1Q-M5.d.cts → mq-DcJPkXD5.d.cts} +0 -0
- /package/dist/{nodeinfo-B0UefMXO.js → nodeinfo-BnthBobC.js} +0 -0
- /package/dist/{nodeinfo-ByTd7HpT.cjs → nodeinfo-CdN0rEnZ.cjs} +0 -0
- /package/dist/{sig-Dx59zAgn.js → sig-C34-oHBl.js} +0 -0
- /package/dist/{sig-DE_NC_VQ.cjs → sig-YYj5tCnr.cjs} +0 -0
- /package/dist/{utils-BXMGcmqK.js → utils-D-Va7aXC.js} +0 -0
- /package/dist/{utils-B6yXfxAQ.cjs → utils-DyRU1gdZ.cjs} +0 -0
- /package/dist/{vocab-ivDKb439.d.ts → vocab-BCWe1Ih5.d.ts} +0 -0
- /package/dist/{vocab-DCBw44JZ.d.cts → vocab-CeDBzu-f.d.cts} +0 -0
- /package/dist/{webfinger-qG8R5jc3.js → webfinger-C72Y8lrh.js} +0 -0
- /package/dist/{webfinger-C949bxcD.cjs → webfinger-vAtLmxOF.cjs} +0 -0
@@ -3,9 +3,9 @@
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
4
4
|
|
5
5
|
const require_chunk = require('./chunk-DqRYRqnO.cjs');
|
6
|
-
const
|
7
|
-
const require_actor = require('./actor-
|
8
|
-
const require_http = require('./http-
|
6
|
+
const require_lookup = require('./lookup-CHu82YNt.cjs');
|
7
|
+
const require_actor = require('./actor-C1V-Vbaa.cjs');
|
8
|
+
const require_http = require('./http-Dc-3AhVQ.cjs');
|
9
9
|
const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
10
10
|
const __opentelemetry_api = require_chunk.__toESM(require("@opentelemetry/api"));
|
11
11
|
const jsonld = require_chunk.__toESM(require("jsonld"));
|
@@ -82,7 +82,7 @@ async function createSignature(jsonLd, privateKey, keyId, { contextLoader, creat
|
|
82
82
|
*/
|
83
83
|
async function signJsonLd(jsonLd, privateKey, keyId, options) {
|
84
84
|
const tracerProvider = options.tracerProvider ?? __opentelemetry_api.trace.getTracerProvider();
|
85
|
-
const tracer = tracerProvider.getTracer(
|
85
|
+
const tracer = tracerProvider.getTracer(require_lookup.deno_default.name, require_lookup.deno_default.version);
|
86
86
|
return await tracer.startActiveSpan("ld_signatures.sign", { attributes: { "ld_signatures.key_id": keyId.href } }, async (span) => {
|
87
87
|
try {
|
88
88
|
const signature = await createSignature(jsonLd, privateKey, keyId, options);
|
@@ -221,7 +221,7 @@ async function verifySignature(jsonLd, options = {}) {
|
|
221
221
|
*/
|
222
222
|
async function verifyJsonLd(jsonLd, options = {}) {
|
223
223
|
const tracerProvider = options.tracerProvider ?? __opentelemetry_api.trace.getTracerProvider();
|
224
|
-
const tracer = tracerProvider.getTracer(
|
224
|
+
const tracer = tracerProvider.getTracer(require_lookup.deno_default.name, require_lookup.deno_default.version);
|
225
225
|
return await tracer.startActiveSpan("ld_signatures.verify", async (span) => {
|
226
226
|
try {
|
227
227
|
const object = await require_actor.Object.fromJsonLd(jsonLd, options);
|
@@ -411,7 +411,7 @@ async function createProof(object, privateKey, keyId, { contextLoader, context,
|
|
411
411
|
*/
|
412
412
|
async function signObject(object, privateKey, keyId, options = {}) {
|
413
413
|
const tracerProvider = options.tracerProvider ?? __opentelemetry_api.trace.getTracerProvider();
|
414
|
-
const tracer = tracerProvider.getTracer(
|
414
|
+
const tracer = tracerProvider.getTracer(require_lookup.deno_default.name, require_lookup.deno_default.version);
|
415
415
|
return await tracer.startActiveSpan("object_integrity_proofs.sign", { attributes: { "activitypub.object.type": require_actor.getTypeId(object).href } }, async (span) => {
|
416
416
|
try {
|
417
417
|
if (object.id != null) span.setAttribute("activitypub.object.id", object.id.href);
|
@@ -447,7 +447,7 @@ async function signObject(object, privateKey, keyId, options = {}) {
|
|
447
447
|
*/
|
448
448
|
async function verifyProof(jsonLd, proof, options = {}) {
|
449
449
|
const tracerProvider = options.tracerProvider ?? __opentelemetry_api.trace.getTracerProvider();
|
450
|
-
const tracer = tracerProvider.getTracer(
|
450
|
+
const tracer = tracerProvider.getTracer(require_lookup.deno_default.name, require_lookup.deno_default.version);
|
451
451
|
return await tracer.startActiveSpan("object_integrity_proofs.verify", async (span) => {
|
452
452
|
if (span.isRecording()) {
|
453
453
|
if (proof.cryptosuite != null) span.setAttribute("object_integrity_proofs.cryptosuite", proof.cryptosuite);
|
@@ -2,9 +2,9 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import { deno_default } from "./
|
6
|
-
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "./actor-
|
7
|
-
import { fetchKey, validateCryptoKey } from "./http-
|
5
|
+
import { deno_default } from "./lookup-UlFMEz4S.js";
|
6
|
+
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "./actor-BkClSt23.js";
|
7
|
+
import { fetchKey, validateCryptoKey } from "./http-ChVy_Zs1.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
10
10
|
import jsonld from "jsonld";
|
@@ -3,8 +3,8 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { Activity, DataIntegrityProof, Multikey, deno_default, getTypeId } from "./lookup-
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
6
|
+
import { Activity, DataIntegrityProof, Multikey, deno_default, getTypeId } from "./lookup-C5pO70ss.js";
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-DfjYEehd.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
10
10
|
import { encodeHex } from "byte-encodings/hex";
|
@@ -3,8 +3,8 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default } from "./lookup-
|
7
|
-
import { doubleKnock } from "./http-
|
6
|
+
import { deno_default } from "./lookup-C5pO70ss.js";
|
7
|
+
import { doubleKnock } from "./http-CQraRgim.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
10
10
|
|
package/dist/sig/http.test.js
CHANGED
@@ -3,20 +3,20 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import "../lookup-
|
6
|
+
import "../lookup-C5pO70ss.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
10
|
-
import "../actor
|
11
|
-
import { exportJwk } from "../key-
|
12
|
-
import { createRfc9421SignatureBase, doubleKnock, formatRfc9421Signature, formatRfc9421SignatureParameters, parseRfc9421Signature, parseRfc9421SignatureInput, signRequest, timingSafeEqual, verifyRequest } from "../http-
|
13
|
-
import { mockDocumentLoader, test } from "../testing-
|
10
|
+
import "../actor--EIM8WJq.js";
|
11
|
+
import { exportJwk } from "../key-DfjYEehd.js";
|
12
|
+
import { createRfc9421SignatureBase, doubleKnock, formatRfc9421Signature, formatRfc9421SignatureParameters, parseRfc9421Signature, parseRfc9421SignatureInput, signRequest, timingSafeEqual, verifyRequest } from "../http-CQraRgim.js";
|
13
|
+
import { mockDocumentLoader, test } from "../testing-CUOkRXmb.js";
|
14
14
|
import { assertExists, assertStringIncludes } from "../std__assert-DWivtrGR.js";
|
15
15
|
import { assertFalse, assertRejects } from "../assert_rejects-Ce45JcFg.js";
|
16
16
|
import { assertThrows } from "../assert_throws-BNXdRGWP.js";
|
17
17
|
import "../assert_not_equals-C80BG-_5.js";
|
18
|
-
import { rsaPrivateKey2, rsaPublicKey1, rsaPublicKey2, rsaPublicKey5 } from "../keys-
|
19
|
-
import { esm_default } from "../esm-
|
18
|
+
import { rsaPrivateKey2, rsaPublicKey1, rsaPublicKey2, rsaPublicKey5 } from "../keys-DpfNqWw3.js";
|
19
|
+
import { esm_default } from "../esm-D2byLwNf.js";
|
20
20
|
import { exportSpki } from "@fedify/vocab-runtime";
|
21
21
|
import { encodeBase64 } from "byte-encodings/base64";
|
22
22
|
|
package/dist/sig/key.test.js
CHANGED
@@ -3,18 +3,18 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { CryptographicKey, Multikey } from "../lookup-
|
6
|
+
import { CryptographicKey, Multikey } from "../lookup-C5pO70ss.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import "../assert-MZs1qjMx.js";
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
10
|
-
import "../actor
|
11
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "../key-
|
12
|
-
import { mockDocumentLoader, test } from "../testing-
|
10
|
+
import "../actor--EIM8WJq.js";
|
11
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "../key-DfjYEehd.js";
|
12
|
+
import { mockDocumentLoader, test } from "../testing-CUOkRXmb.js";
|
13
13
|
import "../std__assert-DWivtrGR.js";
|
14
14
|
import { assertRejects } from "../assert_rejects-Ce45JcFg.js";
|
15
15
|
import { assertThrows } from "../assert_throws-BNXdRGWP.js";
|
16
16
|
import "../assert_not_equals-C80BG-_5.js";
|
17
|
-
import { ed25519Multikey, rsaPrivateKey2, rsaPublicKey1, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
17
|
+
import { ed25519Multikey, rsaPrivateKey2, rsaPublicKey1, rsaPublicKey2, rsaPublicKey3 } from "../keys-DpfNqWw3.js";
|
18
18
|
|
19
19
|
//#region src/sig/key.test.ts
|
20
20
|
test("validateCryptoKey()", async () => {
|
package/dist/sig/ld.test.js
CHANGED
@@ -3,16 +3,16 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { CryptographicKey } from "../lookup-
|
6
|
+
import { CryptographicKey } from "../lookup-C5pO70ss.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
9
|
-
import "../actor
|
10
|
-
import { generateCryptoKeyPair } from "../key-
|
11
|
-
import { attachSignature, createSignature, detachSignature, signJsonLd, verifyJsonLd, verifySignature } from "../ld-
|
12
|
-
import { mockDocumentLoader, test } from "../testing-
|
9
|
+
import "../actor--EIM8WJq.js";
|
10
|
+
import { generateCryptoKeyPair } from "../key-DfjYEehd.js";
|
11
|
+
import { attachSignature, createSignature, detachSignature, signJsonLd, verifyJsonLd, verifySignature } from "../ld-DxH5pJEy.js";
|
12
|
+
import { mockDocumentLoader, test } from "../testing-CUOkRXmb.js";
|
13
13
|
import { assertFalse, assertRejects } from "../assert_rejects-Ce45JcFg.js";
|
14
14
|
import { assertThrows } from "../assert_throws-BNXdRGWP.js";
|
15
|
-
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-
|
15
|
+
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-DpfNqWw3.js";
|
16
16
|
import { encodeBase64 } from "byte-encodings/base64";
|
17
17
|
|
18
18
|
//#region src/sig/ld.test.ts
|
package/dist/sig/mod.cjs
CHANGED
@@ -2,12 +2,11 @@
|
|
2
2
|
const { Temporal } = require("@js-temporal/polyfill");
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
4
4
|
|
5
|
-
require('../
|
6
|
-
require('../actor-
|
7
|
-
require('../
|
8
|
-
const
|
9
|
-
|
10
|
-
require('../sig-DE_NC_VQ.cjs');
|
5
|
+
require('../lookup-CHu82YNt.cjs');
|
6
|
+
require('../actor-C1V-Vbaa.cjs');
|
7
|
+
const require_http = require('../http-Dc-3AhVQ.cjs');
|
8
|
+
const require_proof = require('../proof-DHEZDAfy.cjs');
|
9
|
+
require('../sig-YYj5tCnr.cjs');
|
11
10
|
|
12
11
|
exports.attachSignature = require_proof.attachSignature;
|
13
12
|
exports.createProof = require_proof.createProof;
|
package/dist/sig/mod.d.cts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
import "../
|
2
|
-
import "../
|
3
|
-
import "../
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../mod-COlOrmr9.cjs";
|
1
|
+
import "../vocab-CeDBzu-f.cjs";
|
2
|
+
import "../actor-f2NtjyCg.cjs";
|
3
|
+
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "../http-M8k5mKc0.cjs";
|
4
|
+
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "../owner-B4HbyP8s.cjs";
|
5
|
+
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../mod-DgdBYYa0.cjs";
|
7
6
|
export { CreateProofOptions, CreateSignatureOptions, DoesActorOwnKeyOptions, FetchKeyOptions, FetchKeyResult, GetKeyOwnerOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getKeyOwner, importJwk, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|
package/dist/sig/mod.d.ts
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import "../
|
4
|
-
import "../
|
5
|
-
import "../
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../mod-DLIidI_j.js";
|
3
|
+
import "../vocab-BCWe1Ih5.js";
|
4
|
+
import "../actor-DqFajh9s.js";
|
5
|
+
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "../http-BbO0ejuk.js";
|
6
|
+
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "../owner-kQRGVXG1.js";
|
7
|
+
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../mod-B2iOw50L.js";
|
9
8
|
export { CreateProofOptions, CreateSignatureOptions, DoesActorOwnKeyOptions, FetchKeyOptions, FetchKeyResult, GetKeyOwnerOptions, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getKeyOwner, importJwk, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|
package/dist/sig/mod.js
CHANGED
@@ -2,11 +2,10 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import "../
|
6
|
-
import "../actor-
|
7
|
-
import "../
|
8
|
-
import {
|
9
|
-
import
|
10
|
-
import "../sig-Dx59zAgn.js";
|
5
|
+
import "../lookup-UlFMEz4S.js";
|
6
|
+
import "../actor-BkClSt23.js";
|
7
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "../http-ChVy_Zs1.js";
|
8
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../proof-DKHqWkww.js";
|
9
|
+
import "../sig-C34-oHBl.js";
|
11
10
|
|
12
11
|
export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getKeyOwner, importJwk, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|
package/dist/sig/owner.test.js
CHANGED
@@ -3,19 +3,19 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { Create, lookupObject } from "../lookup-
|
6
|
+
import { Create, lookupObject } from "../lookup-C5pO70ss.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
10
|
-
import "../actor
|
11
|
-
import "../key-
|
12
|
-
import { doesActorOwnKey, getKeyOwner } from "../owner-
|
13
|
-
import { mockDocumentLoader, test } from "../testing-
|
10
|
+
import "../actor--EIM8WJq.js";
|
11
|
+
import "../key-DfjYEehd.js";
|
12
|
+
import { doesActorOwnKey, getKeyOwner } from "../owner-BqWkxhC_.js";
|
13
|
+
import { mockDocumentLoader, test } from "../testing-CUOkRXmb.js";
|
14
14
|
import "../std__assert-DWivtrGR.js";
|
15
15
|
import { assertFalse } from "../assert_rejects-Ce45JcFg.js";
|
16
16
|
import "../assert_throws-BNXdRGWP.js";
|
17
17
|
import "../assert_not_equals-C80BG-_5.js";
|
18
|
-
import { rsaPublicKey1, rsaPublicKey2 } from "../keys-
|
18
|
+
import { rsaPublicKey1, rsaPublicKey2 } from "../keys-DpfNqWw3.js";
|
19
19
|
|
20
20
|
//#region src/sig/owner.test.ts
|
21
21
|
test("doesActorOwnKey()", async () => {
|
package/dist/sig/proof.test.js
CHANGED
@@ -3,19 +3,19 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { Create, DataIntegrityProof, Multikey, Note, Place } from "../lookup-
|
6
|
+
import { Create, DataIntegrityProof, Multikey, Note, Place } from "../lookup-C5pO70ss.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import "../assert-MZs1qjMx.js";
|
9
9
|
import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
|
10
|
-
import "../actor
|
11
|
-
import "../key-
|
12
|
-
import { createProof, signObject, verifyObject, verifyProof } from "../proof-
|
13
|
-
import { mockDocumentLoader, test } from "../testing-
|
10
|
+
import "../actor--EIM8WJq.js";
|
11
|
+
import "../key-DfjYEehd.js";
|
12
|
+
import { createProof, signObject, verifyObject, verifyProof } from "../proof-DjnaYscE.js";
|
13
|
+
import { mockDocumentLoader, test } from "../testing-CUOkRXmb.js";
|
14
14
|
import "../std__assert-DWivtrGR.js";
|
15
15
|
import { assertRejects } from "../assert_rejects-Ce45JcFg.js";
|
16
16
|
import "../assert_throws-BNXdRGWP.js";
|
17
17
|
import "../assert_not_equals-C80BG-_5.js";
|
18
|
-
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-
|
18
|
+
import { ed25519Multikey, ed25519PrivateKey, ed25519PublicKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-DpfNqWw3.js";
|
19
19
|
import { decodeMultibase, importMultibaseKey } from "@fedify/vocab-runtime";
|
20
20
|
import { decodeHex, encodeHex } from "byte-encodings/hex";
|
21
21
|
|
@@ -3,11 +3,11 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import "../lookup-
|
6
|
+
import "../lookup-C5pO70ss.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import "../assert-MZs1qjMx.js";
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
10
|
-
import { mockDocumentLoader, test } from "../testing-
|
10
|
+
import { mockDocumentLoader, test } from "../testing-CUOkRXmb.js";
|
11
11
|
import "../std__assert-DWivtrGR.js";
|
12
12
|
import "../assert_rejects-Ce45JcFg.js";
|
13
13
|
import "../assert_throws-BNXdRGWP.js";
|
package/dist/testing/mod.d.ts
CHANGED
@@ -1,35 +1,9 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
3
|
globalThis.addEventListener = () => {};
|
4
|
-
import { DocumentLoader, LanguageString } from "@fedify/vocab-runtime";
|
5
|
-
import "@logtape/logtape";
|
4
|
+
import { DocumentLoader, GetUserAgentOptions, LanguageString } from "@fedify/vocab-runtime";
|
6
5
|
import { Span, TracerProvider } from "@opentelemetry/api";
|
7
6
|
|
8
|
-
//#region src/utils/request.d.ts
|
9
|
-
|
10
|
-
/**
|
11
|
-
* Options for making `User-Agent` string.
|
12
|
-
* @see {@link getUserAgent}
|
13
|
-
* @since 1.3.0
|
14
|
-
*/
|
15
|
-
interface GetUserAgentOptions {
|
16
|
-
/**
|
17
|
-
* An optional software name and version, e.g., `"Hollo/1.0.0"`.
|
18
|
-
*/
|
19
|
-
software?: string | null;
|
20
|
-
/**
|
21
|
-
* An optional URL to append to the user agent string.
|
22
|
-
* Usually the URL of the ActivityPub instance.
|
23
|
-
*/
|
24
|
-
url?: string | URL | null;
|
25
|
-
}
|
26
|
-
/**
|
27
|
-
* Gets the user agent string for the given application and URL.
|
28
|
-
* @param options The options for making the user agent string.
|
29
|
-
* @returns The user agent string.
|
30
|
-
* @since 1.3.0
|
31
|
-
*/
|
32
|
-
//#endregion
|
33
7
|
//#region src/nodeinfo/types.d.ts
|
34
8
|
/**
|
35
9
|
* The type of the result of parsing JSON.
|
@@ -7578,9 +7552,7 @@ interface Federatable<TContextData> {
|
|
7578
7552
|
* must have one or more variables.
|
7579
7553
|
* @param dispatcher An object dispatcher callback to register.
|
7580
7554
|
*/
|
7581
|
-
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls:
|
7582
|
-
typeId: URL;
|
7583
|
-
}, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
7555
|
+
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
7584
7556
|
/**
|
7585
7557
|
* Registers an object dispatcher.
|
7586
7558
|
*
|
@@ -7594,9 +7566,7 @@ interface Federatable<TContextData> {
|
|
7594
7566
|
* must have one or more variables.
|
7595
7567
|
* @param dispatcher An object dispatcher callback to register.
|
7596
7568
|
*/
|
7597
|
-
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls:
|
7598
|
-
typeId: URL;
|
7599
|
-
}, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
7569
|
+
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
7600
7570
|
/**
|
7601
7571
|
* Registers an object dispatcher.
|
7602
7572
|
*
|
@@ -7610,9 +7580,7 @@ interface Federatable<TContextData> {
|
|
7610
7580
|
* must have one or more variables.
|
7611
7581
|
* @param dispatcher An object dispatcher callback to register.
|
7612
7582
|
*/
|
7613
|
-
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls:
|
7614
|
-
typeId: URL;
|
7615
|
-
}, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
7583
|
+
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
7616
7584
|
/**
|
7617
7585
|
* Registers an object dispatcher.
|
7618
7586
|
*
|
@@ -7626,9 +7594,7 @@ interface Federatable<TContextData> {
|
|
7626
7594
|
* must have one or more variables.
|
7627
7595
|
* @param dispatcher An object dispatcher callback to register.
|
7628
7596
|
*/
|
7629
|
-
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls:
|
7630
|
-
typeId: URL;
|
7631
|
-
}, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
7597
|
+
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
7632
7598
|
/**
|
7633
7599
|
* Registers an object dispatcher.
|
7634
7600
|
*
|
@@ -7642,9 +7608,7 @@ interface Federatable<TContextData> {
|
|
7642
7608
|
* must have one or more variables.
|
7643
7609
|
* @param dispatcher An object dispatcher callback to register.
|
7644
7610
|
*/
|
7645
|
-
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls:
|
7646
|
-
typeId: URL;
|
7647
|
-
}, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
7611
|
+
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
7648
7612
|
/**
|
7649
7613
|
* Registers an object dispatcher.
|
7650
7614
|
*
|
@@ -7658,9 +7622,7 @@ interface Federatable<TContextData> {
|
|
7658
7622
|
* must have one or more variables.
|
7659
7623
|
* @param dispatcher An object dispatcher callback to register.
|
7660
7624
|
*/
|
7661
|
-
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls:
|
7662
|
-
typeId: URL;
|
7663
|
-
}, path: `${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
7625
|
+
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
7664
7626
|
/**
|
7665
7627
|
* Registers an inbox dispatcher.
|
7666
7628
|
*
|
@@ -7801,9 +7763,7 @@ interface Federatable<TContextData> {
|
|
7801
7763
|
* The path must have one or more variables.
|
7802
7764
|
* @param dispatcher A collection dispatcher callback to register.
|
7803
7765
|
*/
|
7804
|
-
setCollectionDispatcher<TObject extends Object$1, TParam extends string>(name: string | symbol, itemType:
|
7805
|
-
typeId: URL;
|
7806
|
-
}, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher<TObject, TParam, RequestContext<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParam, RequestContext<TContextData>, TContextData>;
|
7766
|
+
setCollectionDispatcher<TObject extends Object$1, TParam extends string>(name: string | symbol, itemType: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher<TObject, TParam, RequestContext<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParam, RequestContext<TContextData>, TContextData>;
|
7807
7767
|
/**
|
7808
7768
|
* Registers a collection of objects dispatcher.
|
7809
7769
|
*
|
@@ -7818,9 +7778,7 @@ interface Federatable<TContextData> {
|
|
7818
7778
|
* The path must have one or more variables.
|
7819
7779
|
* @param dispatcher A collection dispatcher callback to register.
|
7820
7780
|
*/
|
7821
|
-
setCollectionDispatcher<TObject extends Object$1, TParam extends string>(name: string | symbol, itemType:
|
7822
|
-
typeId: URL;
|
7823
|
-
}, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher<TObject, TParam, RequestContext<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParam, RequestContext<TContextData>, TContextData>;
|
7781
|
+
setCollectionDispatcher<TObject extends Object$1, TParam extends string>(name: string | symbol, itemType: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher<TObject, TParam, RequestContext<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParam, RequestContext<TContextData>, TContextData>;
|
7824
7782
|
/**
|
7825
7783
|
* Registers a collection of objects dispatcher.
|
7826
7784
|
*
|
@@ -7835,9 +7793,7 @@ interface Federatable<TContextData> {
|
|
7835
7793
|
* The path must have one or more variables.
|
7836
7794
|
* @param dispatcher A collection dispatcher callback to register.
|
7837
7795
|
*/
|
7838
|
-
setCollectionDispatcher<TObject extends Object$1, TParam extends string>(name: string | symbol, itemType:
|
7839
|
-
typeId: URL;
|
7840
|
-
}, path: `${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher<TObject, TParam, RequestContext<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParam, RequestContext<TContextData>, TContextData>;
|
7796
|
+
setCollectionDispatcher<TObject extends Object$1, TParam extends string>(name: string | symbol, itemType: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher<TObject, TParam, RequestContext<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParam, RequestContext<TContextData>, TContextData>;
|
7841
7797
|
/**
|
7842
7798
|
* Registers an ordered collection of objects dispatcher.
|
7843
7799
|
*
|
@@ -7852,9 +7808,7 @@ interface Federatable<TContextData> {
|
|
7852
7808
|
* The path must have one or more variables.
|
7853
7809
|
* @param dispatcher A collection dispatcher callback to register.
|
7854
7810
|
*/
|
7855
|
-
setOrderedCollectionDispatcher<TObject extends Object$1, TParam extends string>(name: string | symbol, itemType:
|
7856
|
-
typeId: URL;
|
7857
|
-
}, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher<TObject, TParam, RequestContext<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParam, RequestContext<TContextData>, TContextData>;
|
7811
|
+
setOrderedCollectionDispatcher<TObject extends Object$1, TParam extends string>(name: string | symbol, itemType: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher<TObject, TParam, RequestContext<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParam, RequestContext<TContextData>, TContextData>;
|
7858
7812
|
/**
|
7859
7813
|
* Registers an ordered collection of objects dispatcher.
|
7860
7814
|
*
|
@@ -7869,9 +7823,7 @@ interface Federatable<TContextData> {
|
|
7869
7823
|
* The path must have one or more variables.
|
7870
7824
|
* @param dispatcher A collection dispatcher callback to register.
|
7871
7825
|
*/
|
7872
|
-
setOrderedCollectionDispatcher<TObject extends Object$1, TParam extends string>(name: string | symbol, itemType:
|
7873
|
-
typeId: URL;
|
7874
|
-
}, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher<TObject, TParam, RequestContext<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParam, RequestContext<TContextData>, TContextData>;
|
7826
|
+
setOrderedCollectionDispatcher<TObject extends Object$1, TParam extends string>(name: string | symbol, itemType: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher<TObject, TParam, RequestContext<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParam, RequestContext<TContextData>, TContextData>;
|
7875
7827
|
/**
|
7876
7828
|
* Registers an ordered collection of objects dispatcher.
|
7877
7829
|
*
|
@@ -7886,9 +7838,7 @@ interface Federatable<TContextData> {
|
|
7886
7838
|
* The path must have one or more variables.
|
7887
7839
|
* @param dispatcher A collection dispatcher callback to register.
|
7888
7840
|
*/
|
7889
|
-
setOrderedCollectionDispatcher<TObject extends Object$1, TParam extends string>(name: string | symbol, itemType:
|
7890
|
-
typeId: URL;
|
7891
|
-
}, path: `${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher<TObject, TParam, RequestContext<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParam, RequestContext<TContextData>, TContextData>;
|
7841
|
+
setOrderedCollectionDispatcher<TObject extends Object$1, TParam extends string>(name: string | symbol, itemType: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher<TObject, TParam, RequestContext<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParam, RequestContext<TContextData>, TContextData>;
|
7892
7842
|
}
|
7893
7843
|
/**
|
7894
7844
|
* An object that registers federation-related business logic and dispatches
|
@@ -8346,9 +8296,7 @@ interface Context<TContextData> {
|
|
8346
8296
|
* @throws {TypeError} If values are invalid.
|
8347
8297
|
* @since 0.7.0
|
8348
8298
|
*/
|
8349
|
-
getObjectUri<TObject extends Object$1>(cls:
|
8350
|
-
typeId: URL;
|
8351
|
-
}, values: Record<string, string>): URL;
|
8299
|
+
getObjectUri<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>): URL;
|
8352
8300
|
/**
|
8353
8301
|
* Builds the URI of an actor's outbox with the given identifier.
|
8354
8302
|
* @param identifier The actor's identifier.
|
@@ -8662,9 +8610,7 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
8662
8610
|
* @throws {TypeError} If values are invalid.
|
8663
8611
|
* @since 0.7.0
|
8664
8612
|
*/
|
8665
|
-
getObject<TObject extends Object$1>(cls:
|
8666
|
-
typeId: URL;
|
8667
|
-
}, values: Record<string, string>): Promise<TObject | null>;
|
8613
|
+
getObject<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>): Promise<TObject | null>;
|
8668
8614
|
/**
|
8669
8615
|
* Gets the public key of the sender, if any exists and it is verified.
|
8670
8616
|
* Otherwise, `null` is returned.
|
@@ -8808,9 +8754,7 @@ type ParseUriResult =
|
|
8808
8754
|
* The case of an object URI.
|
8809
8755
|
*/ | {
|
8810
8756
|
readonly type: "object";
|
8811
|
-
readonly class:
|
8812
|
-
typeId: URL;
|
8813
|
-
};
|
8757
|
+
readonly class: ConstructorWithTypeId<Object$1>;
|
8814
8758
|
readonly typeId: URL;
|
8815
8759
|
readonly values: Record<string, string>;
|
8816
8760
|
}
|
package/dist/testing/mod.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import "../lookup-
|
7
|
-
import { createInboxContext, createRequestContext, test, testDefinitions } from "../testing-
|
6
|
+
import "../lookup-C5pO70ss.js";
|
7
|
+
import { createInboxContext, createRequestContext, test, testDefinitions } from "../testing-CUOkRXmb.js";
|
8
8
|
|
9
9
|
export { createInboxContext, createRequestContext, test, testDefinitions };
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { RouterError, __require, lookupObject, lookupWebFinger, traverseCollection } from "./lookup-
|
6
|
+
import { RouterError, __require, lookupObject, lookupWebFinger, traverseCollection } from "./lookup-C5pO70ss.js";
|
7
7
|
import { configure, getConsoleSink, getLogger, reset } from "@logtape/logtape";
|
8
8
|
import { trace } from "@opentelemetry/api";
|
9
9
|
|
@@ -2,8 +2,8 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import { getUserAgent } from "./request-C0Ags1gQ.js";
|
6
5
|
import { getLogger } from "@logtape/logtape";
|
6
|
+
import { getUserAgent } from "@fedify/vocab-runtime";
|
7
7
|
|
8
8
|
//#region src/nodeinfo/client.ts
|
9
9
|
const logger = getLogger([
|
@@ -3,8 +3,8 @@
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
4
4
|
|
5
5
|
const require_chunk = require('./chunk-DqRYRqnO.cjs');
|
6
|
-
const require_request = require('./request-Bc5CHBqO.cjs');
|
7
6
|
const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
7
|
+
const __fedify_vocab_runtime = require_chunk.__toESM(require("@fedify/vocab-runtime"));
|
8
8
|
|
9
9
|
//#region src/nodeinfo/client.ts
|
10
10
|
const logger = (0, __logtape_logtape.getLogger)([
|
@@ -19,7 +19,7 @@ async function getNodeInfo(url, options = {}) {
|
|
19
19
|
const wellKnownUrl = new URL("/.well-known/nodeinfo", url);
|
20
20
|
const wellKnownResponse = await fetch(wellKnownUrl, { headers: {
|
21
21
|
Accept: "application/json",
|
22
|
-
"User-Agent": typeof options.userAgent === "string" ? options.userAgent :
|
22
|
+
"User-Agent": typeof options.userAgent === "string" ? options.userAgent : (0, __fedify_vocab_runtime.getUserAgent)(options.userAgent)
|
23
23
|
} });
|
24
24
|
if (!wellKnownResponse.ok) {
|
25
25
|
logger.error("Failed to fetch {url}: {status} {statusText}", {
|
@@ -42,7 +42,7 @@ async function getNodeInfo(url, options = {}) {
|
|
42
42
|
}
|
43
43
|
const response = await fetch(nodeInfoUrl, { headers: {
|
44
44
|
Accept: "application/json",
|
45
|
-
"User-Agent": typeof options.userAgent === "string" ? options.userAgent :
|
45
|
+
"User-Agent": typeof options.userAgent === "string" ? options.userAgent : (0, __fedify_vocab_runtime.getUserAgent)(options.userAgent)
|
46
46
|
} });
|
47
47
|
if (!response.ok) {
|
48
48
|
logger.error("Failed to fetch NodeInfo document from {url}: {status} {statusText}", {
|
@@ -3,21 +3,22 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import
|
6
|
+
import "../lookup-C5pO70ss.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import "../assert-MZs1qjMx.js";
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
10
|
-
import "../actor
|
11
|
-
import "../key-
|
12
|
-
import { verifyRequest } from "../http-
|
13
|
-
import { getAuthenticatedDocumentLoader } from "../docloader-
|
14
|
-
import { mockDocumentLoader, test } from "../testing-
|
10
|
+
import "../actor--EIM8WJq.js";
|
11
|
+
import "../key-DfjYEehd.js";
|
12
|
+
import { verifyRequest } from "../http-CQraRgim.js";
|
13
|
+
import { getAuthenticatedDocumentLoader } from "../docloader-BhDPeZk3.js";
|
14
|
+
import { mockDocumentLoader, test } from "../testing-CUOkRXmb.js";
|
15
15
|
import "../std__assert-DWivtrGR.js";
|
16
16
|
import { assertRejects } from "../assert_rejects-Ce45JcFg.js";
|
17
17
|
import "../assert_throws-BNXdRGWP.js";
|
18
18
|
import "../assert_not_equals-C80BG-_5.js";
|
19
|
-
import { rsaPrivateKey2 } from "../keys-
|
20
|
-
import { esm_default } from "../esm-
|
19
|
+
import { rsaPrivateKey2 } from "../keys-DpfNqWw3.js";
|
20
|
+
import { esm_default } from "../esm-D2byLwNf.js";
|
21
|
+
import { UrlError } from "@fedify/vocab-runtime";
|
21
22
|
|
22
23
|
//#region src/utils/docloader.test.ts
|
23
24
|
test("getAuthenticatedDocumentLoader()", async (t) => {
|