@fedify/fedify 1.9.11 → 1.9.12-dev.2265
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-I6MTQt65.js → actor-BJj7NAV7.js} +187 -187
- package/dist/{actor-BaIbAIQ4.cjs → actor-BxUB2vBw.cjs} +187 -187
- package/dist/{actor-BgNoo4Eo.mjs → actor-DKEb3nb2.mjs} +1 -1
- package/dist/{authdocloader-BML29LEF.cjs → authdocloader-BkG-kREl.cjs} +3 -3
- package/dist/{authdocloader-CQRL6xBg.mjs → authdocloader-DVWlfdZ9.mjs} +3 -3
- package/dist/{authdocloader-DGVNFUsJ.js → authdocloader-_m5yqwLt.js} +3 -3
- package/dist/{builder-B8VNNUzm.mjs → builder-Dhm6irl1.mjs} +4 -4
- package/dist/{client-Cjo9kYUV.mjs → client-CIvLnEyN.mjs} +1 -1
- package/dist/compat/mod.cjs +1 -1
- package/dist/compat/transformers.test.mjs +3 -3
- package/dist/{docloader-XzYOPh6W.js → docloader-CFM5B9fd.js} +121 -13
- package/dist/{docloader-CB5WT9yk.cjs → docloader-ojCZeNsS.cjs} +121 -13
- package/dist/{esm-Br6fmrGY.mjs → esm-DpYRgHio.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-L4148RPe.cjs → http-B7su-Fmy.cjs} +3 -3
- package/dist/{http-GSUEBn2H.mjs → http-ChKbuD-B.mjs} +2 -2
- package/dist/{http-CXpt61mo.js → http-DdMd8CPw.js} +3 -3
- package/dist/{inbox-DRfIo1Ox.mjs → inbox-Du7n_Tcq.mjs} +1 -1
- package/dist/{key-D3E68McA.cjs → key-AD7NWK_B.cjs} +2 -2
- package/dist/{key-73aMUDcO.mjs → key-Bd3kgBIA.mjs} +2 -2
- package/dist/{key-Yfx6HgfZ.cjs → key-COEspOg4.cjs} +1 -1
- package/dist/{key-CqxBq3-S.mjs → key-DINKM8mV.mjs} +1 -1
- package/dist/{key-DtaAm2V1.js → key-DvsZ4r4J.js} +2 -2
- package/dist/{keycache-tpX1dxwp.mjs → keycache-DYpvtScH.mjs} +1 -1
- package/dist/{keys-B9pkL0lY.mjs → keys-CJPe6iTW.mjs} +1 -1
- package/dist/{ld-DqEigU4F.mjs → ld-C51F-FdC.mjs} +2 -2
- package/dist/{lookup-BK6z2RO5.cjs → lookup-DrAw0WK4.cjs} +1 -1
- package/dist/{lookup-DDOc-i0I.js → lookup-avek91qK.js} +1 -1
- package/dist/{lookup-DA92hMtK.mjs → lookup-jTLErl5g.mjs} +1 -1
- package/dist/{middleware-D72Tt9sq.js → middleware-B_5QXY9T.js} +8 -8
- package/dist/{middleware-CcRfmHUw.cjs → middleware-BxPRXIp2.cjs} +10 -10
- package/dist/{middleware-DfCM9WFN.cjs → middleware-CoZn3Vmd.cjs} +1 -1
- package/dist/{middleware-DNRnMI46.mjs → middleware-ScXtn6SX.mjs} +15 -15
- package/dist/{middleware-ufTj15Ba.mjs → middleware-ySLVbIpY.mjs} +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/{owner-C7rjJog4.mjs → owner-Ul_H1ZhA.mjs} +3 -3
- package/dist/{proof-GWFCtXCY.mjs → proof-CGXr6kyw.mjs} +2 -2
- package/dist/{proof-CjgdsMq_.js → proof-CO1rdWN1.js} +3 -3
- package/dist/{proof-BZb-g5fh.cjs → proof-CpHpOx4z.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-B1cXA43r.mjs → send-BktZN-8x.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-DE-KwUkP.mjs → temporal-DG3PUHrG.mjs} +1 -1
- package/dist/testing/docloader.test.mjs +1 -1
- package/dist/testing/mod.mjs +1 -1
- package/dist/{testing-Brx3i-JJ.mjs → testing-Dbq3x7rR.mjs} +2 -2
- package/dist/{transformers-v2GoHgHn.cjs → transformers-ZXV8xoFH.cjs} +1 -1
- package/dist/{types-CRRb96yX.js → types-CysnskTc.js} +1 -1
- package/dist/{types-Ck12MwLI.cjs → types-kNVIK9BX.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-D9ewcFHJ.mjs → vocab-BmWZ5Z8b.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-BmWZ5Z8b.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,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-ojCZeNsS.cjs");
|
|
4
|
+
const require_key = require("./key-AD7NWK_B.cjs");
|
|
5
|
+
const require_http = require("./http-B7su-Fmy.cjs");
|
|
6
6
|
//#region src/runtime/authdocloader.ts
|
|
7
7
|
const logger = (0, require("@logtape/logtape").getLogger)([
|
|
8
8
|
"fedify",
|
|
@@ -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-BmWZ5Z8b.mjs";
|
|
5
|
+
import { a as validateCryptoKey } from "./key-Bd3kgBIA.mjs";
|
|
6
|
+
import { n as doubleKnock } from "./http-ChKbuD-B.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
|
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-CFM5B9fd.js";
|
|
4
|
+
import { o as validateCryptoKey } from "./key-DvsZ4r4J.js";
|
|
5
|
+
import { t as doubleKnock } from "./http-DdMd8CPw.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-BmWZ5Z8b.mjs";
|
|
5
|
+
import { i as RouterError, r as Router } from "./lookup-jTLErl5g.mjs";
|
|
6
|
+
import { t as InboxListenerSet } from "./inbox-Du7n_Tcq.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-ySLVbIpY.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-BmWZ5Z8b.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-ZXV8xoFH.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-BmWZ5Z8b.mjs";
|
|
5
|
+
import { t as test } from "../testing-Dbq3x7rR.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-DM1zFCtL.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-ScXtn6SX.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 () => {
|
|
@@ -6,7 +6,7 @@ import { lookup } from "node:dns/promises";
|
|
|
6
6
|
import { isIP } from "node:net";
|
|
7
7
|
//#region deno.json
|
|
8
8
|
var name = "@fedify/fedify";
|
|
9
|
-
var version = "1.9.
|
|
9
|
+
var version = "1.9.12-dev.2265+f8512d84";
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/runtime/contexts.ts
|
|
12
12
|
const preloadedContexts = {
|
|
@@ -4373,29 +4373,137 @@ function validatePublicIpAddress(address, family) {
|
|
|
4373
4373
|
throw new UrlError(`Invalid or private address: ${address}`);
|
|
4374
4374
|
}
|
|
4375
4375
|
function isValidPublicIPv4Address(address) {
|
|
4376
|
-
const parts = address
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
if (first === 169 && second === 254) return false;
|
|
4381
|
-
if (first === 172 && second >= 16 && second <= 31) return false;
|
|
4382
|
-
if (first === 192 && second === 168) return false;
|
|
4383
|
-
return true;
|
|
4376
|
+
const parts = parseIPv4Address(address);
|
|
4377
|
+
if (parts == null) return false;
|
|
4378
|
+
const value = ipv4PartsToNumber(parts);
|
|
4379
|
+
return !nonPublicIPv4Prefixes.some(({ base, prefix }) => matchesIPv4Prefix(value, base, prefix));
|
|
4384
4380
|
}
|
|
4385
4381
|
function isValidPublicIPv6Address(address) {
|
|
4386
|
-
|
|
4387
|
-
if (
|
|
4388
|
-
|
|
4389
|
-
|
|
4382
|
+
const words = parseIPv6Address(address);
|
|
4383
|
+
if (words == null) return false;
|
|
4384
|
+
if (nonPublicIPv6Prefixes.some(({ words: prefixWords, prefix }) => matchesIPv6Prefix(words, prefixWords, prefix))) return false;
|
|
4385
|
+
for (const { extractIPv4, prefix, words: prefixWords } of ipv6WithIPv4Prefixes) {
|
|
4386
|
+
if (!matchesIPv6Prefix(words, prefixWords, prefix)) continue;
|
|
4387
|
+
const ipv4Address = extractIPv4(words);
|
|
4388
|
+
if (ipv4Address != null && !isValidPublicIPv4Address(ipv4Address)) return false;
|
|
4389
|
+
}
|
|
4390
|
+
return true;
|
|
4390
4391
|
}
|
|
4391
4392
|
function expandIPv6Address(address) {
|
|
4392
4393
|
address = address.toLowerCase();
|
|
4394
|
+
const ipv4Delimiter = address.lastIndexOf(":");
|
|
4395
|
+
if (address.includes(".") && ipv4Delimiter >= 0) {
|
|
4396
|
+
const ipv4Parts = parseIPv4Address(address.substring(ipv4Delimiter + 1));
|
|
4397
|
+
if (ipv4Parts == null) return address;
|
|
4398
|
+
const high = (ipv4Parts[0] << 8) + ipv4Parts[1];
|
|
4399
|
+
const low = (ipv4Parts[2] << 8) + ipv4Parts[3];
|
|
4400
|
+
address = address.substring(0, ipv4Delimiter + 1) + high.toString(16) + ":" + low.toString(16);
|
|
4401
|
+
}
|
|
4393
4402
|
if (address === "::") return "0000:0000:0000:0000:0000:0000:0000:0000";
|
|
4394
4403
|
if (address.startsWith("::")) address = "0000" + address;
|
|
4395
4404
|
if (address.endsWith("::")) address = address + "0000";
|
|
4396
4405
|
address = address.replace("::", ":0000".repeat(8 - (address.match(/:/g) || []).length) + ":");
|
|
4397
4406
|
return address.split(":").map((part) => part.padStart(4, "0")).join(":");
|
|
4398
4407
|
}
|
|
4408
|
+
const nonPublicIPv4Prefixes = [
|
|
4409
|
+
ipv4Prefix("0.0.0.0/8", "RFC 6890"),
|
|
4410
|
+
ipv4Prefix("10.0.0.0/8", "RFC 1918"),
|
|
4411
|
+
ipv4Prefix("100.64.0.0/10", "RFC 6598"),
|
|
4412
|
+
ipv4Prefix("127.0.0.0/8", "RFC 1122"),
|
|
4413
|
+
ipv4Prefix("169.254.0.0/16", "RFC 3927"),
|
|
4414
|
+
ipv4Prefix("172.16.0.0/12", "RFC 1918"),
|
|
4415
|
+
ipv4Prefix("192.0.0.0/24", "RFC 6890"),
|
|
4416
|
+
ipv4Prefix("192.0.2.0/24", "RFC 5737"),
|
|
4417
|
+
ipv4Prefix("192.88.99.0/24", "RFC 7526"),
|
|
4418
|
+
ipv4Prefix("192.168.0.0/16", "RFC 1918"),
|
|
4419
|
+
ipv4Prefix("198.18.0.0/15", "RFC 2544"),
|
|
4420
|
+
ipv4Prefix("198.51.100.0/24", "RFC 5737"),
|
|
4421
|
+
ipv4Prefix("203.0.113.0/24", "RFC 5737"),
|
|
4422
|
+
ipv4Prefix("224.0.0.0/4", "RFC 5771"),
|
|
4423
|
+
ipv4Prefix("240.0.0.0/4", "RFC 1112")
|
|
4424
|
+
];
|
|
4425
|
+
const nonPublicIPv6Prefixes = [
|
|
4426
|
+
ipv6Prefix("::/16", "RFC 4291"),
|
|
4427
|
+
ipv6Prefix("2001::/32", "RFC 4380"),
|
|
4428
|
+
ipv6Prefix("2002::/16", "RFC 3056"),
|
|
4429
|
+
ipv6Prefix("64:ff9b:1::/48", "RFC 8215"),
|
|
4430
|
+
ipv6Prefix("fc00::/7", "RFC 4193"),
|
|
4431
|
+
ipv6Prefix("fe80::/10", "RFC 4291"),
|
|
4432
|
+
ipv6Prefix("ff00::/8", "RFC 4291")
|
|
4433
|
+
];
|
|
4434
|
+
const ipv6WithIPv4Prefixes = [{
|
|
4435
|
+
...ipv6Prefix("64:ff9b::/96", "RFC 6052"),
|
|
4436
|
+
extractIPv4: (words) => ipv4FromWords(words[6], words[7])
|
|
4437
|
+
}];
|
|
4438
|
+
function ipv4Prefix(cidr, rfc) {
|
|
4439
|
+
const [address, prefixText] = cidr.split("/");
|
|
4440
|
+
const prefix = parseInt(prefixText, 10);
|
|
4441
|
+
const parts = parseIPv4Address(address);
|
|
4442
|
+
if (parts == null || !Number.isInteger(prefix) || prefix < 0 || prefix > 32) throw new Error(`Invalid IPv4 prefix: ${cidr}`);
|
|
4443
|
+
return {
|
|
4444
|
+
cidr,
|
|
4445
|
+
base: ipv4PartsToNumber(parts),
|
|
4446
|
+
prefix,
|
|
4447
|
+
rfc
|
|
4448
|
+
};
|
|
4449
|
+
}
|
|
4450
|
+
function ipv6Prefix(cidr, rfc) {
|
|
4451
|
+
const [address, prefixText] = cidr.split("/");
|
|
4452
|
+
const prefix = parseInt(prefixText, 10);
|
|
4453
|
+
const words = parseIPv6Address(address);
|
|
4454
|
+
if (words == null || !Number.isInteger(prefix) || prefix < 0 || prefix > 128) throw new Error(`Invalid IPv6 prefix: ${cidr}`);
|
|
4455
|
+
return {
|
|
4456
|
+
cidr,
|
|
4457
|
+
words,
|
|
4458
|
+
prefix,
|
|
4459
|
+
rfc
|
|
4460
|
+
};
|
|
4461
|
+
}
|
|
4462
|
+
function parseIPv4Address(address) {
|
|
4463
|
+
const parts = address.split(".").map((part) => {
|
|
4464
|
+
if (!/^\d+$/.test(part)) return NaN;
|
|
4465
|
+
return parseInt(part, 10);
|
|
4466
|
+
});
|
|
4467
|
+
if (parts.length !== 4 || parts.some((part) => !Number.isInteger(part) || part < 0 || part > 255)) return null;
|
|
4468
|
+
return parts;
|
|
4469
|
+
}
|
|
4470
|
+
function parseIPv6Address(address) {
|
|
4471
|
+
const parts = expandIPv6Address(address).split(":");
|
|
4472
|
+
if (parts.length !== 8) return null;
|
|
4473
|
+
const words = parts.map((part) => {
|
|
4474
|
+
if (!/^[0-9a-f]{1,4}$/i.test(part)) return NaN;
|
|
4475
|
+
return parseInt(part, 16);
|
|
4476
|
+
});
|
|
4477
|
+
if (words.some((word) => !Number.isInteger(word) || word < 0 || word > 65535)) return null;
|
|
4478
|
+
return words;
|
|
4479
|
+
}
|
|
4480
|
+
function ipv4PartsToNumber(parts) {
|
|
4481
|
+
return parts[0] * 2 ** 24 + parts[1] * 2 ** 16 + parts[2] * 2 ** 8 + parts[3];
|
|
4482
|
+
}
|
|
4483
|
+
function ipv4FromWords(highWord, lowWord) {
|
|
4484
|
+
return [
|
|
4485
|
+
highWord >> 8,
|
|
4486
|
+
highWord & 255,
|
|
4487
|
+
lowWord >> 8,
|
|
4488
|
+
lowWord & 255
|
|
4489
|
+
].join(".");
|
|
4490
|
+
}
|
|
4491
|
+
function matchesIPv4Prefix(address, prefixBase, prefixLength) {
|
|
4492
|
+
const blockSize = 2 ** (32 - prefixLength);
|
|
4493
|
+
return Math.floor(address / blockSize) === Math.floor(prefixBase / blockSize);
|
|
4494
|
+
}
|
|
4495
|
+
function matchesIPv6Prefix(address, prefixWords, prefixLength) {
|
|
4496
|
+
let remaining = prefixLength;
|
|
4497
|
+
for (let i = 0; i < 8 && remaining > 0; i++) if (remaining >= 16) {
|
|
4498
|
+
if (address[i] !== prefixWords[i]) return false;
|
|
4499
|
+
remaining -= 16;
|
|
4500
|
+
} else {
|
|
4501
|
+
const mask = 65535 << 16 - remaining & 65535;
|
|
4502
|
+
if ((address[i] & mask) !== (prefixWords[i] & mask)) return false;
|
|
4503
|
+
remaining = 0;
|
|
4504
|
+
}
|
|
4505
|
+
return true;
|
|
4506
|
+
}
|
|
4399
4507
|
//#endregion
|
|
4400
4508
|
//#region src/runtime/docloader.ts
|
|
4401
4509
|
const logger = getLogger([
|
|
@@ -29,7 +29,7 @@ let node_dns_promises = require("node:dns/promises");
|
|
|
29
29
|
let node_net = require("node:net");
|
|
30
30
|
//#region deno.json
|
|
31
31
|
var name = "@fedify/fedify";
|
|
32
|
-
var version = "1.9.
|
|
32
|
+
var version = "1.9.12-dev.2265+f8512d84";
|
|
33
33
|
//#endregion
|
|
34
34
|
//#region src/runtime/contexts.ts
|
|
35
35
|
const preloadedContexts = {
|
|
@@ -4396,29 +4396,137 @@ function validatePublicIpAddress(address, family) {
|
|
|
4396
4396
|
throw new UrlError(`Invalid or private address: ${address}`);
|
|
4397
4397
|
}
|
|
4398
4398
|
function isValidPublicIPv4Address(address) {
|
|
4399
|
-
const parts = address
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
if (first === 169 && second === 254) return false;
|
|
4404
|
-
if (first === 172 && second >= 16 && second <= 31) return false;
|
|
4405
|
-
if (first === 192 && second === 168) return false;
|
|
4406
|
-
return true;
|
|
4399
|
+
const parts = parseIPv4Address(address);
|
|
4400
|
+
if (parts == null) return false;
|
|
4401
|
+
const value = ipv4PartsToNumber(parts);
|
|
4402
|
+
return !nonPublicIPv4Prefixes.some(({ base, prefix }) => matchesIPv4Prefix(value, base, prefix));
|
|
4407
4403
|
}
|
|
4408
4404
|
function isValidPublicIPv6Address(address) {
|
|
4409
|
-
|
|
4410
|
-
if (
|
|
4411
|
-
|
|
4412
|
-
|
|
4405
|
+
const words = parseIPv6Address(address);
|
|
4406
|
+
if (words == null) return false;
|
|
4407
|
+
if (nonPublicIPv6Prefixes.some(({ words: prefixWords, prefix }) => matchesIPv6Prefix(words, prefixWords, prefix))) return false;
|
|
4408
|
+
for (const { extractIPv4, prefix, words: prefixWords } of ipv6WithIPv4Prefixes) {
|
|
4409
|
+
if (!matchesIPv6Prefix(words, prefixWords, prefix)) continue;
|
|
4410
|
+
const ipv4Address = extractIPv4(words);
|
|
4411
|
+
if (ipv4Address != null && !isValidPublicIPv4Address(ipv4Address)) return false;
|
|
4412
|
+
}
|
|
4413
|
+
return true;
|
|
4413
4414
|
}
|
|
4414
4415
|
function expandIPv6Address(address) {
|
|
4415
4416
|
address = address.toLowerCase();
|
|
4417
|
+
const ipv4Delimiter = address.lastIndexOf(":");
|
|
4418
|
+
if (address.includes(".") && ipv4Delimiter >= 0) {
|
|
4419
|
+
const ipv4Parts = parseIPv4Address(address.substring(ipv4Delimiter + 1));
|
|
4420
|
+
if (ipv4Parts == null) return address;
|
|
4421
|
+
const high = (ipv4Parts[0] << 8) + ipv4Parts[1];
|
|
4422
|
+
const low = (ipv4Parts[2] << 8) + ipv4Parts[3];
|
|
4423
|
+
address = address.substring(0, ipv4Delimiter + 1) + high.toString(16) + ":" + low.toString(16);
|
|
4424
|
+
}
|
|
4416
4425
|
if (address === "::") return "0000:0000:0000:0000:0000:0000:0000:0000";
|
|
4417
4426
|
if (address.startsWith("::")) address = "0000" + address;
|
|
4418
4427
|
if (address.endsWith("::")) address = address + "0000";
|
|
4419
4428
|
address = address.replace("::", ":0000".repeat(8 - (address.match(/:/g) || []).length) + ":");
|
|
4420
4429
|
return address.split(":").map((part) => part.padStart(4, "0")).join(":");
|
|
4421
4430
|
}
|
|
4431
|
+
const nonPublicIPv4Prefixes = [
|
|
4432
|
+
ipv4Prefix("0.0.0.0/8", "RFC 6890"),
|
|
4433
|
+
ipv4Prefix("10.0.0.0/8", "RFC 1918"),
|
|
4434
|
+
ipv4Prefix("100.64.0.0/10", "RFC 6598"),
|
|
4435
|
+
ipv4Prefix("127.0.0.0/8", "RFC 1122"),
|
|
4436
|
+
ipv4Prefix("169.254.0.0/16", "RFC 3927"),
|
|
4437
|
+
ipv4Prefix("172.16.0.0/12", "RFC 1918"),
|
|
4438
|
+
ipv4Prefix("192.0.0.0/24", "RFC 6890"),
|
|
4439
|
+
ipv4Prefix("192.0.2.0/24", "RFC 5737"),
|
|
4440
|
+
ipv4Prefix("192.88.99.0/24", "RFC 7526"),
|
|
4441
|
+
ipv4Prefix("192.168.0.0/16", "RFC 1918"),
|
|
4442
|
+
ipv4Prefix("198.18.0.0/15", "RFC 2544"),
|
|
4443
|
+
ipv4Prefix("198.51.100.0/24", "RFC 5737"),
|
|
4444
|
+
ipv4Prefix("203.0.113.0/24", "RFC 5737"),
|
|
4445
|
+
ipv4Prefix("224.0.0.0/4", "RFC 5771"),
|
|
4446
|
+
ipv4Prefix("240.0.0.0/4", "RFC 1112")
|
|
4447
|
+
];
|
|
4448
|
+
const nonPublicIPv6Prefixes = [
|
|
4449
|
+
ipv6Prefix("::/16", "RFC 4291"),
|
|
4450
|
+
ipv6Prefix("2001::/32", "RFC 4380"),
|
|
4451
|
+
ipv6Prefix("2002::/16", "RFC 3056"),
|
|
4452
|
+
ipv6Prefix("64:ff9b:1::/48", "RFC 8215"),
|
|
4453
|
+
ipv6Prefix("fc00::/7", "RFC 4193"),
|
|
4454
|
+
ipv6Prefix("fe80::/10", "RFC 4291"),
|
|
4455
|
+
ipv6Prefix("ff00::/8", "RFC 4291")
|
|
4456
|
+
];
|
|
4457
|
+
const ipv6WithIPv4Prefixes = [{
|
|
4458
|
+
...ipv6Prefix("64:ff9b::/96", "RFC 6052"),
|
|
4459
|
+
extractIPv4: (words) => ipv4FromWords(words[6], words[7])
|
|
4460
|
+
}];
|
|
4461
|
+
function ipv4Prefix(cidr, rfc) {
|
|
4462
|
+
const [address, prefixText] = cidr.split("/");
|
|
4463
|
+
const prefix = parseInt(prefixText, 10);
|
|
4464
|
+
const parts = parseIPv4Address(address);
|
|
4465
|
+
if (parts == null || !Number.isInteger(prefix) || prefix < 0 || prefix > 32) throw new Error(`Invalid IPv4 prefix: ${cidr}`);
|
|
4466
|
+
return {
|
|
4467
|
+
cidr,
|
|
4468
|
+
base: ipv4PartsToNumber(parts),
|
|
4469
|
+
prefix,
|
|
4470
|
+
rfc
|
|
4471
|
+
};
|
|
4472
|
+
}
|
|
4473
|
+
function ipv6Prefix(cidr, rfc) {
|
|
4474
|
+
const [address, prefixText] = cidr.split("/");
|
|
4475
|
+
const prefix = parseInt(prefixText, 10);
|
|
4476
|
+
const words = parseIPv6Address(address);
|
|
4477
|
+
if (words == null || !Number.isInteger(prefix) || prefix < 0 || prefix > 128) throw new Error(`Invalid IPv6 prefix: ${cidr}`);
|
|
4478
|
+
return {
|
|
4479
|
+
cidr,
|
|
4480
|
+
words,
|
|
4481
|
+
prefix,
|
|
4482
|
+
rfc
|
|
4483
|
+
};
|
|
4484
|
+
}
|
|
4485
|
+
function parseIPv4Address(address) {
|
|
4486
|
+
const parts = address.split(".").map((part) => {
|
|
4487
|
+
if (!/^\d+$/.test(part)) return NaN;
|
|
4488
|
+
return parseInt(part, 10);
|
|
4489
|
+
});
|
|
4490
|
+
if (parts.length !== 4 || parts.some((part) => !Number.isInteger(part) || part < 0 || part > 255)) return null;
|
|
4491
|
+
return parts;
|
|
4492
|
+
}
|
|
4493
|
+
function parseIPv6Address(address) {
|
|
4494
|
+
const parts = expandIPv6Address(address).split(":");
|
|
4495
|
+
if (parts.length !== 8) return null;
|
|
4496
|
+
const words = parts.map((part) => {
|
|
4497
|
+
if (!/^[0-9a-f]{1,4}$/i.test(part)) return NaN;
|
|
4498
|
+
return parseInt(part, 16);
|
|
4499
|
+
});
|
|
4500
|
+
if (words.some((word) => !Number.isInteger(word) || word < 0 || word > 65535)) return null;
|
|
4501
|
+
return words;
|
|
4502
|
+
}
|
|
4503
|
+
function ipv4PartsToNumber(parts) {
|
|
4504
|
+
return parts[0] * 2 ** 24 + parts[1] * 2 ** 16 + parts[2] * 2 ** 8 + parts[3];
|
|
4505
|
+
}
|
|
4506
|
+
function ipv4FromWords(highWord, lowWord) {
|
|
4507
|
+
return [
|
|
4508
|
+
highWord >> 8,
|
|
4509
|
+
highWord & 255,
|
|
4510
|
+
lowWord >> 8,
|
|
4511
|
+
lowWord & 255
|
|
4512
|
+
].join(".");
|
|
4513
|
+
}
|
|
4514
|
+
function matchesIPv4Prefix(address, prefixBase, prefixLength) {
|
|
4515
|
+
const blockSize = 2 ** (32 - prefixLength);
|
|
4516
|
+
return Math.floor(address / blockSize) === Math.floor(prefixBase / blockSize);
|
|
4517
|
+
}
|
|
4518
|
+
function matchesIPv6Prefix(address, prefixWords, prefixLength) {
|
|
4519
|
+
let remaining = prefixLength;
|
|
4520
|
+
for (let i = 0; i < 8 && remaining > 0; i++) if (remaining >= 16) {
|
|
4521
|
+
if (address[i] !== prefixWords[i]) return false;
|
|
4522
|
+
remaining -= 16;
|
|
4523
|
+
} else {
|
|
4524
|
+
const mask = 65535 << 16 - remaining & 65535;
|
|
4525
|
+
if ((address[i] & mask) !== (prefixWords[i] & mask)) return false;
|
|
4526
|
+
remaining = 0;
|
|
4527
|
+
}
|
|
4528
|
+
return true;
|
|
4529
|
+
}
|
|
4422
4530
|
//#endregion
|
|
4423
4531
|
//#region src/runtime/docloader.ts
|
|
4424
4532
|
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-BmWZ5Z8b.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-BmWZ5Z8b.mjs";
|
|
5
|
+
import { t as test } from "../testing-Dbq3x7rR.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-DM1zFCtL.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-Dhm6irl1.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-Dbq3x7rR.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,18 +1,18 @@
|
|
|
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-BmWZ5Z8b.mjs";
|
|
5
|
+
import { a as mockDocumentLoader, i as createRequestContext, r as createInboxContext, t as test } from "../testing-Dbq3x7rR.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-DM1zFCtL.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-
|
|
15
|
-
import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-
|
|
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-ScXtn6SX.mjs";
|
|
12
|
+
import { s as signRequest } from "../http-ChKbuD-B.mjs";
|
|
13
|
+
import { a as compactJsonLd, f as signJsonLd } from "../ld-C51F-FdC.mjs";
|
|
14
|
+
import { t as InboxListenerSet } from "../inbox-Du7n_Tcq.mjs";
|
|
15
|
+
import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-CJPe6iTW.mjs";
|
|
16
16
|
//#region src/federation/handler.test.ts
|
|
17
17
|
test("acceptsJsonLd()", () => {
|
|
18
18
|
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-BmWZ5Z8b.mjs";
|
|
5
|
+
import { a as mockDocumentLoader, t as test } from "../testing-Dbq3x7rR.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-DM1zFCtL.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-ScXtn6SX.mjs";
|
|
10
|
+
import { n as signObject } from "../proof-CGXr6kyw.mjs";
|
|
11
|
+
import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-CJPe6iTW.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-BmWZ5Z8b.mjs";
|
|
5
|
+
import { t as test } from "../testing-Dbq3x7rR.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-Du7n_Tcq.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-BmWZ5Z8b.mjs";
|
|
5
|
+
import { t as test } from "../testing-Dbq3x7rR.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-DM1zFCtL.mjs";
|
|
10
|
-
import { t as KvKeyCache } from "../keycache-
|
|
10
|
+
import { t as KvKeyCache } from "../keycache-DYpvtScH.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-Dbq3x7rR.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-DM1zFCtL.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-BmWZ5Z8b.mjs";
|
|
5
|
+
import { i as RouterError, t as lookupObject } from "../lookup-jTLErl5g.mjs";
|
|
6
|
+
import { a as mockDocumentLoader, t as test } from "../testing-Dbq3x7rR.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-DM1zFCtL.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-ScXtn6SX.mjs";
|
|
16
|
+
import { l as verifyRequest, s as signRequest } from "../http-ChKbuD-B.mjs";
|
|
17
|
+
import { t as getAuthenticatedDocumentLoader } from "../authdocloader-DVWlfdZ9.mjs";
|
|
18
|
+
import { a as compactJsonLd, f as signJsonLd, m as verifyJsonLd, s as detachSignature } from "../ld-C51F-FdC.mjs";
|
|
19
|
+
import { t as doesActorOwnKey } from "../owner-Ul_H1ZhA.mjs";
|
|
20
|
+
import { n as signObject, r as verifyObject } from "../proof-CGXr6kyw.mjs";
|
|
21
|
+
import { t as esm_default } from "../esm-DpYRgHio.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-CJPe6iTW.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-ojCZeNsS.cjs");
|
|
5
|
+
const require_middleware = require("../middleware-BxPRXIp2.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-B_5QXY9T.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-Dbq3x7rR.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";
|