@fedify/fedify 2.0.36-dev.2734 → 2.0.36-dev.2746
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/{builder-D0y_1xPt.mjs → builder-CnyFdlUn.mjs} +3 -3
- package/dist/compat/transformers.test.mjs +2 -2
- package/dist/{deno-CvHOP0XE.mjs → deno-DCXndlEx.mjs} +1 -1
- package/dist/{docloader-QmdzA0HA.mjs → docloader-7M06kit4.mjs} +2 -2
- package/dist/federation/builder.test.mjs +2 -2
- package/dist/federation/collection.test.mjs +1 -1
- package/dist/federation/handler.test.mjs +169 -7
- package/dist/federation/idempotency.test.mjs +3 -3
- package/dist/federation/inbox.test.mjs +1 -1
- package/dist/federation/keycache.test.mjs +2 -2
- package/dist/federation/kv.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +102 -8
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.js +1 -1
- package/dist/federation/negotiation.test.mjs +1 -1
- package/dist/federation/retry.test.mjs +1 -1
- package/dist/federation/send.test.mjs +3 -3
- package/dist/federation/temporal.test.mjs +1 -1
- package/dist/federation/webfinger.test.mjs +2 -2
- package/dist/{http-CIiwaoIn.cjs → http-BhaAN2KG.cjs} +1 -1
- package/dist/{http-DM--MHnA.mjs → http-hi5IS6qw.mjs} +2 -2
- package/dist/{http-CacZaxQy.js → http-hjoPA7jZ.js} +1 -1
- package/dist/{inbox-BgsnvP5o.mjs → inbox-Bygi511A.mjs} +1 -1
- package/dist/{key-RrdwitZu.mjs → key-DYyRTxPH.mjs} +1 -1
- package/dist/{kv-cache--kqYNgl4.cjs → kv-cache-Bjnv9p9e.cjs} +1 -1
- package/dist/{kv-cache-DO77nN26.js → kv-cache-YZ2bpa_P.js} +1 -1
- package/dist/{ld-BpBoDQsD.mjs → ld-CKUnk1Ps.mjs} +38 -8
- package/dist/ld-signature-_KYhPsqt.mjs +23 -0
- package/dist/{middleware-ByORyvfD.cjs → middleware-BDCfPddM.cjs} +1 -1
- package/dist/{middleware-DkQNfZyL.cjs → middleware-C_4rWloR.cjs} +18 -14
- package/dist/{middleware-BcLbgxfC.js → middleware-D5uql06B.js} +17 -13
- package/dist/{middleware-j3sV7iws.mjs → middleware-dYPOyDLN.mjs} +1 -1
- package/dist/{middleware-DoMxpm9r.mjs → middleware-yx080dbw.mjs} +31 -27
- 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 +1 -1
- package/dist/otel/exporter.test.mjs +1 -1
- package/dist/{owner-zSUyR5Fs.mjs → owner-CqHBbNXl.mjs} +2 -2
- package/dist/{proof-C90umkRN.mjs → proof-CDalRU9r.mjs} +2 -2
- package/dist/{proof-DJvdhpXO.js → proof-D2RNLHHt.js} +36 -21
- package/dist/{proof-qxFPzf3D.cjs → proof-DLqGjdaL.cjs} +43 -22
- package/dist/{send-BE4hcPfe.mjs → send-XHpoZpxW.mjs} +2 -2
- package/dist/sig/http.test.mjs +2 -2
- package/dist/sig/key-types.test.d.mts +1 -1
- package/dist/sig/key.test.mjs +2 -2
- package/dist/sig/ld.test.mjs +223 -4
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/proof.test.mjs +2 -2
- package/dist/{temporal-BQUGkj5T.mjs → temporal-D3yEsvvS.mjs} +1 -1
- package/dist/testing/mod.d.mts +1 -1
- package/dist/utils/docloader.test.mjs +2 -2
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +5 -5
- /package/dist/{callback-CJd-aCRE.d.mts → callback-BFMEE_9V.d.mts} +0 -0
- /package/dist/{client-DGNacEx_.mjs → client-DLAWT9ep.mjs} +0 -0
- /package/dist/{collection-DI6YzYpd.mjs → collection-ChgDTHLz.mjs} +0 -0
- /package/dist/{keycache-DBD6fzl1.mjs → keycache-crDMn2HK.mjs} +0 -0
- /package/dist/{kv-mI4Ix2EU.mjs → kv-BrZHNugx.mjs} +0 -0
- /package/dist/{negotiation-TWEs6Cl8.mjs → negotiation-BehA2uul.mjs} +0 -0
- /package/dist/{retry-Ddbq3AcK.mjs → retry-B_E3V_Dx.mjs} +0 -0
- /package/dist/{types-MNlFfxjv.mjs → types-C37hquWI.mjs} +0 -0
|
@@ -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 { o as validateCryptoKey, r as fetchKey } from "./key-
|
|
4
|
+
import { n as version, t as name } from "./deno-DCXndlEx.mjs";
|
|
5
|
+
import { o as validateCryptoKey, r as fetchKey } from "./key-DYyRTxPH.mjs";
|
|
6
6
|
import { Activity, CryptographicKey, Object as Object$1, getTypeId } from "@fedify/vocab";
|
|
7
7
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { getDocumentLoader, preloadedContexts } from "@fedify/vocab-runtime";
|
|
@@ -465,6 +465,24 @@ async function signJsonLd(jsonLd, privateKey, keyId, options) {
|
|
|
465
465
|
}
|
|
466
466
|
});
|
|
467
467
|
}
|
|
468
|
+
/** @internal */
|
|
469
|
+
function hasVerifiableSignature(jsonLd) {
|
|
470
|
+
if (typeof jsonLd !== "object" || jsonLd == null || Array.isArray(jsonLd) || !("signature" in jsonLd)) return false;
|
|
471
|
+
const signature = jsonLd.signature;
|
|
472
|
+
if (typeof signature !== "object" || signature == null || Array.isArray(signature)) return false;
|
|
473
|
+
return "type" in signature && signature.type === "RsaSignature2017" && "creator" in signature && typeof signature.creator === "string" && (!("created" in signature) || typeof signature.created === "string") && "signatureValue" in signature && typeof signature.signatureValue === "string";
|
|
474
|
+
}
|
|
475
|
+
/** @internal */
|
|
476
|
+
function describeSignatureShape(jsonLd) {
|
|
477
|
+
if (typeof jsonLd !== "object" || jsonLd == null || !("signature" in jsonLd)) return null;
|
|
478
|
+
const signature = jsonLd.signature;
|
|
479
|
+
const properties = typeof signature === "object" && signature != null ? globalThis.Object.keys(signature) : [];
|
|
480
|
+
return {
|
|
481
|
+
signatureKind: signature == null ? String(signature) : Array.isArray(signature) ? "array" : typeof signature,
|
|
482
|
+
signatureProperties: properties.sort().slice(0, 20).map((p) => p.slice(0, 80)),
|
|
483
|
+
signaturePropertyCount: properties.length
|
|
484
|
+
};
|
|
485
|
+
}
|
|
468
486
|
/**
|
|
469
487
|
* Checks if the given JSON-LD document has a Linked Data Signature.
|
|
470
488
|
* @param jsonLd The JSON-LD document to check.
|
|
@@ -505,7 +523,11 @@ function detachSignature(jsonLd) {
|
|
|
505
523
|
* @since 1.0.0
|
|
506
524
|
*/
|
|
507
525
|
async function verifySignature(jsonLd, options = {}) {
|
|
508
|
-
if (!
|
|
526
|
+
if (!hasVerifiableSignature(jsonLd)) {
|
|
527
|
+
const shape = describeSignatureShape(jsonLd);
|
|
528
|
+
if (shape != null) logger.debug("Linked Data Signature has an unsupported shape: {signatureKind}; properties: {signatureProperties}.", shape);
|
|
529
|
+
return null;
|
|
530
|
+
}
|
|
509
531
|
const sig = jsonLd.signature;
|
|
510
532
|
let signature;
|
|
511
533
|
try {
|
|
@@ -517,7 +539,14 @@ async function verifySignature(jsonLd, options = {}) {
|
|
|
517
539
|
});
|
|
518
540
|
return null;
|
|
519
541
|
}
|
|
520
|
-
|
|
542
|
+
let creator;
|
|
543
|
+
try {
|
|
544
|
+
creator = new URL(sig.creator);
|
|
545
|
+
} catch {
|
|
546
|
+
logger.debug("Failed to verify; signature creator is not a valid URL.");
|
|
547
|
+
return null;
|
|
548
|
+
}
|
|
549
|
+
const { key, cached } = await fetchKey(creator, CryptographicKey, options);
|
|
521
550
|
if (key == null) return null;
|
|
522
551
|
const sigOpts = {
|
|
523
552
|
...sig,
|
|
@@ -557,7 +586,7 @@ async function verifySignature(jsonLd, options = {}) {
|
|
|
557
586
|
keyId: sig.creator,
|
|
558
587
|
...sig
|
|
559
588
|
});
|
|
560
|
-
const { key } = await fetchKey(
|
|
589
|
+
const { key } = await fetchKey(creator, CryptographicKey, {
|
|
561
590
|
...options,
|
|
562
591
|
keyCache: {
|
|
563
592
|
get: () => Promise.resolve(void 0),
|
|
@@ -595,11 +624,12 @@ async function verifyCompactJsonLd(jsonLd, options = {}) {
|
|
|
595
624
|
async function verifyJsonLdInternal(jsonLd, options, compact) {
|
|
596
625
|
return await (options.tracerProvider ?? trace.getTracerProvider()).getTracer(name, version).startActiveSpan("ld_signatures.verify", async (span) => {
|
|
597
626
|
try {
|
|
598
|
-
const
|
|
627
|
+
const hasLdSignature = hasVerifiableSignature(jsonLd);
|
|
628
|
+
const verificationOptions = hasLdSignature ? {
|
|
599
629
|
...options,
|
|
600
630
|
contextLoader: getNormalizationContextLoader(options.contextLoader)
|
|
601
631
|
} : options;
|
|
602
|
-
const compacted = compact ?
|
|
632
|
+
const compacted = compact ? hasLdSignature ? await compactJsonLd(jsonLd, options.contextLoader) : jsonLd : jsonLd;
|
|
603
633
|
const object = await Object$1.fromJsonLd(compacted, verificationOptions);
|
|
604
634
|
if (object.id != null) span.setAttribute("activitypub.object.id", object.id.href);
|
|
605
635
|
span.setAttribute("activitypub.object.type", getTypeId(object).href);
|
|
@@ -649,4 +679,4 @@ async function hashJsonLd(jsonLd, contextLoader, mode = "sign") {
|
|
|
649
679
|
return encodeHex(await crypto.subtle.digest("SHA-256", encoder.encode(canon)));
|
|
650
680
|
}
|
|
651
681
|
//#endregion
|
|
652
|
-
export { compactJsonLd as a,
|
|
682
|
+
export { verifySignature as _, compactJsonLd as a, detachSignature as c, hasVerifiableSignature as d, isClearlyMalformedContextReference as f, verifyJsonLd as g, verifyCompactJsonLd as h, attachSignature as i, getNormalizationContextLoader as l, signJsonLd as m, UnsafeJsonLdError as n, createSignature as o, isInvalidUrlTypeError as p, assertSafeJsonLd as r, describeSignatureShape as s, InvalidContextReferenceError as t, hasSignature as u, wrapContextLoaderForJsonLd as v };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
//#region src/testing/ld-signature.ts
|
|
5
|
+
const ldSignatureWithoutCreated = {
|
|
6
|
+
"@context": ["https://www.w3.org/ns/activitystreams", "https://w3id.org/security/v1"],
|
|
7
|
+
"id": "https://example.com/activities/1",
|
|
8
|
+
"type": "Create",
|
|
9
|
+
"actor": "https://example.com/person2",
|
|
10
|
+
"object": {
|
|
11
|
+
"id": "https://example.com/notes/1",
|
|
12
|
+
"type": "Note",
|
|
13
|
+
"attributedTo": "https://example.com/person2",
|
|
14
|
+
"content": "hi"
|
|
15
|
+
},
|
|
16
|
+
"signature": {
|
|
17
|
+
"type": "RsaSignature2017",
|
|
18
|
+
"creator": "https://example.com/person2#key3",
|
|
19
|
+
"signatureValue": "xUGTqQ94q+3bhvorwJx42sa7nCuR2ggtJYjwhqsueMCOLEmTEpeGGhG4mRKjFDt/ZegE9Icbxau6YL6WeQxWLMwYs7vucAE6948UlDFn1l3M+papmwgbNpOnk/baj9NMzChtqwOIQ1ka5bJAZjTo5FgG1YBmMibTHb6GN5ULzxjTlch93tcBx/LVwdPU1MyYHHz55hiMQZkw9AZ521PebCrm8eUjsXHwjijeh7/GIFWW3bmwk1dHRxJbUmmQlxBxmaLXQ8aVkFN3R00FBUjnn54Bp+nQJI/VXcKs3nFYGZ9EsMQcXlYCbOuOfPAPWiqdLSOhDZtuisIcZcvOiZ/tgA5RlXro0AXv0f3gKpkoxPBsUIIM0gBeb6+MTbSAk6IqPf0qy81V0XEjEMKSZNGDeULH+zMFodtw07EmfR/y/3i9ge3htd7vQQ0XKLLUfBddzMqS+8AAuSl4ObAlWAM2xuw/4yuQ3AIQy9RtsiEjDSO1NtUK5wRXCeXo++CkVpODDdxNtWdZD6GzfX9PAuIfHlWE+CLDaY/iH4fWxumLu15dD9vVDjlYAAS/ZNOyiPSCh4mLZ65sKIp8UkPstYRBKcjiRJhKUh1Br8TvTt/j/iC9SnFw/8uiCkLYd6yhdgXQafocPIa6eeb4m/EhF1HY0v+6qKR5JOBT6mTA/BPRmWg="
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { ldSignatureWithoutCreated as t };
|
|
@@ -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-C_4rWloR.cjs");
|
|
4
4
|
exports.FederationImpl = require_middleware.FederationImpl;
|
|
@@ -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-BhaAN2KG.cjs");
|
|
6
6
|
const require_types = require("./types-DOvyymM4.cjs");
|
|
7
|
-
const require_proof = require("./proof-
|
|
8
|
-
const require_kv_cache = require("./kv-cache
|
|
7
|
+
const require_proof = require("./proof-DLqGjdaL.cjs");
|
|
8
|
+
const require_kv_cache = require("./kv-cache-Bjnv9p9e.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");
|
|
@@ -351,7 +351,7 @@ var FederationBuilderImpl = class {
|
|
|
351
351
|
this.collectionTypeIds = {};
|
|
352
352
|
}
|
|
353
353
|
async build(options) {
|
|
354
|
-
const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-
|
|
354
|
+
const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-BDCfPddM.cjs"));
|
|
355
355
|
const f = new FederationImpl(options);
|
|
356
356
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
357
357
|
f.router = this.router.clone();
|
|
@@ -1172,8 +1172,8 @@ async function handleObject(request, { values, context, objectDispatcher, author
|
|
|
1172
1172
|
* @param parameters The parameters for handling the collection.
|
|
1173
1173
|
* @returns A promise that resolves to an HTTP response.
|
|
1174
1174
|
*/
|
|
1175
|
-
async function handleCollection(request, { name: name$
|
|
1176
|
-
const spanName = name$
|
|
1175
|
+
async function handleCollection(request, { name: name$1, identifier, uriGetter, filter, filterPredicate, context, collectionCallbacks, tracerProvider, onUnauthorized, onNotFound }) {
|
|
1176
|
+
const spanName = name$1.trim().replace(/\s+/g, "_");
|
|
1177
1177
|
tracerProvider = tracerProvider ?? _opentelemetry_api.trace.getTracerProvider();
|
|
1178
1178
|
const tracer = tracerProvider.getTracer(require_http.name, require_http.version);
|
|
1179
1179
|
const cursor = new URL(request.url).searchParams.get("cursor");
|
|
@@ -1215,7 +1215,7 @@ async function handleCollection(request, { name: name$2, identifier, uriGetter,
|
|
|
1215
1215
|
collection = new _fedify_vocab.OrderedCollection({
|
|
1216
1216
|
id: baseUri,
|
|
1217
1217
|
totalItems: totalItems == null ? null : Number(totalItems),
|
|
1218
|
-
items: filterCollectionItems(itemsOrResponse, name$
|
|
1218
|
+
items: filterCollectionItems(itemsOrResponse, name$1, filterPredicate)
|
|
1219
1219
|
});
|
|
1220
1220
|
} else {
|
|
1221
1221
|
const lastCursor = await collectionCallbacks.lastCursor?.(context, identifier);
|
|
@@ -1236,7 +1236,7 @@ async function handleCollection(request, { name: name$2, identifier, uriGetter,
|
|
|
1236
1236
|
} else {
|
|
1237
1237
|
const uri = new URL(baseUri);
|
|
1238
1238
|
uri.searchParams.set("cursor", cursor);
|
|
1239
|
-
const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$
|
|
1239
|
+
const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$1}`, {
|
|
1240
1240
|
kind: _opentelemetry_api.SpanKind.SERVER,
|
|
1241
1241
|
attributes: {
|
|
1242
1242
|
"activitypub.collection.id": uri.href,
|
|
@@ -1280,7 +1280,7 @@ async function handleCollection(request, { name: name$2, identifier, uriGetter,
|
|
|
1280
1280
|
id: uri,
|
|
1281
1281
|
prev,
|
|
1282
1282
|
next,
|
|
1283
|
-
items: filterCollectionItems(items, name$
|
|
1283
|
+
items: filterCollectionItems(items, name$1, filterPredicate),
|
|
1284
1284
|
partOf
|
|
1285
1285
|
});
|
|
1286
1286
|
}
|
|
@@ -1439,7 +1439,11 @@ async function handleInboxInternal(request, parameters, span) {
|
|
|
1439
1439
|
}
|
|
1440
1440
|
const keyCache = new KvKeyCache(kv, kvPrefixes.publicKey, ctx);
|
|
1441
1441
|
const jsonWithoutSig = require_proof.detachSignature(json);
|
|
1442
|
-
const hasLdSignature = require_proof.
|
|
1442
|
+
const hasLdSignature = require_proof.hasVerifiableSignature(json);
|
|
1443
|
+
if (!hasLdSignature) {
|
|
1444
|
+
const shape = require_proof.describeSignatureShape(json);
|
|
1445
|
+
if (shape != null) logger.debug("Linked Data Signature has an unsupported shape: {signatureKind}; properties: {signatureProperties}.", shape);
|
|
1446
|
+
}
|
|
1443
1447
|
const canAttemptAlternateAuthAfterLdSignatureFailure = skipSignatureVerification || hasHttpSignatureHeaders(request) || hasObjectIntegrityProof(jsonWithoutSig);
|
|
1444
1448
|
let deferredLdSignatureError = void 0;
|
|
1445
1449
|
const respondInvalidActivity = async (error) => {
|
|
@@ -1824,8 +1828,8 @@ var CustomCollectionHandler = class {
|
|
|
1824
1828
|
* @param CollectionPage The CollectionPage constructor.
|
|
1825
1829
|
* @param filterPredicate Optional filter predicate for items.
|
|
1826
1830
|
*/
|
|
1827
|
-
constructor(name$
|
|
1828
|
-
this.name = name$
|
|
1831
|
+
constructor(name$2, values, context, callbacks, tracerProvider = _opentelemetry_api.trace.getTracerProvider(), Collection, CollectionPage, filterPredicate) {
|
|
1832
|
+
this.name = name$2;
|
|
1829
1833
|
this.values = values;
|
|
1830
1834
|
this.context = context;
|
|
1831
1835
|
this.callbacks = callbacks;
|
|
@@ -3235,7 +3239,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
3235
3239
|
let parseInput = void 0;
|
|
3236
3240
|
let parseContextLoader = context.contextLoader;
|
|
3237
3241
|
try {
|
|
3238
|
-
const hasSignatureField = require_proof.
|
|
3242
|
+
const hasSignatureField = require_proof.hasVerifiableSignature(message.activity);
|
|
3239
3243
|
const shouldParseFromNormalizedSignedPayload = message.ldSignatureVerified === true || message.normalizedActivity != null || message.ldSignatureVerified == null && hasSignatureField;
|
|
3240
3244
|
const parseContext = hasSignatureField ? {
|
|
3241
3245
|
...context,
|
|
@@ -4679,7 +4683,7 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
4679
4683
|
if (forwarder.length < 1) throw new Error("The forwarder's key pairs are empty.");
|
|
4680
4684
|
keys = forwarder;
|
|
4681
4685
|
} else keys = [forwarder];
|
|
4682
|
-
if (!require_proof.
|
|
4686
|
+
if (!require_proof.hasVerifiableSignature(this.activity)) {
|
|
4683
4687
|
let hasProof;
|
|
4684
4688
|
try {
|
|
4685
4689
|
hasProof = await (await _fedify_vocab.Activity.fromJsonLd(this.activity, this)).getProof() != null;
|
|
@@ -2,10 +2,10 @@ import { Temporal } from "@js-temporal/polyfill";
|
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
3
|
import { t as __exportAll } from "./chunk-CRNNMoPX.js";
|
|
4
4
|
import { r as getDefaultActivityTransformers } from "./transformers-BGMIq1cs.js";
|
|
5
|
-
import { c as importJwk, d as name, f as version, i as exportJwk, l as validateCryptoKey, r as verifyRequest, t as doubleKnockScoped } from "./http-
|
|
5
|
+
import { c as importJwk, d as name, f as version, i as exportJwk, l as validateCryptoKey, r as verifyRequest, t as doubleKnockScoped } from "./http-hjoPA7jZ.js";
|
|
6
6
|
import { a as MAX_BODY_SIZE, i as BodyTooLargeError, n as getNodeInfo, o as readBoundedText, t as nodeInfoToJson } from "./types-B1_pRFE_.js";
|
|
7
|
-
import { _ as
|
|
8
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
7
|
+
import { S as wrapContextLoaderForJsonLd, _ as isInvalidUrlTypeError, a as doesActorOwnKey, c as assertSafeJsonLd, f as describeSignatureShape, g as isClearlyMalformedContextReference, h as hasVerifiableSignature, m as getNormalizationContextLoader, n as signObject, o as getKeyOwner, p as detachSignature, r as verifyObject, s as InvalidContextReferenceError, u as compactJsonLd, v as signJsonLd, y as verifyCompactJsonLd } from "./proof-D2RNLHHt.js";
|
|
8
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-YZ2bpa_P.js";
|
|
9
9
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
10
10
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
11
11
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
@@ -1171,8 +1171,8 @@ async function handleObject(request, { values, context, objectDispatcher, author
|
|
|
1171
1171
|
* @param parameters The parameters for handling the collection.
|
|
1172
1172
|
* @returns A promise that resolves to an HTTP response.
|
|
1173
1173
|
*/
|
|
1174
|
-
async function handleCollection(request, { name: name$
|
|
1175
|
-
const spanName = name$
|
|
1174
|
+
async function handleCollection(request, { name: name$1, identifier, uriGetter, filter, filterPredicate, context, collectionCallbacks, tracerProvider, onUnauthorized, onNotFound }) {
|
|
1175
|
+
const spanName = name$1.trim().replace(/\s+/g, "_");
|
|
1176
1176
|
tracerProvider = tracerProvider ?? trace.getTracerProvider();
|
|
1177
1177
|
const tracer = tracerProvider.getTracer(name, version);
|
|
1178
1178
|
const cursor = new URL(request.url).searchParams.get("cursor");
|
|
@@ -1214,7 +1214,7 @@ async function handleCollection(request, { name: name$2, identifier, uriGetter,
|
|
|
1214
1214
|
collection = new OrderedCollection({
|
|
1215
1215
|
id: baseUri,
|
|
1216
1216
|
totalItems: totalItems == null ? null : Number(totalItems),
|
|
1217
|
-
items: filterCollectionItems(itemsOrResponse, name$
|
|
1217
|
+
items: filterCollectionItems(itemsOrResponse, name$1, filterPredicate)
|
|
1218
1218
|
});
|
|
1219
1219
|
} else {
|
|
1220
1220
|
const lastCursor = await collectionCallbacks.lastCursor?.(context, identifier);
|
|
@@ -1235,7 +1235,7 @@ async function handleCollection(request, { name: name$2, identifier, uriGetter,
|
|
|
1235
1235
|
} else {
|
|
1236
1236
|
const uri = new URL(baseUri);
|
|
1237
1237
|
uri.searchParams.set("cursor", cursor);
|
|
1238
|
-
const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$
|
|
1238
|
+
const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$1}`, {
|
|
1239
1239
|
kind: SpanKind.SERVER,
|
|
1240
1240
|
attributes: {
|
|
1241
1241
|
"activitypub.collection.id": uri.href,
|
|
@@ -1279,7 +1279,7 @@ async function handleCollection(request, { name: name$2, identifier, uriGetter,
|
|
|
1279
1279
|
id: uri,
|
|
1280
1280
|
prev,
|
|
1281
1281
|
next,
|
|
1282
|
-
items: filterCollectionItems(items, name$
|
|
1282
|
+
items: filterCollectionItems(items, name$1, filterPredicate),
|
|
1283
1283
|
partOf
|
|
1284
1284
|
});
|
|
1285
1285
|
}
|
|
@@ -1438,7 +1438,11 @@ async function handleInboxInternal(request, parameters, span) {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
const keyCache = new KvKeyCache(kv, kvPrefixes.publicKey, ctx);
|
|
1440
1440
|
const jsonWithoutSig = detachSignature(json);
|
|
1441
|
-
const hasLdSignature =
|
|
1441
|
+
const hasLdSignature = hasVerifiableSignature(json);
|
|
1442
|
+
if (!hasLdSignature) {
|
|
1443
|
+
const shape = describeSignatureShape(json);
|
|
1444
|
+
if (shape != null) logger.debug("Linked Data Signature has an unsupported shape: {signatureKind}; properties: {signatureProperties}.", shape);
|
|
1445
|
+
}
|
|
1442
1446
|
const canAttemptAlternateAuthAfterLdSignatureFailure = skipSignatureVerification || hasHttpSignatureHeaders(request) || hasObjectIntegrityProof(jsonWithoutSig);
|
|
1443
1447
|
let deferredLdSignatureError = void 0;
|
|
1444
1448
|
const respondInvalidActivity = async (error) => {
|
|
@@ -1823,8 +1827,8 @@ var CustomCollectionHandler = class {
|
|
|
1823
1827
|
* @param CollectionPage The CollectionPage constructor.
|
|
1824
1828
|
* @param filterPredicate Optional filter predicate for items.
|
|
1825
1829
|
*/
|
|
1826
|
-
constructor(name$
|
|
1827
|
-
this.name = name$
|
|
1830
|
+
constructor(name$2, values, context, callbacks, tracerProvider = trace.getTracerProvider(), Collection, CollectionPage, filterPredicate) {
|
|
1831
|
+
this.name = name$2;
|
|
1828
1832
|
this.values = values;
|
|
1829
1833
|
this.context = context;
|
|
1830
1834
|
this.callbacks = callbacks;
|
|
@@ -3241,7 +3245,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
3241
3245
|
let parseInput = void 0;
|
|
3242
3246
|
let parseContextLoader = context.contextLoader;
|
|
3243
3247
|
try {
|
|
3244
|
-
const hasSignatureField =
|
|
3248
|
+
const hasSignatureField = hasVerifiableSignature(message.activity);
|
|
3245
3249
|
const shouldParseFromNormalizedSignedPayload = message.ldSignatureVerified === true || message.normalizedActivity != null || message.ldSignatureVerified == null && hasSignatureField;
|
|
3246
3250
|
const parseContext = hasSignatureField ? {
|
|
3247
3251
|
...context,
|
|
@@ -4685,7 +4689,7 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
4685
4689
|
if (forwarder.length < 1) throw new Error("The forwarder's key pairs are empty.");
|
|
4686
4690
|
keys = forwarder;
|
|
4687
4691
|
} else keys = [forwarder];
|
|
4688
|
-
if (!
|
|
4692
|
+
if (!hasVerifiableSignature(this.activity)) {
|
|
4689
4693
|
let hasProof;
|
|
4690
4694
|
try {
|
|
4691
4695
|
hasProof = await (await Activity.fromJsonLd(this.activity, this)).getProof() != null;
|
|
@@ -2,24 +2,24 @@ import { Temporal } from "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { n as RouterError } from "./router-CrMLXoOr.mjs";
|
|
5
|
-
import { n as version, t as name } from "./deno-
|
|
6
|
-
import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-
|
|
7
|
-
import { u as verifyRequest } from "./http-
|
|
8
|
-
import { n as getAuthenticatedDocumentLoader } from "./docloader-
|
|
5
|
+
import { n as version, t as name } from "./deno-DCXndlEx.mjs";
|
|
6
|
+
import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-DYyRTxPH.mjs";
|
|
7
|
+
import { u as verifyRequest } from "./http-hi5IS6qw.mjs";
|
|
8
|
+
import { n as getAuthenticatedDocumentLoader } from "./docloader-7M06kit4.mjs";
|
|
9
9
|
import { n as kvCache } from "./kv-cache-BrjuJue8.mjs";
|
|
10
|
-
import { a as compactJsonLd, c as
|
|
11
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-
|
|
12
|
-
import { n as signObject, r as verifyObject } from "./proof-
|
|
13
|
-
import { d as MAX_BODY_SIZE, f as readBoundedText, t as getNodeInfo, u as BodyTooLargeError } from "./client-
|
|
14
|
-
import { t as nodeInfoToJson } from "./types-
|
|
15
|
-
import { n as actorsHaveSameOrigin, r as routeActivity } from "./inbox-
|
|
16
|
-
import { t as FederationBuilderImpl } from "./builder-
|
|
17
|
-
import { t as buildCollectionSynchronizationHeader } from "./collection-
|
|
18
|
-
import { t as KvKeyCache } from "./keycache-
|
|
19
|
-
import { t as acceptsJsonLd } from "./negotiation-
|
|
20
|
-
import { t as hasMalformedKnownTemporalLiteral } from "./temporal-
|
|
21
|
-
import { t as createExponentialBackoffPolicy } from "./retry-
|
|
22
|
-
import { i as sendActivity, n as extractInboxes, t as SendActivityError } from "./send-
|
|
10
|
+
import { a as compactJsonLd, c as detachSignature, d as hasVerifiableSignature, f as isClearlyMalformedContextReference, h as verifyCompactJsonLd, l as getNormalizationContextLoader, m as signJsonLd, p as isInvalidUrlTypeError, r as assertSafeJsonLd, s as describeSignatureShape, t as InvalidContextReferenceError, v as wrapContextLoaderForJsonLd } from "./ld-CKUnk1Ps.mjs";
|
|
11
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-CqHBbNXl.mjs";
|
|
12
|
+
import { n as signObject, r as verifyObject } from "./proof-CDalRU9r.mjs";
|
|
13
|
+
import { d as MAX_BODY_SIZE, f as readBoundedText, t as getNodeInfo, u as BodyTooLargeError } from "./client-DLAWT9ep.mjs";
|
|
14
|
+
import { t as nodeInfoToJson } from "./types-C37hquWI.mjs";
|
|
15
|
+
import { n as actorsHaveSameOrigin, r as routeActivity } from "./inbox-Bygi511A.mjs";
|
|
16
|
+
import { t as FederationBuilderImpl } from "./builder-CnyFdlUn.mjs";
|
|
17
|
+
import { t as buildCollectionSynchronizationHeader } from "./collection-ChgDTHLz.mjs";
|
|
18
|
+
import { t as KvKeyCache } from "./keycache-crDMn2HK.mjs";
|
|
19
|
+
import { t as acceptsJsonLd } from "./negotiation-BehA2uul.mjs";
|
|
20
|
+
import { t as hasMalformedKnownTemporalLiteral } from "./temporal-D3yEsvvS.mjs";
|
|
21
|
+
import { t as createExponentialBackoffPolicy } from "./retry-B_E3V_Dx.mjs";
|
|
22
|
+
import { i as sendActivity, n as extractInboxes, t as SendActivityError } from "./send-XHpoZpxW.mjs";
|
|
23
23
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
24
24
|
import { lookupWebFinger } from "@fedify/webfinger";
|
|
25
25
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
@@ -242,8 +242,8 @@ async function handleObject(request, { values, context, objectDispatcher, author
|
|
|
242
242
|
* @param parameters The parameters for handling the collection.
|
|
243
243
|
* @returns A promise that resolves to an HTTP response.
|
|
244
244
|
*/
|
|
245
|
-
async function handleCollection(request, { name: name$
|
|
246
|
-
const spanName = name$
|
|
245
|
+
async function handleCollection(request, { name: name$1, identifier, uriGetter, filter, filterPredicate, context, collectionCallbacks, tracerProvider, onUnauthorized, onNotFound }) {
|
|
246
|
+
const spanName = name$1.trim().replace(/\s+/g, "_");
|
|
247
247
|
tracerProvider = tracerProvider ?? trace.getTracerProvider();
|
|
248
248
|
const tracer = tracerProvider.getTracer(name, version);
|
|
249
249
|
const cursor = new URL(request.url).searchParams.get("cursor");
|
|
@@ -285,7 +285,7 @@ async function handleCollection(request, { name: name$2, identifier, uriGetter,
|
|
|
285
285
|
collection = new OrderedCollection({
|
|
286
286
|
id: baseUri,
|
|
287
287
|
totalItems: totalItems == null ? null : Number(totalItems),
|
|
288
|
-
items: filterCollectionItems(itemsOrResponse, name$
|
|
288
|
+
items: filterCollectionItems(itemsOrResponse, name$1, filterPredicate)
|
|
289
289
|
});
|
|
290
290
|
} else {
|
|
291
291
|
const lastCursor = await collectionCallbacks.lastCursor?.(context, identifier);
|
|
@@ -306,7 +306,7 @@ async function handleCollection(request, { name: name$2, identifier, uriGetter,
|
|
|
306
306
|
} else {
|
|
307
307
|
const uri = new URL(baseUri);
|
|
308
308
|
uri.searchParams.set("cursor", cursor);
|
|
309
|
-
const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$
|
|
309
|
+
const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$1}`, {
|
|
310
310
|
kind: SpanKind.SERVER,
|
|
311
311
|
attributes: {
|
|
312
312
|
"activitypub.collection.id": uri.href,
|
|
@@ -350,7 +350,7 @@ async function handleCollection(request, { name: name$2, identifier, uriGetter,
|
|
|
350
350
|
id: uri,
|
|
351
351
|
prev,
|
|
352
352
|
next,
|
|
353
|
-
items: filterCollectionItems(items, name$
|
|
353
|
+
items: filterCollectionItems(items, name$1, filterPredicate),
|
|
354
354
|
partOf
|
|
355
355
|
});
|
|
356
356
|
}
|
|
@@ -509,7 +509,11 @@ async function handleInboxInternal(request, parameters, span) {
|
|
|
509
509
|
}
|
|
510
510
|
const keyCache = new KvKeyCache(kv, kvPrefixes.publicKey, ctx);
|
|
511
511
|
const jsonWithoutSig = detachSignature(json);
|
|
512
|
-
const hasLdSignature =
|
|
512
|
+
const hasLdSignature = hasVerifiableSignature(json);
|
|
513
|
+
if (!hasLdSignature) {
|
|
514
|
+
const shape = describeSignatureShape(json);
|
|
515
|
+
if (shape != null) logger.debug("Linked Data Signature has an unsupported shape: {signatureKind}; properties: {signatureProperties}.", shape);
|
|
516
|
+
}
|
|
513
517
|
const canAttemptAlternateAuthAfterLdSignatureFailure = skipSignatureVerification || hasHttpSignatureHeaders(request) || hasObjectIntegrityProof(jsonWithoutSig);
|
|
514
518
|
let deferredLdSignatureError = void 0;
|
|
515
519
|
const respondInvalidActivity = async (error) => {
|
|
@@ -894,8 +898,8 @@ var CustomCollectionHandler = class {
|
|
|
894
898
|
* @param CollectionPage The CollectionPage constructor.
|
|
895
899
|
* @param filterPredicate Optional filter predicate for items.
|
|
896
900
|
*/
|
|
897
|
-
constructor(name$
|
|
898
|
-
this.name = name$
|
|
901
|
+
constructor(name$2, values, context, callbacks, tracerProvider = trace.getTracerProvider(), Collection, CollectionPage, filterPredicate) {
|
|
902
|
+
this.name = name$2;
|
|
899
903
|
this.values = values;
|
|
900
904
|
this.context = context;
|
|
901
905
|
this.callbacks = callbacks;
|
|
@@ -1905,7 +1909,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
1905
1909
|
let parseInput = void 0;
|
|
1906
1910
|
let parseContextLoader = context.contextLoader;
|
|
1907
1911
|
try {
|
|
1908
|
-
const hasSignatureField =
|
|
1912
|
+
const hasSignatureField = hasVerifiableSignature(message.activity);
|
|
1909
1913
|
const shouldParseFromNormalizedSignedPayload = message.ldSignatureVerified === true || message.normalizedActivity != null || message.ldSignatureVerified == null && hasSignatureField;
|
|
1910
1914
|
const parseContext = hasSignatureField ? {
|
|
1911
1915
|
...context,
|
|
@@ -3349,7 +3353,7 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
|
3349
3353
|
if (forwarder.length < 1) throw new Error("The forwarder's key pairs are empty.");
|
|
3350
3354
|
keys = forwarder;
|
|
3351
3355
|
} else keys = [forwarder];
|
|
3352
|
-
if (!
|
|
3356
|
+
if (!hasVerifiableSignature(this.activity)) {
|
|
3353
3357
|
let hasProof;
|
|
3354
3358
|
try {
|
|
3355
3359
|
hasProof = await (await Activity.fromJsonLd(this.activity, this)).getProof() != null;
|
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-BhaAN2KG.cjs");
|
|
8
|
+
const require_middleware = require("./middleware-C_4rWloR.cjs");
|
|
9
9
|
const require_types = require("./types-DOvyymM4.cjs");
|
|
10
|
-
const require_proof = require("./proof-
|
|
11
|
-
const require_kv_cache = require("./kv-cache
|
|
10
|
+
const require_proof = require("./proof-DLqGjdaL.cjs");
|
|
11
|
+
const require_kv_cache = require("./kv-cache-Bjnv9p9e.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 { c as importJwk, i as exportJwk, n as signRequest, o as fetchKey, r as verifyRequest, s 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 { c as importJwk, i as exportJwk, n as signRequest, o as fetchKey, r as verifyRequest, s as generateCryptoKeyPair } from "./http-hjoPA7jZ.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-D5uql06B.js";
|
|
8
8
|
import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-B1_pRFE_.js";
|
|
9
|
-
import {
|
|
10
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
9
|
+
import { a as doesActorOwnKey, b as verifyJsonLd, d as createSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, p as detachSignature, r as verifyObject, t as createProof, v as signJsonLd, x as verifySignature } from "./proof-D2RNLHHt.js";
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-YZ2bpa_P.js";
|
|
11
11
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation/mod.js";
|
|
12
12
|
import "./nodeinfo/mod.js";
|
|
13
13
|
import "./runtime/mod.js";
|
|
@@ -5,7 +5,7 @@ import { t as esm_default } from "../esm-DVILvP5e.mjs";
|
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-DflMZha5.mjs";
|
|
7
7
|
import { n as assertInstanceOf } from "../assert-BhQd8QHP.mjs";
|
|
8
|
-
import { a as parseOutboundService, c as parseSoftware, i as parseNodeInfo, l as parseUsage, n as getNodeInfoInternal, o as parseProtocol, r as parseInboundService, s as parseServices, t as getNodeInfo } from "../client-
|
|
8
|
+
import { a as parseOutboundService, c as parseSoftware, i as parseNodeInfo, l as parseUsage, n as getNodeInfoInternal, o as parseProtocol, r as parseInboundService, s as parseServices, t as getNodeInfo } from "../client-DLAWT9ep.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
import { UrlError } from "@fedify/vocab-runtime";
|
|
11
11
|
import { openDirectFetch, openPublicFetch } from "@fedify/vocab-runtime/internal";
|
|
@@ -4,8 +4,8 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { n as createRequestContext } from "../context-Juj6bdHC.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-DflMZha5.mjs";
|
|
7
|
-
import { t as MemoryKvStore } from "../kv-
|
|
8
|
-
import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-
|
|
7
|
+
import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
|
|
8
|
+
import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-yx080dbw.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
//#region src/nodeinfo/handler.test.ts
|
|
11
11
|
test("handleNodeInfo()", async () => {
|
|
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import "../std__assert-DflMZha5.mjs";
|
|
6
6
|
import { t as assertThrows } from "../assert_throws-D4DNWrux.mjs";
|
|
7
|
-
import { t as nodeInfoToJson } from "../types-
|
|
7
|
+
import { t as nodeInfoToJson } from "../types-C37hquWI.mjs";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
//#region src/nodeinfo/types.test.ts
|
|
10
10
|
test("nodeInfoToJson()", () => {
|
|
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
5
5
|
import "../std__assert-DflMZha5.mjs";
|
|
6
6
|
import { t as assert } from "../assert-BhQd8QHP.mjs";
|
|
7
|
-
import { t as MemoryKvStore } from "../kv-
|
|
7
|
+
import { t as MemoryKvStore } from "../kv-BrZHNugx.mjs";
|
|
8
8
|
import { test } from "@fedify/fixture";
|
|
9
9
|
import { SpanKind, SpanStatusCode, TraceFlags } from "@opentelemetry/api";
|
|
10
10
|
import { getLogger } from "@logtape/logtape";
|
|
@@ -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 fetchActorDocument, s as verifyKeyOwnership, t as exportJwk } from "./key-
|
|
4
|
+
import { n as version, t as name } from "./deno-DCXndlEx.mjs";
|
|
5
|
+
import { n as fetchActorDocument, s as verifyKeyOwnership, t as exportJwk } from "./key-DYyRTxPH.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,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 { o as validateCryptoKey, r as fetchKey } from "./key-
|
|
4
|
+
import { n as version, t as name } from "./deno-DCXndlEx.mjs";
|
|
5
|
+
import { o as validateCryptoKey, r as fetchKey } from "./key-DYyRTxPH.mjs";
|
|
6
6
|
import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
|
|
7
7
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { asCryptoKey } from "@fedify/vocab-runtime/internal";
|