@fedify/fedify 1.10.10 → 1.10.11
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-yCME0Muf.cjs → actor--xTQfY8h.cjs} +187 -187
- package/dist/{actor-q2gTvEOg.js → actor-B7XRaa54.js} +187 -187
- package/dist/{actor-DZtfiGD5.mjs → actor-CTpwJ1pI.mjs} +1 -1
- package/dist/{authdocloader-Dxs4mL_P.mjs → authdocloader-DJ-h-WMy.mjs} +3 -3
- package/dist/{authdocloader-C9ucnURr.cjs → authdocloader-DMkkNwRc.cjs} +3 -3
- package/dist/{authdocloader-CjcVKv5l.js → authdocloader-_h7VKnUP.js} +3 -3
- package/dist/{builder-DBBCeuJN.mjs → builder-Dx_LGmTI.mjs} +4 -4
- package/dist/{client-DfSKNItx.mjs → client-DDy3-85E.mjs} +1 -1
- package/dist/compat/mod.cjs +1 -1
- package/dist/compat/transformers.test.mjs +3 -3
- package/dist/{docloader-D8qb26Gj.js → docloader-Ca6-eCr_.js} +121 -13
- package/dist/{docloader-DR98w4wL.cjs → docloader-CvMstYam.cjs} +121 -13
- package/dist/{esm-onODA711.mjs → esm-CzaH6D4W.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-mdiWJYia.cjs → http-B3o3SOXX.cjs} +3 -3
- package/dist/{http-D6Qz3p20.js → http-Bku28NB8.js} +3 -3
- package/dist/{http-DyCX-dN3.mjs → http-CiqAQGRx.mjs} +2 -2
- package/dist/{inbox-BZN50kyQ.mjs → inbox-D3RCgSiJ.mjs} +1 -1
- package/dist/{key-DRfL8gil.cjs → key-BbdUjmdf.cjs} +2 -2
- package/dist/{key-DXUAJBZu.mjs → key-C15RK-kf.mjs} +1 -1
- package/dist/{key-TRp8WTUL.js → key-CJU1QxP2.js} +2 -2
- package/dist/{key-DPzMtgeE.cjs → key-ClgfrNJf.cjs} +1 -1
- package/dist/{key-CSH0Pfat.mjs → key-LJoRzwG2.mjs} +2 -2
- package/dist/{keycache-DETDxpbh.mjs → keycache-BCuiTm4y.mjs} +1 -1
- package/dist/{keys-8FIoKqmB.mjs → keys-wZip1i2J.mjs} +1 -1
- package/dist/{ld-BaJmhpEa.mjs → ld-BO_vEkla.mjs} +2 -2
- package/dist/{lookup-B7TLaXFf.cjs → lookup-Cs7LHObN.cjs} +1 -1
- package/dist/{lookup-C6wM-gq1.js → lookup-DRzvxZ-l.js} +1 -1
- package/dist/{lookup-CX2yfN-X.mjs → lookup-FvsTNqW8.mjs} +1 -1
- package/dist/{middleware-BJ7otoEC.mjs → middleware-Cdb7LDeG.mjs} +1 -1
- package/dist/{middleware-BQ6evC7E.mjs → middleware-CzjJsU2k.mjs} +15 -15
- package/dist/{middleware-DpVqFb2x.cjs → middleware-Dn5HfxXi.cjs} +10 -10
- package/dist/{middleware-BXc5M6YG.js → middleware-DoM0y4tG.js} +8 -8
- package/dist/{middleware-cNynSnF6.cjs → middleware-SfuiAsBu.cjs} +1 -1
- package/dist/mod.cjs +10 -10
- package/dist/mod.js +9 -9
- package/dist/nodeinfo/client.test.mjs +3 -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-BRgVUFTA.mjs} +3 -3
- package/dist/{proof-DxQL08gJ.js → proof-BL5RXXp2.js} +3 -3
- package/dist/{proof-BVB37JmB.cjs → proof-BPEkbKl1.cjs} +3 -3
- package/dist/{proof-CAOvY-AP.mjs → proof-De_2gCxi.mjs} +2 -2
- 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-C7irF8CJ.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-CtvhWksK.mjs} +1 -1
- package/dist/testing/docloader.test.mjs +1 -1
- package/dist/testing/mod.mjs +1 -1
- package/dist/{testing-B9FmxxlI.mjs → testing-DskvUSfh.mjs} +2 -2
- package/dist/{transformers-KRl8YJCO.cjs → transformers-BbJsnOaL.cjs} +1 -1
- package/dist/{types-B0aIcMDF.js → types-B-GUdtNR.js} +1 -1
- package/dist/{types-DPWiFqle.cjs → types-BWNGBD9D.cjs} +1 -1
- 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-C0yDmtpE.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 { C as Person, E as Service, S as Organization, U as getTypeId, W as lookupWebFinger, d as Group, ot as name, r as Application, st as version } from "./vocab-
|
|
4
|
+
import { C as Person, E as Service, S as Organization, U as getTypeId, W as lookupWebFinger, d as Group, ot as name, r as Application, st as version } from "./vocab-C0yDmtpE.mjs";
|
|
5
5
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
6
6
|
import { domainToASCII, domainToUnicode } from "node:url";
|
|
7
7
|
//#region src/vocab/actor.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { $ as UrlError, K as createRequest, Q as logRequest, Y as getRemoteDocument, rt as validatePublicUrl } from "./vocab-
|
|
5
|
-
import { a as validateCryptoKey } from "./key-
|
|
6
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { $ as UrlError, K as createRequest, Q as logRequest, Y as getRemoteDocument, rt as validatePublicUrl } from "./vocab-C0yDmtpE.mjs";
|
|
5
|
+
import { a as validateCryptoKey } from "./key-LJoRzwG2.mjs";
|
|
6
|
+
import { n as doubleKnock } from "./http-CiqAQGRx.mjs";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
//#region src/runtime/authdocloader.ts
|
|
9
9
|
const logger = getLogger([
|
|
@@ -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_key = require("./key-
|
|
5
|
-
const require_http = require("./http-
|
|
3
|
+
const require_docloader = require("./docloader-CvMstYam.cjs");
|
|
4
|
+
const require_key = require("./key-BbdUjmdf.cjs");
|
|
5
|
+
const require_http = require("./http-B3o3SOXX.cjs");
|
|
6
6
|
//#region src/runtime/authdocloader.ts
|
|
7
7
|
const logger = (0, require("@logtape/logtape").getLogger)([
|
|
8
8
|
"fedify",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
|
-
import { a as getRemoteDocument, c as logRequest, l as UrlError, n as createRequest, u as validatePublicUrl } from "./docloader-
|
|
4
|
-
import { o as validateCryptoKey } from "./key-
|
|
5
|
-
import { t as doubleKnock } from "./http-
|
|
3
|
+
import { a as getRemoteDocument, c as logRequest, l as UrlError, n as createRequest, u as validatePublicUrl } from "./docloader-Ca6-eCr_.js";
|
|
4
|
+
import { o as validateCryptoKey } from "./key-CJU1QxP2.js";
|
|
5
|
+
import { t as doubleKnock } from "./http-Bku28NB8.js";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
//#region src/runtime/authdocloader.ts
|
|
8
8
|
const logger = getLogger([
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { U as getTypeId, ot as name, st as version } from "./vocab-
|
|
5
|
-
import { i as RouterError, r as Router } from "./lookup-
|
|
6
|
-
import { t as InboxListenerSet } from "./inbox-
|
|
4
|
+
import { U as getTypeId, ot as name, st as version } from "./vocab-C0yDmtpE.mjs";
|
|
5
|
+
import { i as RouterError, r as Router } from "./lookup-FvsTNqW8.mjs";
|
|
6
|
+
import { t as InboxListenerSet } from "./inbox-D3RCgSiJ.mjs";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
9
9
|
//#region src/federation/builder.ts
|
|
@@ -40,7 +40,7 @@ var FederationBuilderImpl = class {
|
|
|
40
40
|
this.collectionTypeIds = {};
|
|
41
41
|
}
|
|
42
42
|
async build(options) {
|
|
43
|
-
const { FederationImpl } = await import("./middleware-
|
|
43
|
+
const { FederationImpl } = await import("./middleware-Cdb7LDeG.mjs");
|
|
44
44
|
const f = new FederationImpl(options);
|
|
45
45
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
46
46
|
f.router = this.router.clone();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { X as getUserAgent } from "./vocab-
|
|
4
|
+
import { X as getUserAgent } from "./vocab-C0yDmtpE.mjs";
|
|
5
5
|
import { n as parseSemVer } from "./semver-CgD82xxg.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
//#region src/nodeinfo/client.ts
|
package/dist/compat/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
|
-
const require_transformers = require("../transformers-
|
|
4
|
+
const require_transformers = require("../transformers-BbJsnOaL.cjs");
|
|
5
5
|
exports.actorDehydrator = require_transformers.actorDehydrator;
|
|
6
6
|
exports.autoIdAssigner = require_transformers.autoIdAssigner;
|
|
7
7
|
exports.getDefaultActivityTransformers = require_transformers.getDefaultActivityTransformers;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { C as Person, u as Follow } from "../vocab-
|
|
5
|
-
import { t as test } from "../testing-
|
|
4
|
+
import { C as Person, u as Follow } from "../vocab-C0yDmtpE.mjs";
|
|
5
|
+
import { t as test } from "../testing-DskvUSfh.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
7
|
import { t as assertInstanceOf } from "../assert_instance_of-C4Ri6VuN.mjs";
|
|
8
8
|
import { t as assert } from "../assert-DikXweDx.mjs";
|
|
9
9
|
import { t as MemoryKvStore } from "../kv-OuT2IU64.mjs";
|
|
10
|
-
import { _ as actorDehydrator, n as FederationImpl, v as autoIdAssigner } from "../middleware-
|
|
10
|
+
import { _ as actorDehydrator, n as FederationImpl, v as autoIdAssigner } from "../middleware-CzjJsU2k.mjs";
|
|
11
11
|
//#region src/compat/transformers.test.ts
|
|
12
12
|
const context = new FederationImpl({ kv: new MemoryKvStore() }).createContext(new URL("http://example.com/"));
|
|
13
13
|
test("autoIdAssigner", async () => {
|
|
@@ -7,7 +7,7 @@ import { lookup } from "node:dns/promises";
|
|
|
7
7
|
import { isIP } from "node:net";
|
|
8
8
|
//#region deno.json
|
|
9
9
|
var name = "@fedify/fedify";
|
|
10
|
-
var version = "1.10.
|
|
10
|
+
var version = "1.10.11";
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/runtime/contexts.ts
|
|
13
13
|
const preloadedContexts = {
|
|
@@ -4453,29 +4453,137 @@ function validatePublicIpAddress(address, family) {
|
|
|
4453
4453
|
throw new UrlError(`Invalid or private address: ${address}`);
|
|
4454
4454
|
}
|
|
4455
4455
|
function isValidPublicIPv4Address(address) {
|
|
4456
|
-
const parts = address
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
if (first === 169 && second === 254) return false;
|
|
4461
|
-
if (first === 172 && second >= 16 && second <= 31) return false;
|
|
4462
|
-
if (first === 192 && second === 168) return false;
|
|
4463
|
-
return true;
|
|
4456
|
+
const parts = parseIPv4Address(address);
|
|
4457
|
+
if (parts == null) return false;
|
|
4458
|
+
const value = ipv4PartsToNumber(parts);
|
|
4459
|
+
return !nonPublicIPv4Prefixes.some(({ base, prefix }) => matchesIPv4Prefix(value, base, prefix));
|
|
4464
4460
|
}
|
|
4465
4461
|
function isValidPublicIPv6Address(address) {
|
|
4466
|
-
|
|
4467
|
-
if (
|
|
4468
|
-
|
|
4469
|
-
|
|
4462
|
+
const words = parseIPv6Address(address);
|
|
4463
|
+
if (words == null) return false;
|
|
4464
|
+
if (nonPublicIPv6Prefixes.some(({ words: prefixWords, prefix }) => matchesIPv6Prefix(words, prefixWords, prefix))) return false;
|
|
4465
|
+
for (const { extractIPv4, prefix, words: prefixWords } of ipv6WithIPv4Prefixes) {
|
|
4466
|
+
if (!matchesIPv6Prefix(words, prefixWords, prefix)) continue;
|
|
4467
|
+
const ipv4Address = extractIPv4(words);
|
|
4468
|
+
if (ipv4Address != null && !isValidPublicIPv4Address(ipv4Address)) return false;
|
|
4469
|
+
}
|
|
4470
|
+
return true;
|
|
4470
4471
|
}
|
|
4471
4472
|
function expandIPv6Address(address) {
|
|
4472
4473
|
address = address.toLowerCase();
|
|
4474
|
+
const ipv4Delimiter = address.lastIndexOf(":");
|
|
4475
|
+
if (address.includes(".") && ipv4Delimiter >= 0) {
|
|
4476
|
+
const ipv4Parts = parseIPv4Address(address.substring(ipv4Delimiter + 1));
|
|
4477
|
+
if (ipv4Parts == null) return address;
|
|
4478
|
+
const high = (ipv4Parts[0] << 8) + ipv4Parts[1];
|
|
4479
|
+
const low = (ipv4Parts[2] << 8) + ipv4Parts[3];
|
|
4480
|
+
address = address.substring(0, ipv4Delimiter + 1) + high.toString(16) + ":" + low.toString(16);
|
|
4481
|
+
}
|
|
4473
4482
|
if (address === "::") return "0000:0000:0000:0000:0000:0000:0000:0000";
|
|
4474
4483
|
if (address.startsWith("::")) address = "0000" + address;
|
|
4475
4484
|
if (address.endsWith("::")) address = address + "0000";
|
|
4476
4485
|
address = address.replace("::", ":0000".repeat(8 - (address.match(/:/g) || []).length) + ":");
|
|
4477
4486
|
return address.split(":").map((part) => part.padStart(4, "0")).join(":");
|
|
4478
4487
|
}
|
|
4488
|
+
const nonPublicIPv4Prefixes = [
|
|
4489
|
+
ipv4Prefix("0.0.0.0/8", "RFC 6890"),
|
|
4490
|
+
ipv4Prefix("10.0.0.0/8", "RFC 1918"),
|
|
4491
|
+
ipv4Prefix("100.64.0.0/10", "RFC 6598"),
|
|
4492
|
+
ipv4Prefix("127.0.0.0/8", "RFC 1122"),
|
|
4493
|
+
ipv4Prefix("169.254.0.0/16", "RFC 3927"),
|
|
4494
|
+
ipv4Prefix("172.16.0.0/12", "RFC 1918"),
|
|
4495
|
+
ipv4Prefix("192.0.0.0/24", "RFC 6890"),
|
|
4496
|
+
ipv4Prefix("192.0.2.0/24", "RFC 5737"),
|
|
4497
|
+
ipv4Prefix("192.88.99.0/24", "RFC 7526"),
|
|
4498
|
+
ipv4Prefix("192.168.0.0/16", "RFC 1918"),
|
|
4499
|
+
ipv4Prefix("198.18.0.0/15", "RFC 2544"),
|
|
4500
|
+
ipv4Prefix("198.51.100.0/24", "RFC 5737"),
|
|
4501
|
+
ipv4Prefix("203.0.113.0/24", "RFC 5737"),
|
|
4502
|
+
ipv4Prefix("224.0.0.0/4", "RFC 5771"),
|
|
4503
|
+
ipv4Prefix("240.0.0.0/4", "RFC 1112")
|
|
4504
|
+
];
|
|
4505
|
+
const nonPublicIPv6Prefixes = [
|
|
4506
|
+
ipv6Prefix("::/16", "RFC 4291"),
|
|
4507
|
+
ipv6Prefix("2001::/32", "RFC 4380"),
|
|
4508
|
+
ipv6Prefix("2002::/16", "RFC 3056"),
|
|
4509
|
+
ipv6Prefix("64:ff9b:1::/48", "RFC 8215"),
|
|
4510
|
+
ipv6Prefix("fc00::/7", "RFC 4193"),
|
|
4511
|
+
ipv6Prefix("fe80::/10", "RFC 4291"),
|
|
4512
|
+
ipv6Prefix("ff00::/8", "RFC 4291")
|
|
4513
|
+
];
|
|
4514
|
+
const ipv6WithIPv4Prefixes = [{
|
|
4515
|
+
...ipv6Prefix("64:ff9b::/96", "RFC 6052"),
|
|
4516
|
+
extractIPv4: (words) => ipv4FromWords(words[6], words[7])
|
|
4517
|
+
}];
|
|
4518
|
+
function ipv4Prefix(cidr, rfc) {
|
|
4519
|
+
const [address, prefixText] = cidr.split("/");
|
|
4520
|
+
const prefix = parseInt(prefixText, 10);
|
|
4521
|
+
const parts = parseIPv4Address(address);
|
|
4522
|
+
if (parts == null || !Number.isInteger(prefix) || prefix < 0 || prefix > 32) throw new Error(`Invalid IPv4 prefix: ${cidr}`);
|
|
4523
|
+
return {
|
|
4524
|
+
cidr,
|
|
4525
|
+
base: ipv4PartsToNumber(parts),
|
|
4526
|
+
prefix,
|
|
4527
|
+
rfc
|
|
4528
|
+
};
|
|
4529
|
+
}
|
|
4530
|
+
function ipv6Prefix(cidr, rfc) {
|
|
4531
|
+
const [address, prefixText] = cidr.split("/");
|
|
4532
|
+
const prefix = parseInt(prefixText, 10);
|
|
4533
|
+
const words = parseIPv6Address(address);
|
|
4534
|
+
if (words == null || !Number.isInteger(prefix) || prefix < 0 || prefix > 128) throw new Error(`Invalid IPv6 prefix: ${cidr}`);
|
|
4535
|
+
return {
|
|
4536
|
+
cidr,
|
|
4537
|
+
words,
|
|
4538
|
+
prefix,
|
|
4539
|
+
rfc
|
|
4540
|
+
};
|
|
4541
|
+
}
|
|
4542
|
+
function parseIPv4Address(address) {
|
|
4543
|
+
const parts = address.split(".").map((part) => {
|
|
4544
|
+
if (!/^\d+$/.test(part)) return NaN;
|
|
4545
|
+
return parseInt(part, 10);
|
|
4546
|
+
});
|
|
4547
|
+
if (parts.length !== 4 || parts.some((part) => !Number.isInteger(part) || part < 0 || part > 255)) return null;
|
|
4548
|
+
return parts;
|
|
4549
|
+
}
|
|
4550
|
+
function parseIPv6Address(address) {
|
|
4551
|
+
const parts = expandIPv6Address(address).split(":");
|
|
4552
|
+
if (parts.length !== 8) return null;
|
|
4553
|
+
const words = parts.map((part) => {
|
|
4554
|
+
if (!/^[0-9a-f]{1,4}$/i.test(part)) return NaN;
|
|
4555
|
+
return parseInt(part, 16);
|
|
4556
|
+
});
|
|
4557
|
+
if (words.some((word) => !Number.isInteger(word) || word < 0 || word > 65535)) return null;
|
|
4558
|
+
return words;
|
|
4559
|
+
}
|
|
4560
|
+
function ipv4PartsToNumber(parts) {
|
|
4561
|
+
return parts[0] * 2 ** 24 + parts[1] * 2 ** 16 + parts[2] * 2 ** 8 + parts[3];
|
|
4562
|
+
}
|
|
4563
|
+
function ipv4FromWords(highWord, lowWord) {
|
|
4564
|
+
return [
|
|
4565
|
+
highWord >> 8,
|
|
4566
|
+
highWord & 255,
|
|
4567
|
+
lowWord >> 8,
|
|
4568
|
+
lowWord & 255
|
|
4569
|
+
].join(".");
|
|
4570
|
+
}
|
|
4571
|
+
function matchesIPv4Prefix(address, prefixBase, prefixLength) {
|
|
4572
|
+
const blockSize = 2 ** (32 - prefixLength);
|
|
4573
|
+
return Math.floor(address / blockSize) === Math.floor(prefixBase / blockSize);
|
|
4574
|
+
}
|
|
4575
|
+
function matchesIPv6Prefix(address, prefixWords, prefixLength) {
|
|
4576
|
+
let remaining = prefixLength;
|
|
4577
|
+
for (let i = 0; i < 8 && remaining > 0; i++) if (remaining >= 16) {
|
|
4578
|
+
if (address[i] !== prefixWords[i]) return false;
|
|
4579
|
+
remaining -= 16;
|
|
4580
|
+
} else {
|
|
4581
|
+
const mask = 65535 << 16 - remaining & 65535;
|
|
4582
|
+
if ((address[i] & mask) !== (prefixWords[i] & mask)) return false;
|
|
4583
|
+
remaining = 0;
|
|
4584
|
+
}
|
|
4585
|
+
return true;
|
|
4586
|
+
}
|
|
4479
4587
|
//#endregion
|
|
4480
4588
|
//#region src/runtime/docloader.ts
|
|
4481
4589
|
const logger = getLogger([
|
|
@@ -30,7 +30,7 @@ let node_dns_promises = require("node:dns/promises");
|
|
|
30
30
|
let node_net = require("node:net");
|
|
31
31
|
//#region deno.json
|
|
32
32
|
var name = "@fedify/fedify";
|
|
33
|
-
var version = "1.10.
|
|
33
|
+
var version = "1.10.11";
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region src/runtime/contexts.ts
|
|
36
36
|
const preloadedContexts = {
|
|
@@ -4476,29 +4476,137 @@ function validatePublicIpAddress(address, family) {
|
|
|
4476
4476
|
throw new UrlError(`Invalid or private address: ${address}`);
|
|
4477
4477
|
}
|
|
4478
4478
|
function isValidPublicIPv4Address(address) {
|
|
4479
|
-
const parts = address
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
if (first === 169 && second === 254) return false;
|
|
4484
|
-
if (first === 172 && second >= 16 && second <= 31) return false;
|
|
4485
|
-
if (first === 192 && second === 168) return false;
|
|
4486
|
-
return true;
|
|
4479
|
+
const parts = parseIPv4Address(address);
|
|
4480
|
+
if (parts == null) return false;
|
|
4481
|
+
const value = ipv4PartsToNumber(parts);
|
|
4482
|
+
return !nonPublicIPv4Prefixes.some(({ base, prefix }) => matchesIPv4Prefix(value, base, prefix));
|
|
4487
4483
|
}
|
|
4488
4484
|
function isValidPublicIPv6Address(address) {
|
|
4489
|
-
|
|
4490
|
-
if (
|
|
4491
|
-
|
|
4492
|
-
|
|
4485
|
+
const words = parseIPv6Address(address);
|
|
4486
|
+
if (words == null) return false;
|
|
4487
|
+
if (nonPublicIPv6Prefixes.some(({ words: prefixWords, prefix }) => matchesIPv6Prefix(words, prefixWords, prefix))) return false;
|
|
4488
|
+
for (const { extractIPv4, prefix, words: prefixWords } of ipv6WithIPv4Prefixes) {
|
|
4489
|
+
if (!matchesIPv6Prefix(words, prefixWords, prefix)) continue;
|
|
4490
|
+
const ipv4Address = extractIPv4(words);
|
|
4491
|
+
if (ipv4Address != null && !isValidPublicIPv4Address(ipv4Address)) return false;
|
|
4492
|
+
}
|
|
4493
|
+
return true;
|
|
4493
4494
|
}
|
|
4494
4495
|
function expandIPv6Address(address) {
|
|
4495
4496
|
address = address.toLowerCase();
|
|
4497
|
+
const ipv4Delimiter = address.lastIndexOf(":");
|
|
4498
|
+
if (address.includes(".") && ipv4Delimiter >= 0) {
|
|
4499
|
+
const ipv4Parts = parseIPv4Address(address.substring(ipv4Delimiter + 1));
|
|
4500
|
+
if (ipv4Parts == null) return address;
|
|
4501
|
+
const high = (ipv4Parts[0] << 8) + ipv4Parts[1];
|
|
4502
|
+
const low = (ipv4Parts[2] << 8) + ipv4Parts[3];
|
|
4503
|
+
address = address.substring(0, ipv4Delimiter + 1) + high.toString(16) + ":" + low.toString(16);
|
|
4504
|
+
}
|
|
4496
4505
|
if (address === "::") return "0000:0000:0000:0000:0000:0000:0000:0000";
|
|
4497
4506
|
if (address.startsWith("::")) address = "0000" + address;
|
|
4498
4507
|
if (address.endsWith("::")) address = address + "0000";
|
|
4499
4508
|
address = address.replace("::", ":0000".repeat(8 - (address.match(/:/g) || []).length) + ":");
|
|
4500
4509
|
return address.split(":").map((part) => part.padStart(4, "0")).join(":");
|
|
4501
4510
|
}
|
|
4511
|
+
const nonPublicIPv4Prefixes = [
|
|
4512
|
+
ipv4Prefix("0.0.0.0/8", "RFC 6890"),
|
|
4513
|
+
ipv4Prefix("10.0.0.0/8", "RFC 1918"),
|
|
4514
|
+
ipv4Prefix("100.64.0.0/10", "RFC 6598"),
|
|
4515
|
+
ipv4Prefix("127.0.0.0/8", "RFC 1122"),
|
|
4516
|
+
ipv4Prefix("169.254.0.0/16", "RFC 3927"),
|
|
4517
|
+
ipv4Prefix("172.16.0.0/12", "RFC 1918"),
|
|
4518
|
+
ipv4Prefix("192.0.0.0/24", "RFC 6890"),
|
|
4519
|
+
ipv4Prefix("192.0.2.0/24", "RFC 5737"),
|
|
4520
|
+
ipv4Prefix("192.88.99.0/24", "RFC 7526"),
|
|
4521
|
+
ipv4Prefix("192.168.0.0/16", "RFC 1918"),
|
|
4522
|
+
ipv4Prefix("198.18.0.0/15", "RFC 2544"),
|
|
4523
|
+
ipv4Prefix("198.51.100.0/24", "RFC 5737"),
|
|
4524
|
+
ipv4Prefix("203.0.113.0/24", "RFC 5737"),
|
|
4525
|
+
ipv4Prefix("224.0.0.0/4", "RFC 5771"),
|
|
4526
|
+
ipv4Prefix("240.0.0.0/4", "RFC 1112")
|
|
4527
|
+
];
|
|
4528
|
+
const nonPublicIPv6Prefixes = [
|
|
4529
|
+
ipv6Prefix("::/16", "RFC 4291"),
|
|
4530
|
+
ipv6Prefix("2001::/32", "RFC 4380"),
|
|
4531
|
+
ipv6Prefix("2002::/16", "RFC 3056"),
|
|
4532
|
+
ipv6Prefix("64:ff9b:1::/48", "RFC 8215"),
|
|
4533
|
+
ipv6Prefix("fc00::/7", "RFC 4193"),
|
|
4534
|
+
ipv6Prefix("fe80::/10", "RFC 4291"),
|
|
4535
|
+
ipv6Prefix("ff00::/8", "RFC 4291")
|
|
4536
|
+
];
|
|
4537
|
+
const ipv6WithIPv4Prefixes = [{
|
|
4538
|
+
...ipv6Prefix("64:ff9b::/96", "RFC 6052"),
|
|
4539
|
+
extractIPv4: (words) => ipv4FromWords(words[6], words[7])
|
|
4540
|
+
}];
|
|
4541
|
+
function ipv4Prefix(cidr, rfc) {
|
|
4542
|
+
const [address, prefixText] = cidr.split("/");
|
|
4543
|
+
const prefix = parseInt(prefixText, 10);
|
|
4544
|
+
const parts = parseIPv4Address(address);
|
|
4545
|
+
if (parts == null || !Number.isInteger(prefix) || prefix < 0 || prefix > 32) throw new Error(`Invalid IPv4 prefix: ${cidr}`);
|
|
4546
|
+
return {
|
|
4547
|
+
cidr,
|
|
4548
|
+
base: ipv4PartsToNumber(parts),
|
|
4549
|
+
prefix,
|
|
4550
|
+
rfc
|
|
4551
|
+
};
|
|
4552
|
+
}
|
|
4553
|
+
function ipv6Prefix(cidr, rfc) {
|
|
4554
|
+
const [address, prefixText] = cidr.split("/");
|
|
4555
|
+
const prefix = parseInt(prefixText, 10);
|
|
4556
|
+
const words = parseIPv6Address(address);
|
|
4557
|
+
if (words == null || !Number.isInteger(prefix) || prefix < 0 || prefix > 128) throw new Error(`Invalid IPv6 prefix: ${cidr}`);
|
|
4558
|
+
return {
|
|
4559
|
+
cidr,
|
|
4560
|
+
words,
|
|
4561
|
+
prefix,
|
|
4562
|
+
rfc
|
|
4563
|
+
};
|
|
4564
|
+
}
|
|
4565
|
+
function parseIPv4Address(address) {
|
|
4566
|
+
const parts = address.split(".").map((part) => {
|
|
4567
|
+
if (!/^\d+$/.test(part)) return NaN;
|
|
4568
|
+
return parseInt(part, 10);
|
|
4569
|
+
});
|
|
4570
|
+
if (parts.length !== 4 || parts.some((part) => !Number.isInteger(part) || part < 0 || part > 255)) return null;
|
|
4571
|
+
return parts;
|
|
4572
|
+
}
|
|
4573
|
+
function parseIPv6Address(address) {
|
|
4574
|
+
const parts = expandIPv6Address(address).split(":");
|
|
4575
|
+
if (parts.length !== 8) return null;
|
|
4576
|
+
const words = parts.map((part) => {
|
|
4577
|
+
if (!/^[0-9a-f]{1,4}$/i.test(part)) return NaN;
|
|
4578
|
+
return parseInt(part, 16);
|
|
4579
|
+
});
|
|
4580
|
+
if (words.some((word) => !Number.isInteger(word) || word < 0 || word > 65535)) return null;
|
|
4581
|
+
return words;
|
|
4582
|
+
}
|
|
4583
|
+
function ipv4PartsToNumber(parts) {
|
|
4584
|
+
return parts[0] * 2 ** 24 + parts[1] * 2 ** 16 + parts[2] * 2 ** 8 + parts[3];
|
|
4585
|
+
}
|
|
4586
|
+
function ipv4FromWords(highWord, lowWord) {
|
|
4587
|
+
return [
|
|
4588
|
+
highWord >> 8,
|
|
4589
|
+
highWord & 255,
|
|
4590
|
+
lowWord >> 8,
|
|
4591
|
+
lowWord & 255
|
|
4592
|
+
].join(".");
|
|
4593
|
+
}
|
|
4594
|
+
function matchesIPv4Prefix(address, prefixBase, prefixLength) {
|
|
4595
|
+
const blockSize = 2 ** (32 - prefixLength);
|
|
4596
|
+
return Math.floor(address / blockSize) === Math.floor(prefixBase / blockSize);
|
|
4597
|
+
}
|
|
4598
|
+
function matchesIPv6Prefix(address, prefixWords, prefixLength) {
|
|
4599
|
+
let remaining = prefixLength;
|
|
4600
|
+
for (let i = 0; i < 8 && remaining > 0; i++) if (remaining >= 16) {
|
|
4601
|
+
if (address[i] !== prefixWords[i]) return false;
|
|
4602
|
+
remaining -= 16;
|
|
4603
|
+
} else {
|
|
4604
|
+
const mask = 65535 << 16 - remaining & 65535;
|
|
4605
|
+
if ((address[i] & mask) !== (prefixWords[i] & mask)) return false;
|
|
4606
|
+
remaining = 0;
|
|
4607
|
+
}
|
|
4608
|
+
return true;
|
|
4609
|
+
}
|
|
4502
4610
|
//#endregion
|
|
4503
4611
|
//#region src/runtime/docloader.ts
|
|
4504
4612
|
const logger = (0, _logtape_logtape.getLogger)([
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { ct as __commonJSMin, dt as __toESM } from "./vocab-
|
|
4
|
+
import { ct as __commonJSMin, dt as __toESM } from "./vocab-C0yDmtpE.mjs";
|
|
5
5
|
//#region ../../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js
|
|
6
6
|
var require_glob_to_regexp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
7
7
|
module.exports = function(glob, opts) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { C as Person, _ as Note, t as Activity } from "../vocab-
|
|
5
|
-
import { t as test } from "../testing-
|
|
4
|
+
import { C as Person, _ as Note, t as Activity } from "../vocab-C0yDmtpE.mjs";
|
|
5
|
+
import { t as test } from "../testing-DskvUSfh.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
7
|
import { a as assertExists } from "../std__assert-2v7gYiZp.mjs";
|
|
8
8
|
import { t as assertThrows } from "../assert_throws-BIL7gChy.mjs";
|
|
9
9
|
import { t as MemoryKvStore } from "../kv-OuT2IU64.mjs";
|
|
10
10
|
import { n as parseSemVer } from "../semver-CgD82xxg.mjs";
|
|
11
|
-
import { n as createFederationBuilder } from "../builder-
|
|
11
|
+
import { n as createFederationBuilder } from "../builder-Dx_LGmTI.mjs";
|
|
12
12
|
//#region src/federation/builder.test.ts
|
|
13
13
|
test("FederationBuilder", async (t) => {
|
|
14
14
|
await t.step("should build a Federation object with registered components", async () => {
|
|
@@ -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-DskvUSfh.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-2v7gYiZp.mjs";
|
|
7
7
|
import { n as digest, t as buildCollectionSynchronizationHeader } from "../collection-BD6-SZ6O.mjs";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { C as Person, _ as Note, o as Create } from "../vocab-
|
|
5
|
-
import { a as mockDocumentLoader, i as createRequestContext, r as createInboxContext, t as test } from "../testing-
|
|
4
|
+
import { C as Person, _ as Note, o as Create } from "../vocab-C0yDmtpE.mjs";
|
|
5
|
+
import { a as mockDocumentLoader, i as createRequestContext, r as createInboxContext, t as test } from "../testing-DskvUSfh.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
7
|
import "../std__assert-2v7gYiZp.mjs";
|
|
8
8
|
import { n as assertFalse, t as assertRejects } from "../assert_rejects-CJC9ThS-.mjs";
|
|
9
9
|
import { t as assert } from "../assert-DikXweDx.mjs";
|
|
10
10
|
import { t as MemoryKvStore } from "../kv-OuT2IU64.mjs";
|
|
11
|
-
import { a as createFederation, c as handleCollection, d as handleObject, f as respondWithObject, l as handleCustomCollection, o as acceptsJsonLd, p as respondWithObjectIfAcceptable, s as handleActor, u as handleInbox } from "../middleware-
|
|
12
|
-
import { s as signRequest } from "../http-
|
|
13
|
-
import { a as compactJsonLd, f as signJsonLd } from "../ld-
|
|
14
|
-
import { t as InboxListenerSet } from "../inbox-
|
|
11
|
+
import { a as createFederation, c as handleCollection, d as handleObject, f as respondWithObject, l as handleCustomCollection, o as acceptsJsonLd, p as respondWithObjectIfAcceptable, s as handleActor, u as handleInbox } from "../middleware-CzjJsU2k.mjs";
|
|
12
|
+
import { s as signRequest } from "../http-CiqAQGRx.mjs";
|
|
13
|
+
import { a as compactJsonLd, f as signJsonLd } from "../ld-BO_vEkla.mjs";
|
|
14
|
+
import { t as InboxListenerSet } from "../inbox-D3RCgSiJ.mjs";
|
|
15
15
|
import { t as createTestTracerProvider } from "../otel-D00WjYJ1.mjs";
|
|
16
|
-
import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-
|
|
16
|
+
import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-wZip1i2J.mjs";
|
|
17
17
|
//#region src/federation/handler.test.ts
|
|
18
18
|
test("acceptsJsonLd()", () => {
|
|
19
19
|
assert(acceptsJsonLd(new Request("https://example.com/", { headers: { Accept: "application/activity+json" } })));
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { C as Person, o as Create, u as Follow } from "../vocab-
|
|
5
|
-
import { a as mockDocumentLoader, t as test } from "../testing-
|
|
4
|
+
import { C as Person, o as Create, u as Follow } from "../vocab-C0yDmtpE.mjs";
|
|
5
|
+
import { a as mockDocumentLoader, t as test } from "../testing-DskvUSfh.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
7
|
import "../std__assert-2v7gYiZp.mjs";
|
|
8
8
|
import { t as MemoryKvStore } from "../kv-OuT2IU64.mjs";
|
|
9
|
-
import { a as createFederation } from "../middleware-
|
|
10
|
-
import { n as signObject } from "../proof-
|
|
11
|
-
import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-
|
|
9
|
+
import { a as createFederation } from "../middleware-CzjJsU2k.mjs";
|
|
10
|
+
import { n as signObject } from "../proof-De_2gCxi.mjs";
|
|
11
|
+
import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-wZip1i2J.mjs";
|
|
12
12
|
//#region src/federation/idempotency.test.ts
|
|
13
13
|
const kv = new MemoryKvStore();
|
|
14
14
|
const federationOptions = {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { O as Update, m as Invite, o as Create, t as Activity, y as Offer } from "../vocab-
|
|
5
|
-
import { t as test } from "../testing-
|
|
4
|
+
import { O as Update, m as Invite, o as Create, t as Activity, y as Offer } from "../vocab-C0yDmtpE.mjs";
|
|
5
|
+
import { t as test } from "../testing-DskvUSfh.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
7
|
import { t as assertThrows } from "../assert_throws-BIL7gChy.mjs";
|
|
8
|
-
import { t as InboxListenerSet } from "../inbox-
|
|
8
|
+
import { t as InboxListenerSet } from "../inbox-D3RCgSiJ.mjs";
|
|
9
9
|
//#region src/federation/inbox.test.ts
|
|
10
10
|
test("InboxListenerSet", () => {
|
|
11
11
|
const listeners = new InboxListenerSet();
|
|
@@ -1,13 +1,13 @@
|
|
|
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 { t as test } from "../testing-
|
|
4
|
+
import { g as Multikey, s as CryptographicKey } from "../vocab-C0yDmtpE.mjs";
|
|
5
|
+
import { t as test } from "../testing-DskvUSfh.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
7
7
|
import { t as assertInstanceOf } from "../assert_instance_of-C4Ri6VuN.mjs";
|
|
8
8
|
import { t as assert } from "../assert-DikXweDx.mjs";
|
|
9
9
|
import { t as MemoryKvStore } from "../kv-OuT2IU64.mjs";
|
|
10
|
-
import { t as KvKeyCache } from "../keycache-
|
|
10
|
+
import { t as KvKeyCache } from "../keycache-BCuiTm4y.mjs";
|
|
11
11
|
//#region src/federation/keycache.test.ts
|
|
12
12
|
test("KvKeyCache.set()", async () => {
|
|
13
13
|
const kv = new MemoryKvStore();
|
|
@@ -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-DskvUSfh.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-2v7gYiZp.mjs";
|
|
7
7
|
import { t as MemoryKvStore } from "../kv-OuT2IU64.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { C as Person, G as FetchError, U as getTypeId, _ as Note, g as Multikey, m as Invite, n as Announce, o as Create, q as fetchDocumentLoader, t as Activity, v as Object$1, y as Offer } from "../vocab-
|
|
5
|
-
import { i as RouterError, t as lookupObject } from "../lookup-
|
|
6
|
-
import { a as mockDocumentLoader, t as test } from "../testing-
|
|
4
|
+
import { C as Person, G as FetchError, U as getTypeId, _ as Note, g as Multikey, m as Invite, n as Announce, o as Create, q as fetchDocumentLoader, t as Activity, v as Object$1, y as Offer } from "../vocab-C0yDmtpE.mjs";
|
|
5
|
+
import { i as RouterError, t as lookupObject } from "../lookup-FvsTNqW8.mjs";
|
|
6
|
+
import { a as mockDocumentLoader, t as test } from "../testing-DskvUSfh.mjs";
|
|
7
7
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
8
8
|
import { n as assertStrictEquals } from "../std__assert-2v7gYiZp.mjs";
|
|
9
9
|
import { n as assertFalse, t as assertRejects } from "../assert_rejects-CJC9ThS-.mjs";
|
|
@@ -12,14 +12,14 @@ import { t as assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
|
|
|
12
12
|
import { t as assertThrows } from "../assert_throws-BIL7gChy.mjs";
|
|
13
13
|
import { t as assert } from "../assert-DikXweDx.mjs";
|
|
14
14
|
import { t as MemoryKvStore } from "../kv-OuT2IU64.mjs";
|
|
15
|
-
import { a as createFederation, i as KvSpecDeterminer, n as FederationImpl, r as InboxContextImpl, t as ContextImpl } from "../middleware-
|
|
16
|
-
import { l as verifyRequest, s as signRequest } from "../http-
|
|
17
|
-
import { t as getAuthenticatedDocumentLoader } from "../authdocloader-
|
|
18
|
-
import { a as compactJsonLd, f as signJsonLd, m as verifyJsonLd, s as detachSignature } from "../ld-
|
|
19
|
-
import { t as doesActorOwnKey } from "../owner-
|
|
20
|
-
import { n as signObject, r as verifyObject } from "../proof-
|
|
21
|
-
import { t as esm_default } from "../esm-
|
|
22
|
-
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-
|
|
15
|
+
import { a as createFederation, i as KvSpecDeterminer, n as FederationImpl, r as InboxContextImpl, t as ContextImpl } from "../middleware-CzjJsU2k.mjs";
|
|
16
|
+
import { l as verifyRequest, s as signRequest } from "../http-CiqAQGRx.mjs";
|
|
17
|
+
import { t as getAuthenticatedDocumentLoader } from "../authdocloader-DJ-h-WMy.mjs";
|
|
18
|
+
import { a as compactJsonLd, f as signJsonLd, m as verifyJsonLd, s as detachSignature } from "../ld-BO_vEkla.mjs";
|
|
19
|
+
import { t as doesActorOwnKey } from "../owner-BRgVUFTA.mjs";
|
|
20
|
+
import { n as signObject, r as verifyObject } from "../proof-De_2gCxi.mjs";
|
|
21
|
+
import { t as esm_default } from "../esm-CzaH6D4W.mjs";
|
|
22
|
+
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-wZip1i2J.mjs";
|
|
23
23
|
//#region src/testing/fixtures/example.com/person.json
|
|
24
24
|
var person_default = {
|
|
25
25
|
"@context": ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1"],
|
package/dist/federation/mod.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
require("../docloader-
|
|
5
|
-
const require_middleware = require("../middleware-
|
|
4
|
+
require("../docloader-CvMstYam.cjs");
|
|
5
|
+
const require_middleware = require("../middleware-Dn5HfxXi.cjs");
|
|
6
6
|
let es_toolkit = require("es-toolkit");
|
|
7
7
|
//#region src/federation/kv.ts
|
|
8
8
|
/**
|
package/dist/federation/mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
|
-
import { a as respondWithObjectIfAcceptable, c as createFederationBuilder, i as respondWithObject, l as Router, o as buildCollectionSynchronizationHeader, r as createExponentialBackoffPolicy, s as digest, t as createFederation, u as RouterError } from "../middleware-
|
|
3
|
+
import { a as respondWithObjectIfAcceptable, c as createFederationBuilder, i as respondWithObject, l as Router, o as buildCollectionSynchronizationHeader, r as createExponentialBackoffPolicy, s as digest, t as createFederation, u as RouterError } from "../middleware-DoM0y4tG.js";
|
|
4
4
|
import { isEqual } from "es-toolkit";
|
|
5
5
|
//#region src/federation/kv.ts
|
|
6
6
|
/**
|
|
@@ -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-DskvUSfh.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import { i as assertGreaterOrEqual, r as assertGreater } from "../std__assert-2v7gYiZp.mjs";
|
|
7
7
|
import { n as assertFalse } from "../assert_rejects-CJC9ThS-.mjs";
|