@fedify/fedify 2.1.28 → 2.1.29
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/{assert_rejects-B-qJtC9Z.mjs → assert_rejects-WyYSTDDX.mjs} +2 -20
- package/dist/{assert_throws-4NwKEy2q.mjs → assert_throws-D4DNWrux.mjs} +19 -1
- package/dist/{builder-CW1BrLbm.mjs → builder-Mg2G3qj8.mjs} +3 -3
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{deno-CJgU2mcr.mjs → deno-BiYv5RT5.mjs} +1 -1
- package/dist/{docloader-o3fCIlIa.mjs → docloader-DrxXBFL8.mjs} +4 -2
- package/dist/federation/builder.test.mjs +3 -3
- package/dist/federation/collection.test.mjs +1 -1
- package/dist/federation/handler.test.mjs +262 -9
- package/dist/federation/idempotency.test.mjs +3 -3
- package/dist/federation/inbox.test.mjs +25 -2
- package/dist/federation/kv.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +128 -10
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.js +1 -1
- package/dist/federation/mq.test.mjs +2 -2
- package/dist/federation/negotiation.test.mjs +2 -2
- package/dist/federation/retry.test.mjs +1 -1
- package/dist/federation/router.test.mjs +2 -3
- package/dist/federation/send.test.mjs +7 -6
- package/dist/federation/temporal.test.mjs +3 -3
- package/dist/federation/webfinger.test.mjs +2 -2
- package/dist/{http-DtypHuuK.js → http-B3rSb2GQ.js} +1 -1
- package/dist/{http-Dcj1ulAh.mjs → http-C1ga9WQu.mjs} +2 -2
- package/dist/{http-EEfKB8Qb.cjs → http-Cginz7L0.cjs} +1 -1
- package/dist/{inbox-CVYVJI0M.mjs → inbox-BWzL0xMU.mjs} +23 -10
- package/dist/{key-DRLvwDTh.mjs → key-O-ATwIGS.mjs} +1 -1
- package/dist/{kv-cache-CEJCaF4E.js → kv-cache-8Kg2CHiD.js} +3 -1
- package/dist/{kv-cache-BWVKAAmc.cjs → kv-cache-BdylAE9w.cjs} +3 -1
- package/dist/{ld-C5BZ98YK.mjs → ld-C-fCGM-z.mjs} +2 -2
- package/dist/{middleware-wCgWm4Eh.js → middleware-41MkquTV.js} +95 -25
- package/dist/{middleware-SSrXiJIV.mjs → middleware-C9UCWOqw.mjs} +82 -25
- package/dist/{middleware-Dw9sPiec.cjs → middleware-CVRFS7PZ.cjs} +96 -26
- package/dist/{middleware-CqQoREZ9.mjs → middleware-CxgFiKI3.mjs} +1 -1
- package/dist/{middleware-DZxmsbPB.cjs → middleware-VvrqPwHL.cjs} +1 -1
- package/dist/mod.cjs +4 -4
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/client.test.mjs +1 -1
- package/dist/nodeinfo/handler.test.mjs +2 -2
- package/dist/nodeinfo/types.test.mjs +2 -2
- package/dist/otel/exporter.test.mjs +1 -1
- package/dist/{owner-cPOoPvmr.mjs → owner-C8IVASD3.mjs} +2 -2
- package/dist/{proof-De1y2j-e.cjs → proof-BbHMAkPG.cjs} +1 -1
- package/dist/{proof-BTknCsN7.mjs → proof-CUdcBgvg.mjs} +2 -2
- package/dist/{proof-DPU3poip.js → proof-cGfRPTiV.js} +1 -1
- package/dist/{send-DDuHNgHz.mjs → send-BoV4dyVO.mjs} +2 -2
- package/dist/sig/http.test.mjs +5 -5
- package/dist/sig/key.test.mjs +5 -5
- package/dist/sig/ld.test.mjs +4 -4
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +3 -3
- package/dist/sig/proof.test.mjs +3 -3
- package/dist/{std__assert-BUOJXi-Z.mjs → std__assert-DflMZha5.mjs} +2 -2
- package/dist/{temporal-CxXY--ZL.mjs → temporal-BJlnku_d.mjs} +1 -1
- package/dist/utils/docloader.test.mjs +114 -39
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +6 -6
- /package/dist/{assert_not_equals--wG9hV7u.mjs → assert_not_equals-BkxW5QJI.mjs} +0 -0
|
@@ -2,10 +2,10 @@ const { Temporal } = require("@js-temporal/polyfill");
|
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
const require_chunk = require("./chunk-DDcVe30Y.cjs");
|
|
4
4
|
const require_transformers = require("./transformers-NeAONrAq.cjs");
|
|
5
|
-
const require_http = require("./http-
|
|
5
|
+
const require_http = require("./http-Cginz7L0.cjs");
|
|
6
6
|
const require_types = require("./types-DRPjmHVV.cjs");
|
|
7
|
-
const require_proof = require("./proof-
|
|
8
|
-
const require_kv_cache = require("./kv-cache-
|
|
7
|
+
const require_proof = require("./proof-BbHMAkPG.cjs");
|
|
8
|
+
const require_kv_cache = require("./kv-cache-BdylAE9w.cjs");
|
|
9
9
|
let _logtape_logtape = require("@logtape/logtape");
|
|
10
10
|
let _fedify_vocab = require("@fedify/vocab");
|
|
11
11
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
@@ -53,12 +53,33 @@ var InboxListenerSet = class InboxListenerSet {
|
|
|
53
53
|
return this.dispatchWithClass(activity)?.listener ?? null;
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* Checks whether an activity's ID and all of its actor IDs have the same
|
|
58
|
+
* non-opaque origin. Activities without an ID have no origin to authenticate.
|
|
59
|
+
*
|
|
60
|
+
* The caller is responsible for rejecting a missing primary actor ID before
|
|
61
|
+
* relying on this check.
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
function actorsHaveSameOrigin(activity) {
|
|
65
|
+
if (activity.id == null) return true;
|
|
66
|
+
const origin = activity.id.origin;
|
|
67
|
+
return origin !== "null" && activity.actorIds.every((actor) => actor.origin === origin);
|
|
68
|
+
}
|
|
56
69
|
async function routeActivity({ context: ctx, json, originalJson, normalizedActivity, ldSignatureVerified, activity, recipient, inboxListeners, inboxContextFactory, listenerInboxContextFactory, inboxErrorHandler, kv, kvPrefixes, queue, span, tracerProvider, idempotencyStrategy }) {
|
|
57
70
|
const logger = (0, _logtape_logtape.getLogger)([
|
|
58
71
|
"fedify",
|
|
59
72
|
"federation",
|
|
60
73
|
"inbox"
|
|
61
74
|
]);
|
|
75
|
+
if (activity.actorId == null) {
|
|
76
|
+
logger.error("Missing actor.", { activity: json });
|
|
77
|
+
span.setStatus({
|
|
78
|
+
code: _opentelemetry_api.SpanStatusCode.ERROR,
|
|
79
|
+
message: "Missing actor."
|
|
80
|
+
});
|
|
81
|
+
return "missingActor";
|
|
82
|
+
}
|
|
62
83
|
let cacheKey = null;
|
|
63
84
|
if (activity.id != null) {
|
|
64
85
|
const inboxContext = inboxContextFactory(recipient, json, activity.id?.href, (0, _fedify_vocab.getTypeId)(activity).href);
|
|
@@ -93,14 +114,6 @@ async function routeActivity({ context: ctx, json, originalJson, normalizedActiv
|
|
|
93
114
|
return "alreadyProcessed";
|
|
94
115
|
}
|
|
95
116
|
}
|
|
96
|
-
if (activity.actorId == null) {
|
|
97
|
-
logger.error("Missing actor.", { activity: json });
|
|
98
|
-
span.setStatus({
|
|
99
|
-
code: _opentelemetry_api.SpanStatusCode.ERROR,
|
|
100
|
-
message: "Missing actor."
|
|
101
|
-
});
|
|
102
|
-
return "missingActor";
|
|
103
|
-
}
|
|
104
117
|
span.setAttribute("activitypub.actor.id", activity.actorId.href);
|
|
105
118
|
if (queue != null) {
|
|
106
119
|
const carrier = {};
|
|
@@ -337,7 +350,7 @@ var FederationBuilderImpl = class {
|
|
|
337
350
|
this.collectionTypeIds = {};
|
|
338
351
|
}
|
|
339
352
|
async build(options) {
|
|
340
|
-
const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-
|
|
353
|
+
const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-VvrqPwHL.cjs"));
|
|
341
354
|
const f = new FederationImpl(options);
|
|
342
355
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
343
356
|
f.router = this.router.clone();
|
|
@@ -1799,6 +1812,36 @@ async function handleInboxInternal(request, parameters, span) {
|
|
|
1799
1812
|
return await getFailedSignatureResponse(inboxChallengePolicy, kv, kvPrefixes);
|
|
1800
1813
|
}
|
|
1801
1814
|
}
|
|
1815
|
+
if (activity.actorId == null) {
|
|
1816
|
+
logger.error("Missing actor.", {
|
|
1817
|
+
activity: json,
|
|
1818
|
+
recipient
|
|
1819
|
+
});
|
|
1820
|
+
span.setStatus({
|
|
1821
|
+
code: _opentelemetry_api.SpanStatusCode.ERROR,
|
|
1822
|
+
message: "Missing actor."
|
|
1823
|
+
});
|
|
1824
|
+
return new Response("Missing actor.", {
|
|
1825
|
+
status: 400,
|
|
1826
|
+
headers: { "Content-Type": "text/plain; charset=utf-8" }
|
|
1827
|
+
});
|
|
1828
|
+
}
|
|
1829
|
+
if (!skipSignatureVerification && activity.id != null && !actorsHaveSameOrigin(activity)) {
|
|
1830
|
+
logger.error("The activity ({activityId}) and its actors do not have the same origin.", {
|
|
1831
|
+
activity: json,
|
|
1832
|
+
recipient,
|
|
1833
|
+
activityId: activity.id.href,
|
|
1834
|
+
actorIds: activity.actorIds.map((actor) => actor.href)
|
|
1835
|
+
});
|
|
1836
|
+
span.setStatus({
|
|
1837
|
+
code: _opentelemetry_api.SpanStatusCode.ERROR,
|
|
1838
|
+
message: `The activity (${activity.id.href}) and its actors do not have the same origin.`
|
|
1839
|
+
});
|
|
1840
|
+
return new Response("The activity and its actors do not have the same origin.", {
|
|
1841
|
+
status: 401,
|
|
1842
|
+
headers: { "Content-Type": "text/plain; charset=utf-8" }
|
|
1843
|
+
});
|
|
1844
|
+
}
|
|
1802
1845
|
const routeResult = await routeActivity({
|
|
1803
1846
|
context: ctx,
|
|
1804
1847
|
json,
|
|
@@ -3310,6 +3353,33 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
3310
3353
|
activity = await _fedify_vocab.Activity.fromJsonLd(parseInput, parseContext);
|
|
3311
3354
|
span.setAttribute("activitypub.activity.type", (0, _fedify_vocab.getTypeId)(activity).href);
|
|
3312
3355
|
if (activity.id != null) span.setAttribute("activitypub.activity.id", activity.id.href);
|
|
3356
|
+
if (activity.actorId == null) {
|
|
3357
|
+
logger.error("Missing actor in queued incoming activity.", {
|
|
3358
|
+
activityId: activity.id?.href,
|
|
3359
|
+
activity: message.activity,
|
|
3360
|
+
recipient: message.identifier
|
|
3361
|
+
});
|
|
3362
|
+
span.setStatus({
|
|
3363
|
+
code: _opentelemetry_api.SpanStatusCode.ERROR,
|
|
3364
|
+
message: "Missing actor."
|
|
3365
|
+
});
|
|
3366
|
+
span.end();
|
|
3367
|
+
return;
|
|
3368
|
+
}
|
|
3369
|
+
if (!this.skipSignatureVerification && activity.id != null && !actorsHaveSameOrigin(activity)) {
|
|
3370
|
+
logger.error("The queued activity ({activityId}) and its actors do not have the same origin.", {
|
|
3371
|
+
activityId: activity.id.href,
|
|
3372
|
+
actorIds: activity.actorIds.map((actor) => actor.href),
|
|
3373
|
+
activity: message.activity,
|
|
3374
|
+
recipient: message.identifier
|
|
3375
|
+
});
|
|
3376
|
+
span.setStatus({
|
|
3377
|
+
code: _opentelemetry_api.SpanStatusCode.ERROR,
|
|
3378
|
+
message: `The activity (${activity.id.href}) and its actors do not have the same origin.`
|
|
3379
|
+
});
|
|
3380
|
+
span.end();
|
|
3381
|
+
return;
|
|
3382
|
+
}
|
|
3313
3383
|
cacheKey = activity.id == null ? null : [
|
|
3314
3384
|
...this.kvPrefixes.activityIdempotence,
|
|
3315
3385
|
context.origin,
|
|
@@ -4422,20 +4492,6 @@ var ContextImpl = class ContextImpl {
|
|
|
4422
4492
|
activity: await fetched.toJsonLd({ contextLoader })
|
|
4423
4493
|
});
|
|
4424
4494
|
return false;
|
|
4425
|
-
} else if (fetched.actorIds.length < 1) {
|
|
4426
|
-
logger.debug("Fetched activity object is missing an actor; unable to verify.", {
|
|
4427
|
-
recipient,
|
|
4428
|
-
activity: await fetched.toJsonLd({ contextLoader })
|
|
4429
|
-
});
|
|
4430
|
-
return false;
|
|
4431
|
-
}
|
|
4432
|
-
const activityId = fetched.id;
|
|
4433
|
-
if (!fetched.actorIds.every((actor) => actor.origin === activityId.origin)) {
|
|
4434
|
-
logger.debug("Fetched activity object has actors from different origins; unable to verify.", {
|
|
4435
|
-
recipient,
|
|
4436
|
-
activity: await fetched.toJsonLd({ contextLoader })
|
|
4437
|
-
});
|
|
4438
|
-
return false;
|
|
4439
4495
|
}
|
|
4440
4496
|
logger.debug("Successfully fetched the remote activity object {activityId}; ignore the original activity and use the fetched one, which is trustworthy.");
|
|
4441
4497
|
activity = fetched;
|
|
@@ -4444,6 +4500,20 @@ var ContextImpl = class ContextImpl {
|
|
|
4444
4500
|
recipient,
|
|
4445
4501
|
activity: json
|
|
4446
4502
|
});
|
|
4503
|
+
if (activity.actorId == null) {
|
|
4504
|
+
logger.debug("Activity is missing an actor; unable to verify.", {
|
|
4505
|
+
recipient,
|
|
4506
|
+
activity: json
|
|
4507
|
+
});
|
|
4508
|
+
return false;
|
|
4509
|
+
}
|
|
4510
|
+
if (activity.id != null && !actorsHaveSameOrigin(activity)) {
|
|
4511
|
+
logger.debug("Activity has actors from different origins; unable to verify.", {
|
|
4512
|
+
recipient,
|
|
4513
|
+
activity: json
|
|
4514
|
+
});
|
|
4515
|
+
return false;
|
|
4516
|
+
}
|
|
4447
4517
|
const routeResult = await routeActivity({
|
|
4448
4518
|
context: this,
|
|
4449
4519
|
json,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
|
-
const require_middleware = require("./middleware-
|
|
3
|
+
const require_middleware = require("./middleware-CVRFS7PZ.cjs");
|
|
4
4
|
exports.FederationImpl = require_middleware.FederationImpl;
|
package/dist/mod.cjs
CHANGED
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
4
4
|
require("./chunk-DDcVe30Y.cjs");
|
|
5
5
|
const require_transformers = require("./transformers-NeAONrAq.cjs");
|
|
6
6
|
require("./compat/mod.cjs");
|
|
7
|
-
const require_http = require("./http-
|
|
8
|
-
const require_middleware = require("./middleware-
|
|
7
|
+
const require_http = require("./http-Cginz7L0.cjs");
|
|
8
|
+
const require_middleware = require("./middleware-CVRFS7PZ.cjs");
|
|
9
9
|
const require_types = require("./types-DRPjmHVV.cjs");
|
|
10
|
-
const require_proof = require("./proof-
|
|
11
|
-
const require_kv_cache = require("./kv-cache-
|
|
10
|
+
const require_proof = require("./proof-BbHMAkPG.cjs");
|
|
11
|
+
const require_kv_cache = require("./kv-cache-BdylAE9w.cjs");
|
|
12
12
|
const require_federation_mod = require("./federation/mod.cjs");
|
|
13
13
|
require("./nodeinfo/mod.cjs");
|
|
14
14
|
require("./runtime/mod.cjs");
|
package/dist/mod.js
CHANGED
|
@@ -3,11 +3,11 @@ import { URLPattern } from "urlpattern-polyfill";
|
|
|
3
3
|
import "./chunk-CRNNMoPX.js";
|
|
4
4
|
import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-BGMIq1cs.js";
|
|
5
5
|
import "./compat/mod.js";
|
|
6
|
-
import { _ as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKey, d as importJwk, g as parseAcceptSignature, h as fulfillAcceptSignature, i as verifyRequest, l as fetchKeyDetailed, m as formatAcceptSignature, o as exportJwk, r as signRequest, u as generateCryptoKeyPair } from "./http-
|
|
7
|
-
import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "./middleware-
|
|
6
|
+
import { _ as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKey, d as importJwk, g as parseAcceptSignature, h as fulfillAcceptSignature, i as verifyRequest, l as fetchKeyDetailed, m as formatAcceptSignature, o as exportJwk, r as signRequest, u as generateCryptoKeyPair } from "./http-B3rSb2GQ.js";
|
|
7
|
+
import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "./middleware-41MkquTV.js";
|
|
8
8
|
import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-miAYfiGO.js";
|
|
9
|
-
import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "./proof-
|
|
10
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
9
|
+
import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "./proof-cGfRPTiV.js";
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-8Kg2CHiD.js";
|
|
11
11
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation/mod.js";
|
|
12
12
|
import "./nodeinfo/mod.js";
|
|
13
13
|
import "./runtime/mod.js";
|
|
@@ -3,7 +3,7 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as esm_default } from "../esm-DVILvP5e.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
|
-
import "../std__assert-
|
|
6
|
+
import "../std__assert-DflMZha5.mjs";
|
|
7
7
|
import { n as assertInstanceOf } from "../assert-BhQd8QHP.mjs";
|
|
8
8
|
import { a as parseProtocol, c as parseUsage, i as parseOutboundService, n as parseInboundService, o as parseServices, r as parseNodeInfo, s as parseSoftware, t as getNodeInfo } from "../client-CjDMsn4a.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
@@ -3,9 +3,9 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { n as createRequestContext } from "../context-Juj6bdHC.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
|
-
import "../std__assert-
|
|
6
|
+
import "../std__assert-DflMZha5.mjs";
|
|
7
7
|
import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
|
|
8
|
-
import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-
|
|
8
|
+
import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-C9UCWOqw.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
//#region src/nodeinfo/handler.test.ts
|
|
11
11
|
test("handleNodeInfo()", async () => {
|
|
@@ -2,8 +2,8 @@ import "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
|
-
import "../std__assert-
|
|
6
|
-
import { t as assertThrows } from "../assert_throws-
|
|
5
|
+
import "../std__assert-DflMZha5.mjs";
|
|
6
|
+
import { t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
|
|
7
7
|
import { t as nodeInfoToJson } from "../types-DCP0WLdt.mjs";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
//#region src/nodeinfo/types.test.ts
|
|
@@ -2,7 +2,7 @@ import { Temporal } from "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
|
-
import "../std__assert-
|
|
5
|
+
import "../std__assert-DflMZha5.mjs";
|
|
6
6
|
import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
|
|
7
7
|
import { test } from "@fedify/fixture";
|
|
8
8
|
import { SpanKind, SpanStatusCode, TraceFlags } from "@opentelemetry/api";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { c as verifyKeyOwnership, n as fetchActorDocument, t as exportJwk } from "./key-
|
|
4
|
+
import { n as version, t as name } from "./deno-BiYv5RT5.mjs";
|
|
5
|
+
import { c as verifyKeyOwnership, n as fetchActorDocument, t as exportJwk } from "./key-O-ATwIGS.mjs";
|
|
6
6
|
import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
const require_chunk = require("./chunk-DDcVe30Y.cjs");
|
|
4
|
-
const require_http = require("./http-
|
|
4
|
+
const require_http = require("./http-Cginz7L0.cjs");
|
|
5
5
|
let _logtape_logtape = require("@logtape/logtape");
|
|
6
6
|
let _fedify_vocab = require("@fedify/vocab");
|
|
7
7
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { r as fetchKey, s as validateCryptoKey } from "./key-
|
|
4
|
+
import { n as version, t as name } from "./deno-BiYv5RT5.mjs";
|
|
5
|
+
import { r as fetchKey, s as validateCryptoKey } from "./key-O-ATwIGS.mjs";
|
|
6
6
|
import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
|
|
7
7
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { c as fetchKey, f as validateCryptoKey, o as exportJwk, p as verifyKeyOwnership, s as fetchActorDocument, v as name, y as version } from "./http-
|
|
3
|
+
import { c as fetchKey, f as validateCryptoKey, o as exportJwk, p as verifyKeyOwnership, s as fetchActorDocument, v as name, y as version } from "./http-B3rSb2GQ.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "@fedify/vocab";
|
|
6
6
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { n as version, t as name } from "./deno-BiYv5RT5.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-C1ga9WQu.mjs";
|
|
6
6
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
7
7
|
import { FetchError, UrlError, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
package/dist/sig/http.test.mjs
CHANGED
|
@@ -3,12 +3,12 @@ import "urlpattern-polyfill";
|
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as esm_default } from "../esm-DVILvP5e.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
|
-
import { i as assertExists, t as assertStringIncludes } from "../std__assert-
|
|
7
|
-
import {
|
|
6
|
+
import { i as assertExists, t as assertStringIncludes } from "../std__assert-DflMZha5.mjs";
|
|
7
|
+
import { r as assertFalse, t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
|
|
8
8
|
import { t as assert } from "../assert-BhQd8QHP.mjs";
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as exportJwk } from "../key-
|
|
11
|
-
import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase, u as verifyRequestDetailed } from "../http-
|
|
9
|
+
import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
|
|
10
|
+
import { t as exportJwk } from "../key-O-ATwIGS.mjs";
|
|
11
|
+
import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase, u as verifyRequestDetailed } from "../http-C1ga9WQu.mjs";
|
|
12
12
|
import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-CtZLJq76.mjs";
|
|
13
13
|
import { t as KvKeyCache } from "../keycache-RFlZObU3.mjs";
|
|
14
14
|
import { t as MemoryKvStore } from "../kv-HvthQAHr.mjs";
|
package/dist/sig/key.test.mjs
CHANGED
|
@@ -2,13 +2,13 @@ import "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
|
-
import { n as assertStrictEquals } from "../std__assert-
|
|
6
|
-
import { t as
|
|
5
|
+
import { n as assertStrictEquals } from "../std__assert-DflMZha5.mjs";
|
|
6
|
+
import { t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
|
|
7
7
|
import { t as assert } from "../assert-BhQd8QHP.mjs";
|
|
8
|
-
import { t as
|
|
9
|
-
import { a as generateCryptoKeyPair, i as fetchKeyDetailed, o as importJwk, r as fetchKey, s as validateCryptoKey, t as exportJwk } from "../key-
|
|
8
|
+
import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
|
|
9
|
+
import { a as generateCryptoKeyPair, i as fetchKeyDetailed, o as importJwk, r as fetchKey, s as validateCryptoKey, t as exportJwk } from "../key-O-ATwIGS.mjs";
|
|
10
10
|
import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
11
|
-
import { g as wrapContextLoaderForJsonLd } from "../ld-
|
|
11
|
+
import { g as wrapContextLoaderForJsonLd } from "../ld-C-fCGM-z.mjs";
|
|
12
12
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
13
13
|
import { CryptographicKey, Multikey, Person } from "@fedify/vocab";
|
|
14
14
|
import { FetchError, UrlError, getDocumentLoader } from "@fedify/vocab-runtime";
|
package/dist/sig/ld.test.mjs
CHANGED
|
@@ -2,12 +2,12 @@ import "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { r as assertFalse, t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
|
|
6
6
|
import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
|
|
7
|
-
import { t as
|
|
8
|
-
import { a as generateCryptoKeyPair } from "../key-
|
|
7
|
+
import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
|
|
8
|
+
import { a as generateCryptoKeyPair } from "../key-O-ATwIGS.mjs";
|
|
9
9
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
10
|
-
import { a as compactJsonLd, d as isInvalidUrlTypeError, f as signJsonLd, h as verifySignature, i as attachSignature, m as verifyJsonLd, n as UnsafeJsonLdError, o as createSignature, s as detachSignature } from "../ld-
|
|
10
|
+
import { a as compactJsonLd, d as isInvalidUrlTypeError, f as signJsonLd, h as verifySignature, i as attachSignature, m as verifyJsonLd, n as UnsafeJsonLdError, o as createSignature, s as detachSignature } from "../ld-C-fCGM-z.mjs";
|
|
11
11
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
12
12
|
import { CryptographicKey } from "@fedify/vocab";
|
|
13
13
|
import { encodeBase64 } from "byte-encodings/base64";
|
package/dist/sig/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
|
-
const require_http = require("../http-
|
|
5
|
-
const require_proof = require("../proof-
|
|
4
|
+
const require_http = require("../http-Cginz7L0.cjs");
|
|
5
|
+
const require_proof = require("../proof-BbHMAkPG.cjs");
|
|
6
6
|
exports.attachSignature = require_proof.attachSignature;
|
|
7
7
|
exports.createProof = require_proof.createProof;
|
|
8
8
|
exports.createSignature = require_proof.createSignature;
|
package/dist/sig/mod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { _ as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKey, d as importJwk, g as parseAcceptSignature, h as fulfillAcceptSignature, i as verifyRequest, l as fetchKeyDetailed, m as formatAcceptSignature, o as exportJwk, r as signRequest, u as generateCryptoKeyPair } from "../http-
|
|
4
|
-
import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "../proof-
|
|
3
|
+
import { _ as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKey, d as importJwk, g as parseAcceptSignature, h as fulfillAcceptSignature, i as verifyRequest, l as fetchKeyDetailed, m as formatAcceptSignature, o as exportJwk, r as signRequest, u as generateCryptoKeyPair } from "../http-B3rSb2GQ.js";
|
|
4
|
+
import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "../proof-cGfRPTiV.js";
|
|
5
5
|
export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, fetchKeyDetailed, formatAcceptSignature, fulfillAcceptSignature, generateCryptoKeyPair, getKeyOwner, importJwk, parseAcceptSignature, signJsonLd, signObject, signRequest, validateAcceptSignature, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifyRequestDetailed, verifySignature };
|
package/dist/sig/owner.test.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
|
-
import "../std__assert-
|
|
6
|
-
import {
|
|
5
|
+
import "../std__assert-DflMZha5.mjs";
|
|
6
|
+
import { r as assertFalse } from "../assert_throws-D4DNWrux.mjs";
|
|
7
7
|
import { t as assert } from "../assert-BhQd8QHP.mjs";
|
|
8
8
|
import { o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-CtZLJq76.mjs";
|
|
9
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-
|
|
9
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "../owner-C8IVASD3.mjs";
|
|
10
10
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
11
11
|
import { Create, CryptographicKey, lookupObject } from "@fedify/vocab";
|
|
12
12
|
//#region src/sig/owner.test.ts
|
package/dist/sig/proof.test.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import { Temporal } from "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
|
-
import "../std__assert-
|
|
6
|
-
import { t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
5
|
+
import "../std__assert-DflMZha5.mjs";
|
|
7
6
|
import { n as assertInstanceOf } from "../assert-BhQd8QHP.mjs";
|
|
7
|
+
import { t as assertRejects } from "../assert_rejects-WyYSTDDX.mjs";
|
|
8
8
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
9
|
-
import { i as verifyProof, n as signObject, r as verifyObject, t as createProof } from "../proof-
|
|
9
|
+
import { i as verifyProof, n as signObject, r as verifyObject, t as createProof } from "../proof-CUdcBgvg.mjs";
|
|
10
10
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
11
11
|
import { Create, DataIntegrityProof, Multikey, Note, Place } from "@fedify/vocab";
|
|
12
12
|
import { decodeMultibase, importMultibaseKey } from "@fedify/vocab-runtime";
|
|
@@ -2,8 +2,8 @@ import "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { a as red, i as buildMessage, l as AssertionError, n as diffStr, r as diff, s as format } from "./assert_equals-Ew3jOFa3.mjs";
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
5
|
+
import "./assert_throws-D4DNWrux.mjs";
|
|
6
|
+
import "./assert_rejects-WyYSTDDX.mjs";
|
|
7
7
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_exists.js
|
|
8
8
|
/**
|
|
9
9
|
* Make an assertion that actual is not null or undefined.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { c as getNormalizationContextLoader } from "./ld-
|
|
4
|
+
import { c as getNormalizationContextLoader } from "./ld-C-fCGM-z.mjs";
|
|
5
5
|
import jsonld from "@fedify/vocab-runtime/jsonld";
|
|
6
6
|
//#region src/federation/temporal.ts
|
|
7
7
|
function isPlainObject(value) {
|