@fedify/fedify 1.10.10 → 1.10.12
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/{actor-q2gTvEOg.js → actor-BojFQubG.js} +187 -187
- package/dist/{actor-DZtfiGD5.mjs → actor-C9uF9rDY.mjs} +1 -1
- package/dist/{actor-yCME0Muf.cjs → actor-U7L0GWq5.cjs} +187 -187
- package/dist/{authdocloader-Dxs4mL_P.mjs → authdocloader-Bzj36aN0.mjs} +3 -3
- package/dist/{authdocloader-CjcVKv5l.js → authdocloader-CHdPmjrz.js} +3 -3
- package/dist/{authdocloader-C9ucnURr.cjs → authdocloader-hnKNsDdH.cjs} +3 -3
- package/dist/{builder-DBBCeuJN.mjs → builder-Bdf32cY2.mjs} +4 -4
- package/dist/{client-DfSKNItx.mjs → client-DACpcUfJ.mjs} +63 -5
- package/dist/compat/mod.cjs +1 -1
- package/dist/compat/transformers.test.mjs +3 -3
- package/dist/{docloader-D8qb26Gj.js → docloader-C7Hk8BRD.js} +121 -13
- package/dist/{docloader-DR98w4wL.cjs → docloader-VJ0pkUIi.cjs} +121 -13
- package/dist/{esm-onODA711.mjs → esm-D-9VAGKG.mjs} +1 -1
- package/dist/federation/builder.test.mjs +3 -3
- package/dist/federation/collection.test.mjs +1 -1
- package/dist/federation/handler.test.mjs +7 -7
- package/dist/federation/idempotency.test.mjs +5 -5
- package/dist/federation/inbox.test.mjs +3 -3
- package/dist/federation/keycache.test.mjs +3 -3
- package/dist/federation/kv.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +11 -11
- package/dist/federation/mod.cjs +2 -2
- package/dist/federation/mod.js +1 -1
- package/dist/federation/mq.test.mjs +1 -1
- package/dist/federation/retry.test.mjs +1 -1
- package/dist/federation/router.test.mjs +2 -2
- package/dist/federation/send.test.mjs +7 -7
- package/dist/federation/temporal.test.mjs +2 -2
- package/dist/{http-DyCX-dN3.mjs → http-B7ppDy7F.mjs} +2 -2
- package/dist/{http-mdiWJYia.cjs → http-BvdC0WpM.cjs} +3 -3
- package/dist/{http-D6Qz3p20.js → http-DOLmvrYy.js} +3 -3
- package/dist/{inbox-BZN50kyQ.mjs → inbox-BtX2yRj2.mjs} +1 -1
- package/dist/{key-TRp8WTUL.js → key-BHH7odYU.js} +2 -2
- package/dist/{key-DXUAJBZu.mjs → key-CHBIITWw.mjs} +1 -1
- package/dist/{key-DRfL8gil.cjs → key-CiP-0NDL.cjs} +2 -2
- package/dist/{key-CSH0Pfat.mjs → key-CvS3OKm_.mjs} +2 -2
- package/dist/{key-DPzMtgeE.cjs → key-LHWWSWcX.cjs} +1 -1
- package/dist/{keycache-DETDxpbh.mjs → keycache-Bgm-3VZ1.mjs} +1 -1
- package/dist/{keys-8FIoKqmB.mjs → keys-BkXWqCAE.mjs} +1 -1
- package/dist/{ld-BaJmhpEa.mjs → ld-BJtgkkBN.mjs} +2 -2
- package/dist/{lookup-C6wM-gq1.js → lookup-BRKVwJc1.js} +1 -1
- package/dist/{lookup-CX2yfN-X.mjs → lookup-D1kdVIs5.mjs} +1 -1
- package/dist/{lookup-B7TLaXFf.cjs → lookup-PjDK1BMX.cjs} +1 -1
- package/dist/{middleware-BXc5M6YG.js → middleware-BPwhaRyh.js} +8 -8
- package/dist/{middleware-BJ7otoEC.mjs → middleware-BmYq8xCJ.mjs} +1 -1
- package/dist/{middleware-BQ6evC7E.mjs → middleware-C26Vj2UM.mjs} +15 -15
- package/dist/{middleware-cNynSnF6.cjs → middleware-DhHhj1FR.cjs} +1 -1
- package/dist/{middleware-DpVqFb2x.cjs → middleware-Fq0SOUBc.cjs} +10 -10
- package/dist/mod.cjs +10 -10
- package/dist/mod.js +9 -9
- package/dist/nodeinfo/client.test.mjs +63 -3
- package/dist/nodeinfo/handler.test.mjs +2 -2
- package/dist/nodeinfo/mod.cjs +1 -1
- package/dist/nodeinfo/mod.js +1 -1
- package/dist/nodeinfo/semver.test.mjs +1 -1
- package/dist/nodeinfo/types.test.mjs +1 -1
- package/dist/otel/exporter.test.mjs +1 -1
- package/dist/otel/mod.cjs +1 -1
- package/dist/{owner-CLGVwm9P.mjs → owner-LW_PkCQl.mjs} +3 -3
- package/dist/{proof-DxQL08gJ.js → proof-AdZX_HYz.js} +3 -3
- package/dist/{proof-CAOvY-AP.mjs → proof-B5uyl0iN.mjs} +2 -2
- package/dist/{proof-BVB37JmB.cjs → proof-BuZbhU4B.cjs} +3 -3
- package/dist/runtime/authdocloader.test.mjs +6 -6
- package/dist/runtime/docloader.test.mjs +3 -3
- package/dist/runtime/key.test.mjs +3 -3
- package/dist/runtime/langstr.test.mjs +2 -2
- package/dist/runtime/link.test.mjs +2 -2
- package/dist/runtime/mod.cjs +3 -3
- package/dist/runtime/mod.js +3 -3
- package/dist/runtime/multibase/multibase.test.mjs +2 -2
- package/dist/runtime/url.test.mjs +53 -2
- package/dist/{send-BFClgq8T.mjs → send-bU0ThH5V.mjs} +2 -2
- package/dist/sig/http.test.mjs +6 -6
- package/dist/sig/key.test.mjs +4 -4
- package/dist/sig/ld.test.mjs +5 -5
- package/dist/sig/mod.cjs +3 -3
- package/dist/sig/mod.js +3 -3
- package/dist/sig/owner.test.mjs +5 -5
- package/dist/sig/proof.test.mjs +4 -4
- package/dist/{temporal-lmewfA7Y.mjs → temporal-DURtbYTr.mjs} +1 -1
- package/dist/testing/docloader.test.mjs +1 -1
- package/dist/testing/mod.mjs +1 -1
- package/dist/{testing-B9FmxxlI.mjs → testing-BQeTO4ss.mjs} +2 -2
- package/dist/{transformers-KRl8YJCO.cjs → transformers-C1GEQMFT.cjs} +1 -1
- package/dist/{types-B0aIcMDF.js → types--FAljwt0.js} +63 -5
- package/dist/{types-DPWiFqle.cjs → types-DU73__Ms.cjs} +63 -5
- package/dist/vocab/actor.test.mjs +4 -4
- package/dist/vocab/cjs.test.mjs +1 -1
- package/dist/vocab/lookup.test.mjs +4 -4
- package/dist/vocab/mod.cjs +3 -3
- package/dist/vocab/mod.js +3 -3
- package/dist/vocab/type.test.mjs +2 -2
- package/dist/vocab/vocab.test.mjs +3 -3
- package/dist/{vocab-DP9A9TjH.mjs → vocab-C5EUmVTj.mjs} +306 -198
- package/dist/webfinger/handler.test.mjs +3 -3
- package/dist/webfinger/lookup.test.mjs +3 -3
- package/dist/webfinger/mod.cjs +1 -1
- package/dist/webfinger/mod.js +1 -1
- package/dist/x/cfworkers.cjs +1 -1
- package/dist/x/cfworkers.test.mjs +1 -1
- package/dist/x/hono.cjs +1 -1
- package/dist/x/sveltekit.cjs +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { t as test } from "../testing-
|
|
4
|
+
import { t as test } from "../testing-BQeTO4ss.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-2v7gYiZp.mjs";
|
|
7
7
|
import { t as assertThrows } from "../assert_throws-BIL7gChy.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { t as test } from "../testing-
|
|
4
|
+
import { t as test } from "../testing-BQeTO4ss.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-2v7gYiZp.mjs";
|
|
7
7
|
import { t as assertThrows } from "../assert_throws-BIL7gChy.mjs";
|
package/dist/otel/mod.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
require("../docloader-
|
|
4
|
+
require("../docloader-VJ0pkUIi.cjs");
|
|
5
5
|
let _logtape_logtape = require("@logtape/logtape");
|
|
6
6
|
let _opentelemetry_core = require("@opentelemetry/core");
|
|
7
7
|
//#region src/otel/exporter.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { J as getDocumentLoader, ot as name, s as CryptographicKey, st as version, v as Object$1 } from "./vocab-
|
|
5
|
-
import { i as isActor } from "./actor-
|
|
6
|
-
import "./key-
|
|
4
|
+
import { J as getDocumentLoader, ot as name, s as CryptographicKey, st as version, v as Object$1 } from "./vocab-C5EUmVTj.mjs";
|
|
5
|
+
import { i as isActor } from "./actor-C9uF9rDY.mjs";
|
|
6
|
+
import "./key-CvS3OKm_.mjs";
|
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
//#region src/sig/owner.ts
|
|
9
9
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
|
-
import { d as name, f as version, i as getDocumentLoader } from "./docloader-
|
|
4
|
-
import { G as Multikey, Tt as getTypeId, b as DataIntegrityProof, i as isActor, q as Object$1, s as Activity, y as CryptographicKey } from "./actor-
|
|
5
|
-
import { n as fetchKey, o as validateCryptoKey } from "./key-
|
|
3
|
+
import { d as name, f as version, i as getDocumentLoader } from "./docloader-C7Hk8BRD.js";
|
|
4
|
+
import { G as Multikey, Tt as getTypeId, b as DataIntegrityProof, i as isActor, q as Object$1, s as Activity, y as CryptographicKey } from "./actor-BojFQubG.js";
|
|
5
|
+
import { n as fetchKey, o as validateCryptoKey } from "./key-BHH7odYU.js";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import jsonld from "jsonld";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { U as getTypeId, c as DataIntegrityProof, g as Multikey, ot as name, st as version, t as Activity } from "./vocab-
|
|
5
|
-
import { a as validateCryptoKey, n as fetchKey } from "./key-
|
|
4
|
+
import { U as getTypeId, c as DataIntegrityProof, g as Multikey, ot as name, st as version, t as Activity } from "./vocab-C5EUmVTj.mjs";
|
|
5
|
+
import { a as validateCryptoKey, n as fetchKey } from "./key-CvS3OKm_.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { encodeHex } from "byte-encodings/hex";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
|
-
const require_docloader = require("./docloader-
|
|
4
|
-
const require_actor = require("./actor-
|
|
5
|
-
const require_key = require("./key-
|
|
3
|
+
const require_docloader = require("./docloader-VJ0pkUIi.cjs");
|
|
4
|
+
const require_actor = require("./actor-U7L0GWq5.cjs");
|
|
5
|
+
const require_key = require("./key-CiP-0NDL.cjs");
|
|
6
6
|
let _logtape_logtape = require("@logtape/logtape");
|
|
7
7
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
8
8
|
let jsonld = require("jsonld");
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { $ as UrlError } from "../vocab-
|
|
5
|
-
import { a as mockDocumentLoader, t as test } from "../testing-
|
|
4
|
+
import { $ as UrlError } from "../vocab-C5EUmVTj.mjs";
|
|
5
|
+
import { a as mockDocumentLoader, t as test } from "../testing-BQeTO4ss.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
7
|
import "../std__assert-2v7gYiZp.mjs";
|
|
8
8
|
import { t as assertRejects } from "../assert_rejects-CJC9ThS-.mjs";
|
|
9
|
-
import { l as verifyRequest } from "../http-
|
|
10
|
-
import { t as getAuthenticatedDocumentLoader } from "../authdocloader-
|
|
11
|
-
import { t as esm_default } from "../esm-
|
|
12
|
-
import { i as rsaPrivateKey2 } from "../keys-
|
|
9
|
+
import { l as verifyRequest } from "../http-B7ppDy7F.mjs";
|
|
10
|
+
import { t as getAuthenticatedDocumentLoader } from "../authdocloader-Bzj36aN0.mjs";
|
|
11
|
+
import { t as esm_default } from "../esm-D-9VAGKG.mjs";
|
|
12
|
+
import { i as rsaPrivateKey2 } from "../keys-BkXWqCAE.mjs";
|
|
13
13
|
//#region src/runtime/authdocloader.test.ts
|
|
14
14
|
test("getAuthenticatedDocumentLoader()", async (t) => {
|
|
15
15
|
esm_default.spyGlobal();
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { $ as UrlError, G as FetchError, J as getDocumentLoader, X as getUserAgent, Z as kvCache, at as preloadedContexts, st as version } from "../vocab-
|
|
5
|
-
import { a as mockDocumentLoader, t as test } from "../testing-
|
|
4
|
+
import { $ as UrlError, G as FetchError, J as getDocumentLoader, X as getUserAgent, Z as kvCache, at as preloadedContexts, st as version } from "../vocab-C5EUmVTj.mjs";
|
|
5
|
+
import { a as mockDocumentLoader, t as test } from "../testing-BQeTO4ss.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
7
|
import "../std__assert-2v7gYiZp.mjs";
|
|
8
8
|
import { t as assertRejects } from "../assert_rejects-CJC9ThS-.mjs";
|
|
9
9
|
import { t as assertThrows } from "../assert_throws-BIL7gChy.mjs";
|
|
10
10
|
import { t as assert } from "../assert-DikXweDx.mjs";
|
|
11
11
|
import { t as MemoryKvStore } from "../kv-OuT2IU64.mjs";
|
|
12
|
-
import { t as esm_default } from "../esm-
|
|
12
|
+
import { t as esm_default } from "../esm-D-9VAGKG.mjs";
|
|
13
13
|
import { t as createTestTracerProvider } from "../otel-D00WjYJ1.mjs";
|
|
14
14
|
import process from "node:process";
|
|
15
15
|
//#region src/runtime/docloader.test.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { F as importPkcs1, I as importSpki, M as exportSpki, N as importMultibaseKey, P as importPem, j as exportMultibaseKey } from "../vocab-
|
|
5
|
-
import { t as test } from "../testing-
|
|
4
|
+
import { F as importPkcs1, I as importSpki, M as exportSpki, N as importMultibaseKey, P as importPem, j as exportMultibaseKey } from "../vocab-C5EUmVTj.mjs";
|
|
5
|
+
import { t as test } from "../testing-BQeTO4ss.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
7
|
import "../std__assert-2v7gYiZp.mjs";
|
|
8
|
-
import { i as importJwk, t as exportJwk } from "../key-
|
|
8
|
+
import { i as importJwk, t as exportJwk } from "../key-CvS3OKm_.mjs";
|
|
9
9
|
//#region src/runtime/key.test.ts
|
|
10
10
|
const rsaSpki = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxsRuvCkgJtflBTl4OVsm\nnt/J1mQfZasfJtN33dcZ3d1lJroxmgmMu69zjGEAwkNbMQaWNLqC4eogkJaeJ4RR\n5MHYXkL9nNilVoTkjX5BVit3puzs7XJ7WQnKQgQMI+ezn24GHsZ/v1JIo77lerX5\nk4HNwTNVt+yaZVQWaOMR3+6FwziQR6kd0VuG9/a9dgAnz2cEoORRC1i4W7IZaB1s\nZnh1WbHbevlGd72HSXll5rocPIHn8gq6xpBgpHwRphlRsgn4KHaJ6brXDIJjrnQh\nIe/YUBOGj/ImSEXhRwlFerKsoAVnZ0Hwbfa46qk44TAt8CyoPMWmpK6pt0ng4pQ2\nuwIDAQAB\n-----END PUBLIC KEY-----\n";
|
|
11
11
|
const rsaPkcs1 = "-----BEGIN RSA PUBLIC KEY-----\nMIIBCgKCAQEAxsRuvCkgJtflBTl4OVsmnt/J1mQfZasfJtN33dcZ3d1lJroxmgmM\nu69zjGEAwkNbMQaWNLqC4eogkJaeJ4RR5MHYXkL9nNilVoTkjX5BVit3puzs7XJ7\nWQnKQgQMI+ezn24GHsZ/v1JIo77lerX5k4HNwTNVt+yaZVQWaOMR3+6FwziQR6kd\n0VuG9/a9dgAnz2cEoORRC1i4W7IZaB1sZnh1WbHbevlGd72HSXll5rocPIHn8gq6\nxpBgpHwRphlRsgn4KHaJ6brXDIJjrnQhIe/YUBOGj/ImSEXhRwlFerKsoAVnZ0Hw\nbfa46qk44TAt8CyoPMWmpK6pt0ng4pQ2uwIDAQAB\n-----END RSA PUBLIC KEY-----\n";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { A as LanguageString } from "../vocab-
|
|
5
|
-
import { t as test } from "../testing-
|
|
4
|
+
import { A as LanguageString } from "../vocab-C5EUmVTj.mjs";
|
|
5
|
+
import { t as test } from "../testing-BQeTO4ss.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
7
|
import "../std__assert-2v7gYiZp.mjs";
|
|
8
8
|
import { parseLanguageTag } from "@phensley/language-tag";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { it as HttpHeaderLink } from "../vocab-
|
|
5
|
-
import { t as test } from "../testing-
|
|
4
|
+
import { it as HttpHeaderLink } from "../vocab-C5EUmVTj.mjs";
|
|
5
|
+
import { t as test } from "../testing-BQeTO4ss.mjs";
|
|
6
6
|
import { deepStrictEqual, throws } from "node:assert";
|
|
7
7
|
//#region src/runtime/link.test.ts
|
|
8
8
|
test("String Good 1", () => {
|
package/dist/runtime/mod.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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_docloader = require("../docloader-
|
|
5
|
-
const require_actor = require("../actor-
|
|
6
|
-
const require_authdocloader = require("../authdocloader-
|
|
4
|
+
const require_docloader = require("../docloader-VJ0pkUIi.cjs");
|
|
5
|
+
const require_actor = require("../actor-U7L0GWq5.cjs");
|
|
6
|
+
const require_authdocloader = require("../authdocloader-hnKNsDdH.cjs");
|
|
7
7
|
exports.FetchError = require_docloader.FetchError;
|
|
8
8
|
exports.LanguageString = require_actor.LanguageString;
|
|
9
9
|
exports.exportMultibaseKey = require_actor.exportMultibaseKey;
|
package/dist/runtime/mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
|
-
import { i as getDocumentLoader, o as getUserAgent, r as fetchDocumentLoader, s as kvCache, t as FetchError } from "../docloader-
|
|
4
|
-
import { Ct as importPkcs1, St as importPem, bt as exportSpki, vt as LanguageString, wt as importSpki, xt as importMultibaseKey, yt as exportMultibaseKey } from "../actor-
|
|
5
|
-
import { t as getAuthenticatedDocumentLoader } from "../authdocloader-
|
|
3
|
+
import { i as getDocumentLoader, o as getUserAgent, r as fetchDocumentLoader, s as kvCache, t as FetchError } from "../docloader-C7Hk8BRD.js";
|
|
4
|
+
import { Ct as importPkcs1, St as importPem, bt as exportSpki, vt as LanguageString, wt as importSpki, xt as importMultibaseKey, yt as exportMultibaseKey } from "../actor-BojFQubG.js";
|
|
5
|
+
import { t as getAuthenticatedDocumentLoader } from "../authdocloader-CHdPmjrz.js";
|
|
6
6
|
export { FetchError, LanguageString, exportMultibaseKey, exportSpki, fetchDocumentLoader, getAuthenticatedDocumentLoader, getDocumentLoader, getUserAgent, importMultibaseKey, importPem, importPkcs1, importSpki, kvCache };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { B as names, H as encodeText, L as decode, R as encode, V as decodeText, z as codes } from "../../vocab-
|
|
5
|
-
import { t as test } from "../../testing-
|
|
4
|
+
import { B as names, H as encodeText, L as decode, R as encode, V as decodeText, z as codes } from "../../vocab-C5EUmVTj.mjs";
|
|
5
|
+
import { t as test } from "../../testing-BQeTO4ss.mjs";
|
|
6
6
|
import { t as assertEquals } from "../../assert_equals-Ew3jOFa3.mjs";
|
|
7
7
|
import "../../std__assert-2v7gYiZp.mjs";
|
|
8
8
|
//#region src/runtime/multibase/multibase.test.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { $ as UrlError, et as expandIPv6Address, nt as isValidPublicIPv6Address, rt as validatePublicUrl, tt as isValidPublicIPv4Address } from "../vocab-
|
|
5
|
-
import { t as test } from "../testing-
|
|
4
|
+
import { $ as UrlError, et as expandIPv6Address, nt as isValidPublicIPv6Address, rt as validatePublicUrl, tt as isValidPublicIPv4Address } from "../vocab-C5EUmVTj.mjs";
|
|
5
|
+
import { t as test } from "../testing-BQeTO4ss.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
7
|
import { n as assertFalse, t as assertRejects } from "../assert_rejects-CJC9ThS-.mjs";
|
|
8
8
|
import { t as assert } from "../assert-DikXweDx.mjs";
|
|
@@ -14,7 +14,24 @@ test("validatePublicUrl()", async () => {
|
|
|
14
14
|
await assertRejects(() => validatePublicUrl("https://127.0.0.1"), UrlError);
|
|
15
15
|
await assertRejects(() => validatePublicUrl("https://[::1]"), UrlError);
|
|
16
16
|
await assertRejects(() => validatePublicUrl("http://[::ffff:7f00:1]/"), UrlError);
|
|
17
|
+
await assertRejects(() => validatePublicUrl("https://[64:ff9b::7f00:1]/"), UrlError);
|
|
18
|
+
await assertRejects(() => validatePublicUrl("https://[64:ff9b::a00:1]/"), UrlError);
|
|
19
|
+
await assertRejects(() => validatePublicUrl("https://[64:ff9b:1::a00:1]/"), UrlError);
|
|
20
|
+
await assertRejects(() => validatePublicUrl("https://[64:ff9b:1::808:808]/"), UrlError);
|
|
21
|
+
await assertRejects(() => validatePublicUrl("https://[2001::]/"), UrlError);
|
|
22
|
+
await assertRejects(() => validatePublicUrl("https://[2002:a00:1::]/"), UrlError);
|
|
23
|
+
for (const url of [
|
|
24
|
+
"https://100.64.0.1",
|
|
25
|
+
"https://198.18.0.1",
|
|
26
|
+
"https://224.0.0.1",
|
|
27
|
+
"https://240.0.0.1",
|
|
28
|
+
"https://192.0.2.1",
|
|
29
|
+
"https://192.88.99.1",
|
|
30
|
+
"https://198.51.100.1",
|
|
31
|
+
"https://203.0.113.1"
|
|
32
|
+
]) await assertRejects(() => validatePublicUrl(url), UrlError);
|
|
17
33
|
await validatePublicUrl("https://[2001:db8::1]");
|
|
34
|
+
await validatePublicUrl("https://[64:ff9b::8.8.8.8]");
|
|
18
35
|
});
|
|
19
36
|
test("isValidPublicIPv4Address()", () => {
|
|
20
37
|
assert(isValidPublicIPv4Address("8.8.8.8"));
|
|
@@ -23,6 +40,24 @@ test("isValidPublicIPv4Address()", () => {
|
|
|
23
40
|
assertFalse(isValidPublicIPv4Address("10.0.0.1"));
|
|
24
41
|
assertFalse(isValidPublicIPv4Address("127.16.0.1"));
|
|
25
42
|
assertFalse(isValidPublicIPv4Address("169.254.0.1"));
|
|
43
|
+
assertFalse(isValidPublicIPv4Address("100.64.0.1"));
|
|
44
|
+
assertFalse(isValidPublicIPv4Address("100.127.255.255"));
|
|
45
|
+
assertFalse(isValidPublicIPv4Address("192.0.0.1"));
|
|
46
|
+
assertFalse(isValidPublicIPv4Address("192.0.2.1"));
|
|
47
|
+
assertFalse(isValidPublicIPv4Address("192.88.99.0"));
|
|
48
|
+
assertFalse(isValidPublicIPv4Address("192.88.99.1"));
|
|
49
|
+
assertFalse(isValidPublicIPv4Address("192.88.99.2"));
|
|
50
|
+
assertFalse(isValidPublicIPv4Address("192.88.99.255"));
|
|
51
|
+
assertFalse(isValidPublicIPv4Address("198.18.0.1"));
|
|
52
|
+
assertFalse(isValidPublicIPv4Address("198.19.255.255"));
|
|
53
|
+
assertFalse(isValidPublicIPv4Address("198.51.100.1"));
|
|
54
|
+
assertFalse(isValidPublicIPv4Address("203.0.113.1"));
|
|
55
|
+
assertFalse(isValidPublicIPv4Address("224.0.0.1"));
|
|
56
|
+
assertFalse(isValidPublicIPv4Address("239.255.255.255"));
|
|
57
|
+
assertFalse(isValidPublicIPv4Address("240.0.0.1"));
|
|
58
|
+
assertFalse(isValidPublicIPv4Address("255.255.255.255"));
|
|
59
|
+
assertFalse(isValidPublicIPv4Address("1.2.3"));
|
|
60
|
+
assertFalse(isValidPublicIPv4Address("999.1.1.1"));
|
|
26
61
|
});
|
|
27
62
|
test("isValidPublicIPv6Address()", () => {
|
|
28
63
|
assert(isValidPublicIPv6Address("2001:db8::1"));
|
|
@@ -32,12 +67,28 @@ test("isValidPublicIPv6Address()", () => {
|
|
|
32
67
|
assertFalse(isValidPublicIPv6Address("ff00::1"));
|
|
33
68
|
assertFalse(isValidPublicIPv6Address("::"));
|
|
34
69
|
assertFalse(isValidPublicIPv6Address("::ffff:7f00:1"));
|
|
70
|
+
assertFalse(isValidPublicIPv6Address("64:ff9b::7f00:1"));
|
|
71
|
+
assertFalse(isValidPublicIPv6Address("64:ff9b::127.0.0.1"));
|
|
72
|
+
assertFalse(isValidPublicIPv6Address("64:ff9b::a00:1"));
|
|
73
|
+
assertFalse(isValidPublicIPv6Address("64:ff9b::10.0.0.1"));
|
|
74
|
+
assertFalse(isValidPublicIPv6Address("64:ff9b:1::"));
|
|
75
|
+
assertFalse(isValidPublicIPv6Address("64:ff9b:1::a00:1"));
|
|
76
|
+
assertFalse(isValidPublicIPv6Address("64:ff9b:1::10.0.0.1"));
|
|
77
|
+
assertFalse(isValidPublicIPv6Address("2001::"));
|
|
78
|
+
assertFalse(isValidPublicIPv6Address("2001:0:4136:e378:8000:63bf:3fff:fdd2"));
|
|
79
|
+
assertFalse(isValidPublicIPv6Address("2002:a00:1::"));
|
|
80
|
+
assertFalse(isValidPublicIPv6Address("2002:7f00:1::"));
|
|
81
|
+
assertFalse(isValidPublicIPv6Address("2002:c0a8:1::"));
|
|
82
|
+
assertFalse(isValidPublicIPv6Address("2002:a9fe:1::"));
|
|
83
|
+
assert(isValidPublicIPv6Address("64:ff9b::808:808"));
|
|
84
|
+
assert(isValidPublicIPv6Address("64:ff9b::8.8.8.8"));
|
|
35
85
|
});
|
|
36
86
|
test("expandIPv6Address()", () => {
|
|
37
87
|
assertEquals(expandIPv6Address("::"), "0000:0000:0000:0000:0000:0000:0000:0000");
|
|
38
88
|
assertEquals(expandIPv6Address("::1"), "0000:0000:0000:0000:0000:0000:0000:0001");
|
|
39
89
|
assertEquals(expandIPv6Address("2001:db8::"), "2001:0db8:0000:0000:0000:0000:0000:0000");
|
|
40
90
|
assertEquals(expandIPv6Address("2001:db8::1"), "2001:0db8:0000:0000:0000:0000:0000:0001");
|
|
91
|
+
assertEquals(expandIPv6Address("64:ff9b::8.8.8.8"), "0064:ff9b:0000:0000:0000:0000:0808:0808");
|
|
41
92
|
});
|
|
42
93
|
//#endregion
|
|
43
94
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { ot as name, st as version } from "./vocab-
|
|
5
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { ot as name, st as version } from "./vocab-C5EUmVTj.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-B7ppDy7F.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
//#region src/federation/send.ts
|
package/dist/sig/http.test.mjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { M as exportSpki } from "../vocab-
|
|
5
|
-
import { a as mockDocumentLoader, t as test } from "../testing-
|
|
4
|
+
import { M as exportSpki } from "../vocab-C5EUmVTj.mjs";
|
|
5
|
+
import { a as mockDocumentLoader, t as test } from "../testing-BQeTO4ss.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
7
|
import { a as assertExists, t as assertStringIncludes } from "../std__assert-2v7gYiZp.mjs";
|
|
8
8
|
import { n as assertFalse, t as assertRejects } from "../assert_rejects-CJC9ThS-.mjs";
|
|
9
9
|
import { t as assertThrows } from "../assert_throws-BIL7gChy.mjs";
|
|
10
10
|
import { t as assert } from "../assert-DikXweDx.mjs";
|
|
11
|
-
import { t as exportJwk } from "../key-
|
|
12
|
-
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 } from "../http-
|
|
13
|
-
import { t as esm_default } from "../esm-
|
|
14
|
-
import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-
|
|
11
|
+
import { t as exportJwk } from "../key-CvS3OKm_.mjs";
|
|
12
|
+
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 } from "../http-B7ppDy7F.mjs";
|
|
13
|
+
import { t as esm_default } from "../esm-D-9VAGKG.mjs";
|
|
14
|
+
import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-BkXWqCAE.mjs";
|
|
15
15
|
import { encodeBase64 } from "byte-encodings/base64";
|
|
16
16
|
//#region src/sig/http.test.ts
|
|
17
17
|
test("signRequest() [draft-cavage]", async () => {
|
package/dist/sig/key.test.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { g as Multikey, s as CryptographicKey } from "../vocab-
|
|
5
|
-
import { a as mockDocumentLoader, t as test } from "../testing-
|
|
4
|
+
import { g as Multikey, s as CryptographicKey } from "../vocab-C5EUmVTj.mjs";
|
|
5
|
+
import { a as mockDocumentLoader, t as test } from "../testing-BQeTO4ss.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
7
|
import "../std__assert-2v7gYiZp.mjs";
|
|
8
8
|
import { t as assertRejects } from "../assert_rejects-CJC9ThS-.mjs";
|
|
9
9
|
import { t as assertThrows } from "../assert_throws-BIL7gChy.mjs";
|
|
10
|
-
import { a as validateCryptoKey, i as importJwk, n as fetchKey, r as generateCryptoKeyPair, t as exportJwk } from "../key-
|
|
11
|
-
import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-
|
|
10
|
+
import { a as validateCryptoKey, i as importJwk, n as fetchKey, r as generateCryptoKeyPair, t as exportJwk } from "../key-CvS3OKm_.mjs";
|
|
11
|
+
import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-BkXWqCAE.mjs";
|
|
12
12
|
//#region src/sig/key.test.ts
|
|
13
13
|
test("validateCryptoKey()", async () => {
|
|
14
14
|
const pkcs1v15 = await crypto.subtle.generateKey({
|
package/dist/sig/ld.test.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { s as CryptographicKey } from "../vocab-
|
|
5
|
-
import { a as mockDocumentLoader, t as test } from "../testing-
|
|
4
|
+
import { s as CryptographicKey } from "../vocab-C5EUmVTj.mjs";
|
|
5
|
+
import { a as mockDocumentLoader, t as test } from "../testing-BQeTO4ss.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
7
|
import { n as assertFalse, t as assertRejects } from "../assert_rejects-CJC9ThS-.mjs";
|
|
8
8
|
import { t as assertThrows } from "../assert_throws-BIL7gChy.mjs";
|
|
9
9
|
import { t as assert } from "../assert-DikXweDx.mjs";
|
|
10
|
-
import { r as generateCryptoKeyPair } from "../key-
|
|
11
|
-
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-
|
|
12
|
-
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-
|
|
10
|
+
import { r as generateCryptoKeyPair } from "../key-CvS3OKm_.mjs";
|
|
11
|
+
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-BJtgkkBN.mjs";
|
|
12
|
+
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-BkXWqCAE.mjs";
|
|
13
13
|
import { encodeBase64 } from "byte-encodings/base64";
|
|
14
14
|
//#region src/sig/ld.test.ts
|
|
15
15
|
test("isInvalidUrlTypeError()", () => {
|
package/dist/sig/mod.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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_key = require("../key-
|
|
5
|
-
const require_http = require("../http-
|
|
6
|
-
const require_proof = require("../proof-
|
|
4
|
+
const require_key = require("../key-CiP-0NDL.cjs");
|
|
5
|
+
const require_http = require("../http-BvdC0WpM.cjs");
|
|
6
|
+
const require_proof = require("../proof-BuZbhU4B.cjs");
|
|
7
7
|
exports.attachSignature = require_proof.attachSignature;
|
|
8
8
|
exports.createProof = require_proof.createProof;
|
|
9
9
|
exports.createSignature = require_proof.createSignature;
|
package/dist/sig/mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
|
-
import { i as importJwk, n as fetchKey, r as generateCryptoKeyPair, t as exportJwk } from "../key-
|
|
4
|
-
import { n as signRequest, r as verifyRequest } from "../http-
|
|
5
|
-
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 { i as importJwk, n as fetchKey, r as generateCryptoKeyPair, t as exportJwk } from "../key-BHH7odYU.js";
|
|
4
|
+
import { n as signRequest, r as verifyRequest } from "../http-DOLmvrYy.js";
|
|
5
|
+
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-AdZX_HYz.js";
|
|
6
6
|
export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getKeyOwner, importJwk, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|
package/dist/sig/owner.test.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { o as Create, s as CryptographicKey } from "../vocab-
|
|
5
|
-
import { t as lookupObject } from "../lookup-
|
|
6
|
-
import { a as mockDocumentLoader, t as test } from "../testing-
|
|
4
|
+
import { o as Create, s as CryptographicKey } from "../vocab-C5EUmVTj.mjs";
|
|
5
|
+
import { t as lookupObject } from "../lookup-D1kdVIs5.mjs";
|
|
6
|
+
import { a as mockDocumentLoader, t as test } from "../testing-BQeTO4ss.mjs";
|
|
7
7
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
8
8
|
import "../std__assert-2v7gYiZp.mjs";
|
|
9
9
|
import { n as assertFalse } from "../assert_rejects-CJC9ThS-.mjs";
|
|
10
10
|
import { t as assert } from "../assert-DikXweDx.mjs";
|
|
11
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-
|
|
11
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-LW_PkCQl.mjs";
|
|
12
12
|
import { t as createTestTracerProvider } from "../otel-D00WjYJ1.mjs";
|
|
13
|
-
import { o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-
|
|
13
|
+
import { o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-BkXWqCAE.mjs";
|
|
14
14
|
//#region src/sig/owner.test.ts
|
|
15
15
|
test("doesActorOwnKey()", async () => {
|
|
16
16
|
const options = {
|
package/dist/sig/proof.test.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { L as decode, N as importMultibaseKey, _ as Note, c as DataIntegrityProof, g as Multikey, o as Create, w as Place } from "../vocab-
|
|
5
|
-
import { a as mockDocumentLoader, t as test } from "../testing-
|
|
4
|
+
import { L as decode, N as importMultibaseKey, _ as Note, c as DataIntegrityProof, g as Multikey, o as Create, w as Place } from "../vocab-C5EUmVTj.mjs";
|
|
5
|
+
import { a as mockDocumentLoader, t as test } from "../testing-BQeTO4ss.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
7
|
import "../std__assert-2v7gYiZp.mjs";
|
|
8
8
|
import { t as assertRejects } from "../assert_rejects-CJC9ThS-.mjs";
|
|
9
9
|
import { t as assertInstanceOf } from "../assert_instance_of-C4Ri6VuN.mjs";
|
|
10
|
-
import { i as verifyProof, n as signObject, r as verifyObject, t as createProof } from "../proof-
|
|
11
|
-
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-
|
|
10
|
+
import { i as verifyProof, n as signObject, r as verifyObject, t as createProof } from "../proof-B5uyl0iN.mjs";
|
|
11
|
+
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-BkXWqCAE.mjs";
|
|
12
12
|
import { decodeHex, encodeHex } from "byte-encodings/hex";
|
|
13
13
|
//#region src/sig/proof.test.ts
|
|
14
14
|
const fep8b32TestVectorPrivateKey = await crypto.subtle.importKey("jwk", {
|
|
@@ -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-BJtgkkBN.mjs";
|
|
5
5
|
import jsonld from "jsonld";
|
|
6
6
|
//#region src/federation/temporal.ts
|
|
7
7
|
function isPlainObject(value) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { a as mockDocumentLoader, t as test } from "../testing-
|
|
4
|
+
import { a as mockDocumentLoader, t as test } from "../testing-BQeTO4ss.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-2v7gYiZp.mjs";
|
|
7
7
|
//#region src/testing/docloader.test.ts
|
package/dist/testing/mod.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { i as createRequestContext, n as testDefinitions, r as createInboxContext, t as test } from "../testing-
|
|
4
|
+
import { i as createRequestContext, n as testDefinitions, r as createInboxContext, t as test } from "../testing-BQeTO4ss.mjs";
|
|
5
5
|
export { createInboxContext, createRequestContext, test, testDefinitions };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { W as lookupWebFinger, ut as __require } from "./vocab-
|
|
5
|
-
import { i as RouterError, n as traverseCollection, t as lookupObject } from "./lookup-
|
|
4
|
+
import { W as lookupWebFinger, ut as __require } from "./vocab-C5EUmVTj.mjs";
|
|
5
|
+
import { i as RouterError, n as traverseCollection, t as lookupObject } from "./lookup-D1kdVIs5.mjs";
|
|
6
6
|
import { configure, getConsoleSink, getLogger, reset } from "@logtape/logtape";
|
|
7
7
|
import { trace } from "@opentelemetry/api";
|
|
8
8
|
//#region src/testing/docloader.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
|
-
require("./docloader-
|
|
3
|
+
require("./docloader-VJ0pkUIi.cjs");
|
|
4
4
|
//#region src/compat/transformers.ts
|
|
5
5
|
const logger = (0, require("@logtape/logtape").getLogger)([
|
|
6
6
|
"fedify",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
|
-
import { o as getUserAgent } from "./docloader-
|
|
3
|
+
import { l as UrlError, o as getUserAgent, u as validatePublicUrl } from "./docloader-C7Hk8BRD.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
//#region src/nodeinfo/semver.ts
|
|
6
6
|
const MAX_LENGTH = 256;
|
|
@@ -138,15 +138,72 @@ const logger = getLogger([
|
|
|
138
138
|
"nodeinfo",
|
|
139
139
|
"client"
|
|
140
140
|
]);
|
|
141
|
+
const DEFAULT_MAX_REDIRECTION = 5;
|
|
142
|
+
/**
|
|
143
|
+
* Fetches a URL while guarding against SSRF. Before every request—including
|
|
144
|
+
* each redirect hop—the destination is validated with
|
|
145
|
+
* {@link validatePublicUrl}, so that loopback, link-local, and private
|
|
146
|
+
* addresses, as well as non-HTTP(S) schemes such as `data:`, are rejected.
|
|
147
|
+
* Redirects are followed manually with a cap, so that a public URL cannot
|
|
148
|
+
* bounce the request to an internal address.
|
|
149
|
+
* @param url The URL to fetch.
|
|
150
|
+
* @param headers The request headers.
|
|
151
|
+
* @returns The final response, or `null` if the URL is disallowed or there
|
|
152
|
+
* are too many redirects.
|
|
153
|
+
*/
|
|
154
|
+
async function fetchPublicUrl(url, headers) {
|
|
155
|
+
let current = url instanceof URL ? url : new URL(url);
|
|
156
|
+
let redirected = 0;
|
|
157
|
+
while (true) {
|
|
158
|
+
try {
|
|
159
|
+
await validatePublicUrl(current.href);
|
|
160
|
+
} catch (e) {
|
|
161
|
+
if (e instanceof UrlError) {
|
|
162
|
+
logger.error("Refused to fetch a private or invalid URL {url}: {error}", {
|
|
163
|
+
url: current.href,
|
|
164
|
+
error: e
|
|
165
|
+
});
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
throw e;
|
|
169
|
+
}
|
|
170
|
+
const response = await fetch(current, {
|
|
171
|
+
headers,
|
|
172
|
+
redirect: "manual"
|
|
173
|
+
});
|
|
174
|
+
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
|
|
175
|
+
redirected++;
|
|
176
|
+
if (redirected >= DEFAULT_MAX_REDIRECTION) {
|
|
177
|
+
logger.error("Too many redirections ({redirections}) while fetching {url}.", {
|
|
178
|
+
redirections: redirected,
|
|
179
|
+
url: current.href
|
|
180
|
+
});
|
|
181
|
+
return null;
|
|
182
|
+
}
|
|
183
|
+
const next = new URL(response.headers.get("Location"), response.url == null || response.url === "" ? current : response.url);
|
|
184
|
+
if (next.protocol !== current.protocol) {
|
|
185
|
+
logger.error("Refused a redirect to a different protocol ({protocol} to {redirectedProtocol}) while fetching NodeInfo.", {
|
|
186
|
+
protocol: current.protocol,
|
|
187
|
+
redirectedProtocol: next.protocol
|
|
188
|
+
});
|
|
189
|
+
return null;
|
|
190
|
+
}
|
|
191
|
+
current = next;
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
return response;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
141
197
|
async function getNodeInfo(url, options = {}) {
|
|
142
198
|
try {
|
|
143
199
|
let nodeInfoUrl = url;
|
|
144
200
|
if (!options.direct) {
|
|
145
201
|
const wellKnownUrl = new URL("/.well-known/nodeinfo", url);
|
|
146
|
-
const wellKnownResponse = await
|
|
202
|
+
const wellKnownResponse = await fetchPublicUrl(wellKnownUrl, {
|
|
147
203
|
Accept: "application/json",
|
|
148
204
|
"User-Agent": typeof options.userAgent === "string" ? options.userAgent : getUserAgent(options.userAgent)
|
|
149
|
-
}
|
|
205
|
+
});
|
|
206
|
+
if (wellKnownResponse == null) return void 0;
|
|
150
207
|
if (!wellKnownResponse.ok) {
|
|
151
208
|
logger.error("Failed to fetch {url}: {status} {statusText}", {
|
|
152
209
|
url: wellKnownUrl.href,
|
|
@@ -166,10 +223,11 @@ async function getNodeInfo(url, options = {}) {
|
|
|
166
223
|
}
|
|
167
224
|
nodeInfoUrl = link.href;
|
|
168
225
|
}
|
|
169
|
-
const response = await
|
|
226
|
+
const response = await fetchPublicUrl(nodeInfoUrl, {
|
|
170
227
|
Accept: "application/json",
|
|
171
228
|
"User-Agent": typeof options.userAgent === "string" ? options.userAgent : getUserAgent(options.userAgent)
|
|
172
|
-
}
|
|
229
|
+
});
|
|
230
|
+
if (response == null) return void 0;
|
|
173
231
|
if (!response.ok) {
|
|
174
232
|
logger.error("Failed to fetch NodeInfo document from {url}: {status} {statusText}", {
|
|
175
233
|
url: nodeInfoUrl.toString(),
|