@fedify/fedify 1.9.8 → 1.9.10
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-BTA45fXF.js → actor-BCmFER1x.js} +187 -187
- package/dist/{actor-DxfJk4lY.cjs → actor-CGzgm5oD.cjs} +187 -187
- package/dist/{actor-DGa1EWaV.mjs → actor-Dk8QQxfb.mjs} +1 -1
- package/dist/{authdocloader-BC2rYCy1.mjs → authdocloader-BlqYxYyU.mjs} +3 -3
- package/dist/{authdocloader-BrhFB421.cjs → authdocloader-C0oFDv-u.cjs} +3 -3
- package/dist/{authdocloader-CqtNsX_N.js → authdocloader-C4Km7IX-.js} +3 -3
- package/dist/{builder-CIkAhIGC.mjs → builder-Dy69enN4.mjs} +4 -4
- package/dist/{client-MXqit6c-.mjs → client-BVxHrCKU.mjs} +1 -1
- package/dist/compat/mod.cjs +1 -1
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/transformers.test.mjs +3 -3
- package/dist/{context-K4cCphQj.d.ts → context-Cf8s07xm.d.ts} +4 -1
- package/dist/{context-CACMqDzl.d.cts → context-Crmwowsw.d.cts} +4 -1
- package/dist/{docloader-BoXhusJ1.js → docloader-CJRlqHTE.js} +12 -3
- package/dist/{docloader-BVuUhBLI.cjs → docloader-L_Yv0SO1.cjs} +12 -3
- package/dist/{esm-BHJ7sdNg.mjs → esm-Bl5QZ7fr.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 +6 -6
- 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 +39 -33
- package/dist/federation/mod.cjs +2 -2
- package/dist/federation/mod.d.cts +1 -1
- package/dist/federation/mod.d.ts +1 -1
- 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/{http-VJbz6sKD.js → http-CEocuLno.js} +3 -3
- package/dist/{http-DKw-O_VY.cjs → http-ChxLPxfJ.cjs} +3 -3
- package/dist/{http-Bu5ZNlhZ.mjs → http-lEtFJ9QZ.mjs} +2 -2
- package/dist/{inbox-DkbTULXE.mjs → inbox-f2JhwcoC.mjs} +1 -1
- package/dist/{key-BNMK_IVr.mjs → key-CcFvjYSE.mjs} +2 -2
- package/dist/{key-DK3o0FEH.js → key-CfQiiCFY.js} +2 -2
- package/dist/{key-B-wFdaPB.cjs → key-DL1K1oFv.cjs} +2 -2
- package/dist/{key-4fu6v0Jf.mjs → key-DXRa1vj8.mjs} +1 -1
- package/dist/{key-CancShOo.cjs → key-GSxkNZYW.cjs} +1 -1
- package/dist/{keycache-D-Vj8z88.mjs → keycache-Car3vCR8.mjs} +1 -1
- package/dist/{keys-B27nVeIs.mjs → keys-BPA70FRA.mjs} +1 -1
- package/dist/{ld-6jAVu3jV.mjs → ld-C5izJRbw.mjs} +2 -2
- package/dist/{lookup-BiIPmTwB.cjs → lookup-BZCRNz7r.cjs} +1 -1
- package/dist/{lookup-DmeJ8WUw.mjs → lookup-ByZEGrUD.mjs} +1 -1
- package/dist/{lookup-BaU75j-d.js → lookup-MjsiCtwV.js} +1 -1
- package/dist/{middleware-Do06X21v.js → middleware-D23J06Wi.js} +46 -21
- package/dist/{middleware-DrfZEjyc.mjs → middleware-DQF9aAWg.mjs} +1 -1
- package/dist/{middleware-Db1yZQaT.mjs → middleware-DT1q8p2_.mjs} +52 -27
- package/dist/{middleware-C188G4Go.cjs → middleware-DwelHV2a.cjs} +48 -23
- package/dist/{middleware-9ByEpBvV.cjs → middleware-DzVgR5WN.cjs} +1 -1
- package/dist/mod.cjs +10 -10
- package/dist/mod.d.cts +1 -1
- package/dist/mod.d.ts +1 -1
- 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-CKuGt_T9.mjs → owner-2Hw80SWJ.mjs} +3 -3
- package/dist/{proof-mJLL2gSA.mjs → proof-B6709oyL.mjs} +2 -2
- package/dist/{proof-DLOy7HYU.cjs → proof-DOwB_RsW.cjs} +3 -3
- package/dist/{proof-CmTtG_t-.js → proof-DoJnUD_A.js} +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 +5 -2
- package/dist/{send-BsQbGuw4.mjs → send-CaI0XRhr.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/testing/docloader.test.mjs +1 -1
- package/dist/testing/mod.d.mts +4 -1
- package/dist/testing/mod.mjs +1 -1
- package/dist/{testing-DS3gcq8V.mjs → testing-2hgRVgOJ.mjs} +2 -2
- package/dist/{transformers-BM0M8hnW.cjs → transformers-BZ3mYJ1P.cjs} +1 -1
- package/dist/{types-BXfL-dsX.js → types-36cPcbK8.js} +1 -1
- package/dist/{types-DpM4FhjW.cjs → types-DXy2Djgl.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-DuW9rL1h.mjs → vocab-BPE_99_6.mjs} +197 -188
- 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/hono.d.cts +1 -1
- package/dist/x/hono.d.ts +1 -1
- package/dist/x/sveltekit.cjs +1 -1
- package/dist/x/sveltekit.d.cts +1 -1
- package/dist/x/sveltekit.d.ts +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-BPE_99_6.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-BPE_99_6.mjs";
|
|
5
|
+
import { a as validateCryptoKey } from "./key-CcFvjYSE.mjs";
|
|
6
|
+
import { n as doubleKnock } from "./http-lEtFJ9QZ.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-L_Yv0SO1.cjs");
|
|
4
|
+
const require_key = require("./key-DL1K1oFv.cjs");
|
|
5
|
+
const require_http = require("./http-ChxLPxfJ.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-CJRlqHTE.js";
|
|
4
|
+
import { o as validateCryptoKey } from "./key-CfQiiCFY.js";
|
|
5
|
+
import { t as doubleKnock } from "./http-CEocuLno.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-BPE_99_6.mjs";
|
|
5
|
+
import { i as RouterError, r as Router } from "./lookup-ByZEGrUD.mjs";
|
|
6
|
+
import { t as InboxListenerSet } from "./inbox-f2JhwcoC.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-DQF9aAWg.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-BPE_99_6.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-BZ3mYJ1P.cjs");
|
|
5
5
|
exports.actorDehydrator = require_transformers.actorDehydrator;
|
|
6
6
|
exports.autoIdAssigner = require_transformers.autoIdAssigner;
|
|
7
7
|
exports.getDefaultActivityTransformers = require_transformers.getDefaultActivityTransformers;
|
package/dist/compat/mod.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as Activity } from "../vocab-BLvSEtuz.cjs";
|
|
2
|
-
import { n as Context, pt as ActivityTransformer } from "../context-
|
|
2
|
+
import { n as Context, pt as ActivityTransformer } from "../context-Crmwowsw.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/compat/transformers.d.ts
|
|
5
5
|
/**
|
package/dist/compat/mod.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
3
|
import { n as Activity } from "../vocab-lhCS9lzq.js";
|
|
4
|
-
import { n as Context, pt as ActivityTransformer } from "../context-
|
|
4
|
+
import { n as Context, pt as ActivityTransformer } from "../context-Cf8s07xm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/compat/transformers.d.ts
|
|
7
7
|
/**
|
|
@@ -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-BPE_99_6.mjs";
|
|
5
|
+
import { t as test } from "../testing-2hgRVgOJ.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-DT1q8p2_.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 () => {
|
|
@@ -2317,7 +2317,10 @@ interface GetSignedKeyOptions {
|
|
|
2317
2317
|
*/
|
|
2318
2318
|
interface ActorKeyPair extends CryptoKeyPair {
|
|
2319
2319
|
/**
|
|
2320
|
-
* The URI of the public key, which is used for
|
|
2320
|
+
* The URI of the public key for {@link CryptographicKey}, which is used for
|
|
2321
|
+
* verifying HTTP Signatures and Linked Data Signatures. Note that this is
|
|
2322
|
+
* the ID of the {@link cryptographicKey}, not of the {@link multikey};
|
|
2323
|
+
* the {@link Multikey} instance has a distinct ID of its own.
|
|
2321
2324
|
*/
|
|
2322
2325
|
keyId: URL;
|
|
2323
2326
|
/**
|
|
@@ -2315,7 +2315,10 @@ interface GetSignedKeyOptions {
|
|
|
2315
2315
|
*/
|
|
2316
2316
|
interface ActorKeyPair extends CryptoKeyPair {
|
|
2317
2317
|
/**
|
|
2318
|
-
* The URI of the public key, which is used for
|
|
2318
|
+
* The URI of the public key for {@link CryptographicKey}, which is used for
|
|
2319
|
+
* verifying HTTP Signatures and Linked Data Signatures. Note that this is
|
|
2320
|
+
* the ID of the {@link cryptographicKey}, not of the {@link multikey};
|
|
2321
|
+
* the {@link Multikey} instance has a distinct ID of its own.
|
|
2319
2322
|
*/
|
|
2320
2323
|
keyId: URL;
|
|
2321
2324
|
/**
|
|
@@ -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.10";
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/runtime/contexts.ts
|
|
12
12
|
const preloadedContexts = {
|
|
@@ -4346,8 +4346,13 @@ async function validatePublicUrl(url) {
|
|
|
4346
4346
|
const parsed = new URL(url);
|
|
4347
4347
|
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") throw new UrlError(`Unsupported protocol: ${parsed.protocol}`);
|
|
4348
4348
|
let hostname = parsed.hostname;
|
|
4349
|
-
if (hostname.startsWith("[") && hostname.endsWith("]")) hostname = hostname.
|
|
4349
|
+
if (hostname.startsWith("[") && hostname.endsWith("]")) hostname = hostname.slice(1, -1);
|
|
4350
4350
|
if (hostname === "localhost") throw new UrlError("Localhost is not allowed");
|
|
4351
|
+
const hostnameFamily = isIP(hostname);
|
|
4352
|
+
if (hostnameFamily !== 0) {
|
|
4353
|
+
validatePublicIpAddress(hostname, hostnameFamily);
|
|
4354
|
+
return;
|
|
4355
|
+
}
|
|
4351
4356
|
if ("Deno" in globalThis && !isIP(hostname)) {
|
|
4352
4357
|
if ((await Deno.permissions.query({ name: "net" })).state !== "granted") return;
|
|
4353
4358
|
}
|
|
@@ -4361,7 +4366,11 @@ async function validatePublicUrl(url) {
|
|
|
4361
4366
|
} catch {
|
|
4362
4367
|
addresses = [];
|
|
4363
4368
|
}
|
|
4364
|
-
for (const { address, family } of addresses)
|
|
4369
|
+
for (const { address, family } of addresses) validatePublicIpAddress(address, family);
|
|
4370
|
+
}
|
|
4371
|
+
function validatePublicIpAddress(address, family) {
|
|
4372
|
+
if (family === 4 && isValidPublicIPv4Address(address) || family === 6 && isValidPublicIPv6Address(address)) return;
|
|
4373
|
+
throw new UrlError(`Invalid or private address: ${address}`);
|
|
4365
4374
|
}
|
|
4366
4375
|
function isValidPublicIPv4Address(address) {
|
|
4367
4376
|
const parts = address.split(".");
|
|
@@ -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.10";
|
|
33
33
|
//#endregion
|
|
34
34
|
//#region src/runtime/contexts.ts
|
|
35
35
|
const preloadedContexts = {
|
|
@@ -4369,8 +4369,13 @@ async function validatePublicUrl(url) {
|
|
|
4369
4369
|
const parsed = new URL(url);
|
|
4370
4370
|
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") throw new UrlError(`Unsupported protocol: ${parsed.protocol}`);
|
|
4371
4371
|
let hostname = parsed.hostname;
|
|
4372
|
-
if (hostname.startsWith("[") && hostname.endsWith("]")) hostname = hostname.
|
|
4372
|
+
if (hostname.startsWith("[") && hostname.endsWith("]")) hostname = hostname.slice(1, -1);
|
|
4373
4373
|
if (hostname === "localhost") throw new UrlError("Localhost is not allowed");
|
|
4374
|
+
const hostnameFamily = (0, node_net.isIP)(hostname);
|
|
4375
|
+
if (hostnameFamily !== 0) {
|
|
4376
|
+
validatePublicIpAddress(hostname, hostnameFamily);
|
|
4377
|
+
return;
|
|
4378
|
+
}
|
|
4374
4379
|
if ("Deno" in globalThis && !(0, node_net.isIP)(hostname)) {
|
|
4375
4380
|
if ((await Deno.permissions.query({ name: "net" })).state !== "granted") return;
|
|
4376
4381
|
}
|
|
@@ -4384,7 +4389,11 @@ async function validatePublicUrl(url) {
|
|
|
4384
4389
|
} catch {
|
|
4385
4390
|
addresses = [];
|
|
4386
4391
|
}
|
|
4387
|
-
for (const { address, family } of addresses)
|
|
4392
|
+
for (const { address, family } of addresses) validatePublicIpAddress(address, family);
|
|
4393
|
+
}
|
|
4394
|
+
function validatePublicIpAddress(address, family) {
|
|
4395
|
+
if (family === 4 && isValidPublicIPv4Address(address) || family === 6 && isValidPublicIPv6Address(address)) return;
|
|
4396
|
+
throw new UrlError(`Invalid or private address: ${address}`);
|
|
4388
4397
|
}
|
|
4389
4398
|
function isValidPublicIPv4Address(address) {
|
|
4390
4399
|
const parts = address.split(".");
|
|
@@ -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-BPE_99_6.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-BPE_99_6.mjs";
|
|
5
|
+
import { t as test } from "../testing-2hgRVgOJ.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-Dy69enN4.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-2hgRVgOJ.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,17 +1,17 @@
|
|
|
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-BPE_99_6.mjs";
|
|
5
|
+
import { a as mockDocumentLoader, i as createRequestContext, r as createInboxContext, t as test } from "../testing-2hgRVgOJ.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 } 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 { t as InboxListenerSet } from "../inbox-
|
|
14
|
-
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-DT1q8p2_.mjs";
|
|
12
|
+
import { s as signRequest } from "../http-lEtFJ9QZ.mjs";
|
|
13
|
+
import { t as InboxListenerSet } from "../inbox-f2JhwcoC.mjs";
|
|
14
|
+
import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-BPA70FRA.mjs";
|
|
15
15
|
//#region src/federation/handler.test.ts
|
|
16
16
|
test("acceptsJsonLd()", () => {
|
|
17
17
|
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-BPE_99_6.mjs";
|
|
5
|
+
import { a as mockDocumentLoader, t as test } from "../testing-2hgRVgOJ.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-DT1q8p2_.mjs";
|
|
10
|
+
import { n as signObject } from "../proof-B6709oyL.mjs";
|
|
11
|
+
import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-BPA70FRA.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-BPE_99_6.mjs";
|
|
5
|
+
import { t as test } from "../testing-2hgRVgOJ.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-f2JhwcoC.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-BPE_99_6.mjs";
|
|
5
|
+
import { t as test } from "../testing-2hgRVgOJ.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-Car3vCR8.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-2hgRVgOJ.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-BPE_99_6.mjs";
|
|
5
|
+
import { i as RouterError, t as lookupObject } from "../lookup-ByZEGrUD.mjs";
|
|
6
|
+
import { a as mockDocumentLoader, t as test } from "../testing-2hgRVgOJ.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 signJsonLd, o as verifyJsonLd, r 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-DT1q8p2_.mjs";
|
|
16
|
+
import { l as verifyRequest, s as signRequest } from "../http-lEtFJ9QZ.mjs";
|
|
17
|
+
import { t as getAuthenticatedDocumentLoader } from "../authdocloader-BlqYxYyU.mjs";
|
|
18
|
+
import { a as signJsonLd, o as verifyJsonLd, r as detachSignature } from "../ld-C5izJRbw.mjs";
|
|
19
|
+
import { t as doesActorOwnKey } from "../owner-2Hw80SWJ.mjs";
|
|
20
|
+
import { n as signObject, r as verifyObject } from "../proof-B6709oyL.mjs";
|
|
21
|
+
import { t as esm_default } from "../esm-Bl5QZ7fr.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-BPA70FRA.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"],
|
|
@@ -285,7 +285,7 @@ test({
|
|
|
285
285
|
owner: new URL("https://example.com/users/handle")
|
|
286
286
|
}),
|
|
287
287
|
multikey: new Multikey({
|
|
288
|
-
id: new URL("https://example.com/users/handle#
|
|
288
|
+
id: new URL("https://example.com/users/handle#multikey-1"),
|
|
289
289
|
controller: new URL("https://example.com/users/handle"),
|
|
290
290
|
publicKey: rsaPublicKey2.publicKey
|
|
291
291
|
})
|
|
@@ -298,7 +298,7 @@ test({
|
|
|
298
298
|
owner: new URL("https://example.com/users/handle")
|
|
299
299
|
}),
|
|
300
300
|
multikey: new Multikey({
|
|
301
|
-
id: new URL("https://example.com/users/handle#
|
|
301
|
+
id: new URL("https://example.com/users/handle#multikey-2"),
|
|
302
302
|
controller: new URL("https://example.com/users/handle"),
|
|
303
303
|
publicKey: ed25519PublicKey.publicKey
|
|
304
304
|
})
|
|
@@ -1225,8 +1225,10 @@ test("ContextImpl.sendActivity()", async (t) => {
|
|
|
1225
1225
|
keyCache: {
|
|
1226
1226
|
async get(keyId) {
|
|
1227
1227
|
const keys = await federation.createContext(new URL("https://example.com/"), void 0).getActorKeyPairs("1");
|
|
1228
|
-
for (const key of keys)
|
|
1229
|
-
|
|
1228
|
+
for (const key of keys) {
|
|
1229
|
+
if (key.keyId.href === keyId.href) return key.cryptographicKey;
|
|
1230
|
+
if (key.multikey.id?.href === keyId.href) return key.multikey;
|
|
1231
|
+
}
|
|
1230
1232
|
},
|
|
1231
1233
|
async set(_keyId, _key) {}
|
|
1232
1234
|
}
|
|
@@ -1392,24 +1394,28 @@ test("ContextImpl.sendActivity()", async (t) => {
|
|
|
1392
1394
|
id: new URL("https://example.com/recipient"),
|
|
1393
1395
|
inboxId: new URL("https://example.com/inbox")
|
|
1394
1396
|
}, activity, { fanout: "force" });
|
|
1395
|
-
assertEquals(queue.messages,
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
}
|
|
1397
|
+
assertEquals(queue.messages.length, 1);
|
|
1398
|
+
assert(queue.messages[0].type === "fanout");
|
|
1399
|
+
const fanoutMsg = queue.messages[0];
|
|
1400
|
+
assertEquals(fanoutMsg.activityId, "https://example.com/activity/1");
|
|
1401
|
+
assertEquals(fanoutMsg.activityType, "https://www.w3.org/ns/activitystreams#Create");
|
|
1402
|
+
assertEquals(fanoutMsg.baseUrl, "https://example.com");
|
|
1403
|
+
assertEquals(fanoutMsg.collectionSync, void 0);
|
|
1404
|
+
assertEquals(fanoutMsg.inboxes, { "https://example.com/inbox": {
|
|
1405
|
+
actorIds: ["https://example.com/recipient"],
|
|
1406
|
+
sharedInbox: false
|
|
1407
|
+
} });
|
|
1408
|
+
const signedActivity = await Create.fromJsonLd(fanoutMsg.activity, {
|
|
1409
|
+
contextLoader: fetchDocumentLoader,
|
|
1410
|
+
documentLoader: fetchDocumentLoader
|
|
1411
|
+
});
|
|
1412
|
+
assertEquals(signedActivity.id?.href, "https://example.com/activity/1");
|
|
1413
|
+
let proofCount = 0;
|
|
1414
|
+
for await (const proof of signedActivity.getProofs({ contextLoader: fetchDocumentLoader })) {
|
|
1415
|
+
assertEquals(proof.verificationMethodId?.href, "https://example.com/john#multikey-2");
|
|
1416
|
+
proofCount++;
|
|
1417
|
+
}
|
|
1418
|
+
assertEquals(proofCount, 1);
|
|
1413
1419
|
});
|
|
1414
1420
|
queue.clear();
|
|
1415
1421
|
await t.step("fanout: \"skip\"", async () => {
|
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-L_Yv0SO1.cjs");
|
|
5
|
+
const require_middleware = require("../middleware-DwelHV2a.cjs");
|
|
6
6
|
let es_toolkit = require("es-toolkit");
|
|
7
7
|
//#region src/federation/kv.ts
|
|
8
8
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { i as MemoryKvStore, n as KvStore, r as KvStoreSetOptions, t as KvKey } from "../kv-GIrOktyG.cjs";
|
|
2
|
-
import { $ as CustomCollectionCursor, A as createFederation, B as RouterRouteResult, C as InboxListenerSetters, D as FederationKvPrefixes, E as CreateFederationOptions, F as Message, G as ActorDispatcher, H as respondWithObject, I as createFederationBuilder, J as AuthorizePredicate, K as ActorHandleMapper, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as CustomCollectionCounter, R as RouterError, S as IdempotencyStrategy, T as Rfc6570Expression, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as ActorAliasMapper, X as CollectionCursor, Y as CollectionCounter, Z as CollectionDispatcher, _ as FederationBuilder, a as InboxContext, at as ObjectDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as WebFingerLinksDispatcher, d as ActorCallbackSetters, dt as buildCollectionSynchronizationHeader, et as CustomCollectionDispatcher, f as CollectionCallbackSetters, ft as digest, g as Federation, h as Federatable, i as GetSignedKeyOptions, it as ObjectAuthorizePredicate, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as SenderKeyPair, m as CustomCollectionCallbackSetters, n as Context, nt as InboxListener, o as ParseUriResult, ot as OutboxErrorHandler, p as ConstructorWithTypeId, q as ActorKeyPairsDispatcher, r as ForwardActivityOptions, rt as NodeInfoDispatcher, s as RequestContext, st as SharedInboxKeyDispatcher, t as ActorKeyPair, tt as InboxErrorHandler, u as SendActivityOptionsForCollection, ut as PageItems, v as FederationFetchOptions, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, z as RouterOptions } from "../context-
|
|
2
|
+
import { $ as CustomCollectionCursor, A as createFederation, B as RouterRouteResult, C as InboxListenerSetters, D as FederationKvPrefixes, E as CreateFederationOptions, F as Message, G as ActorDispatcher, H as respondWithObject, I as createFederationBuilder, J as AuthorizePredicate, K as ActorHandleMapper, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as CustomCollectionCounter, R as RouterError, S as IdempotencyStrategy, T as Rfc6570Expression, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as ActorAliasMapper, X as CollectionCursor, Y as CollectionCounter, Z as CollectionDispatcher, _ as FederationBuilder, a as InboxContext, at as ObjectDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as WebFingerLinksDispatcher, d as ActorCallbackSetters, dt as buildCollectionSynchronizationHeader, et as CustomCollectionDispatcher, f as CollectionCallbackSetters, ft as digest, g as Federation, h as Federatable, i as GetSignedKeyOptions, it as ObjectAuthorizePredicate, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as SenderKeyPair, m as CustomCollectionCallbackSetters, n as Context, nt as InboxListener, o as ParseUriResult, ot as OutboxErrorHandler, p as ConstructorWithTypeId, q as ActorKeyPairsDispatcher, r as ForwardActivityOptions, rt as NodeInfoDispatcher, s as RequestContext, st as SharedInboxKeyDispatcher, t as ActorKeyPair, tt as InboxErrorHandler, u as SendActivityOptionsForCollection, ut as PageItems, v as FederationFetchOptions, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, z as RouterOptions } from "../context-Crmwowsw.cjs";
|
|
3
3
|
import { a as MessageQueueListenOptions, i as MessageQueueEnqueueOptions, n as InProcessMessageQueueOptions, o as ParallelMessageQueue, r as MessageQueue, t as InProcessMessageQueue } from "../mq-CrItclRD.cjs";
|
|
4
4
|
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, type CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, type FederationKvPrefixes, FederationOptions, type FederationOrigin, type FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreSetOptions, MemoryKvStore, type Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, type RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, type SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|
package/dist/federation/mod.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
3
|
import { i as MemoryKvStore, n as KvStore, r as KvStoreSetOptions, t as KvKey } from "../kv-Bq9QLKm5.js";
|
|
4
|
-
import { $ as CustomCollectionCursor, A as createFederation, B as RouterRouteResult, C as InboxListenerSetters, D as FederationKvPrefixes, E as CreateFederationOptions, F as Message, G as ActorDispatcher, H as respondWithObject, I as createFederationBuilder, J as AuthorizePredicate, K as ActorHandleMapper, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as CustomCollectionCounter, R as RouterError, S as IdempotencyStrategy, T as Rfc6570Expression, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as ActorAliasMapper, X as CollectionCursor, Y as CollectionCounter, Z as CollectionDispatcher, _ as FederationBuilder, a as InboxContext, at as ObjectDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as WebFingerLinksDispatcher, d as ActorCallbackSetters, dt as buildCollectionSynchronizationHeader, et as CustomCollectionDispatcher, f as CollectionCallbackSetters, ft as digest, g as Federation, h as Federatable, i as GetSignedKeyOptions, it as ObjectAuthorizePredicate, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as SenderKeyPair, m as CustomCollectionCallbackSetters, n as Context, nt as InboxListener, o as ParseUriResult, ot as OutboxErrorHandler, p as ConstructorWithTypeId, q as ActorKeyPairsDispatcher, r as ForwardActivityOptions, rt as NodeInfoDispatcher, s as RequestContext, st as SharedInboxKeyDispatcher, t as ActorKeyPair, tt as InboxErrorHandler, u as SendActivityOptionsForCollection, ut as PageItems, v as FederationFetchOptions, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, z as RouterOptions } from "../context-
|
|
4
|
+
import { $ as CustomCollectionCursor, A as createFederation, B as RouterRouteResult, C as InboxListenerSetters, D as FederationKvPrefixes, E as CreateFederationOptions, F as Message, G as ActorDispatcher, H as respondWithObject, I as createFederationBuilder, J as AuthorizePredicate, K as ActorHandleMapper, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as CustomCollectionCounter, R as RouterError, S as IdempotencyStrategy, T as Rfc6570Expression, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as ActorAliasMapper, X as CollectionCursor, Y as CollectionCounter, Z as CollectionDispatcher, _ as FederationBuilder, a as InboxContext, at as ObjectDispatcher, b as FederationStartQueueOptions, c as RouteActivityOptions, ct as WebFingerLinksDispatcher, d as ActorCallbackSetters, dt as buildCollectionSynchronizationHeader, et as CustomCollectionDispatcher, f as CollectionCallbackSetters, ft as digest, g as Federation, h as Federatable, i as GetSignedKeyOptions, it as ObjectAuthorizePredicate, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as SenderKeyPair, m as CustomCollectionCallbackSetters, n as Context, nt as InboxListener, o as ParseUriResult, ot as OutboxErrorHandler, p as ConstructorWithTypeId, q as ActorKeyPairsDispatcher, r as ForwardActivityOptions, rt as NodeInfoDispatcher, s as RequestContext, st as SharedInboxKeyDispatcher, t as ActorKeyPair, tt as InboxErrorHandler, u as SendActivityOptionsForCollection, ut as PageItems, v as FederationFetchOptions, w as ObjectCallbackSetters, x as IdempotencyKeyCallback, y as FederationOptions, z as RouterOptions } from "../context-Cf8s07xm.js";
|
|
5
5
|
import { a as MessageQueueListenOptions, i as MessageQueueEnqueueOptions, n as InProcessMessageQueueOptions, o as ParallelMessageQueue, r as MessageQueue, t as InProcessMessageQueue } from "../mq-D_ZZRdby.js";
|
|
6
6
|
export { ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, type CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, type FederationKvPrefixes, FederationOptions, type FederationOrigin, type FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, KvKey, KvStore, KvStoreSetOptions, MemoryKvStore, type Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, type RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, type SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|
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-D23J06Wi.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-2hgRVgOJ.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";
|
|
@@ -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-2hgRVgOJ.mjs";
|
|
5
5
|
import { l as AssertionError, t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import { t as assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
|
|
7
7
|
import { t as createExponentialBackoffPolicy } from "../retry-Ddbq3AcK.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { i as RouterError, r as Router } from "../lookup-
|
|
5
|
-
import { t as test } from "../testing-
|
|
4
|
+
import { i as RouterError, r as Router } from "../lookup-ByZEGrUD.mjs";
|
|
5
|
+
import { t as test } from "../testing-2hgRVgOJ.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 } from "../assert_rejects-CJC9ThS-.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, E as Service, d as Group, l as Endpoints, r as Application, t as Activity } from "../vocab-
|
|
5
|
-
import { a as mockDocumentLoader, t as test } from "../testing-
|
|
4
|
+
import { C as Person, E as Service, d as Group, l as Endpoints, r as Application, t as Activity } from "../vocab-BPE_99_6.mjs";
|
|
5
|
+
import { a as mockDocumentLoader, t as test } from "../testing-2hgRVgOJ.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 assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
|
|
10
10
|
import { t as assert } from "../assert-DikXweDx.mjs";
|
|
11
|
-
import { l as verifyRequest } from "../http-
|
|
12
|
-
import { t as doesActorOwnKey } from "../owner-
|
|
13
|
-
import { n as sendActivity, t as extractInboxes } from "../send-
|
|
14
|
-
import { t as esm_default } from "../esm-
|
|
15
|
-
import { i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-
|
|
11
|
+
import { l as verifyRequest } from "../http-lEtFJ9QZ.mjs";
|
|
12
|
+
import { t as doesActorOwnKey } from "../owner-2Hw80SWJ.mjs";
|
|
13
|
+
import { n as sendActivity, t as extractInboxes } from "../send-CaI0XRhr.mjs";
|
|
14
|
+
import { t as esm_default } from "../esm-Bl5QZ7fr.mjs";
|
|
15
|
+
import { i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-BPA70FRA.mjs";
|
|
16
16
|
//#region src/federation/send.test.ts
|
|
17
17
|
test("extractInboxes()", () => {
|
|
18
18
|
const recipients = [
|
|
@@ -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, t as FetchError } from "./docloader-
|
|
4
|
-
import { y as CryptographicKey } from "./actor-
|
|
5
|
-
import { n as fetchKey, o as validateCryptoKey } from "./key-
|
|
3
|
+
import { d as name, f as version, t as FetchError } from "./docloader-CJRlqHTE.js";
|
|
4
|
+
import { y as CryptographicKey } from "./actor-BCmFER1x.js";
|
|
5
|
+
import { n as fetchKey, o as validateCryptoKey } from "./key-CfQiiCFY.js";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|