@fedify/fedify 2.1.25 → 2.1.26
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-DsBAef6b.mjs → builder-9KbL1CoC.mjs} +11 -3
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{context-D4s0Wk3N.d.cts → context-BNwv9Q1v.d.cts} +1 -1
- package/dist/{context-BgU5UWTx.d.ts → context-DLLaDau8.d.ts} +1 -1
- package/dist/{deno-9AaebKOA.mjs → deno-ChmEXNOv.mjs} +1 -1
- package/dist/{docloader-DX96uPUj.mjs → docloader-DEVImb5e.mjs} +2 -2
- package/dist/federation/builder.test.mjs +37 -2
- package/dist/federation/handler.test.mjs +6 -6
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/inbox.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +121 -6
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.d.cts +3 -3
- package/dist/federation/mod.d.ts +3 -3
- package/dist/federation/mod.js +1 -1
- package/dist/federation/send.test.mjs +3 -3
- package/dist/federation/temporal.test.mjs +1 -1
- package/dist/federation/webfinger.test.mjs +1 -1
- package/dist/{http-BJEMpnnY.cjs → http-BOH-uFLj.cjs} +1 -1
- package/dist/{http-B5qAeoJd.mjs → http-B_M80hBW.mjs} +2 -2
- package/dist/{http-CdJ6n4rA.js → http-CeK9QmL_.js} +1 -1
- package/dist/{inbox-BSyjaFbo.mjs → inbox-B_O6TjZS.mjs} +1 -1
- package/dist/{key-x9f-H7eO.mjs → key-BJcK-1Av.mjs} +1 -1
- package/dist/{kv-D6hNiMTK.d.ts → kv-CZKl1IUS.d.cts} +3 -2
- package/dist/{kv-gJ8LYbxX.d.cts → kv-CxaI4eGo.d.ts} +3 -2
- package/dist/{kv-cache-BDp2c_QE.cjs → kv-cache-BlOG31SS.cjs} +1 -1
- package/dist/{kv-cache-Dx3QwNBI.js → kv-cache-CEJICY0R.js} +1 -1
- package/dist/{ld-cfUwoi0C.mjs → ld-YAXn6sG8.mjs} +2 -2
- package/dist/{middleware-CP35ElZv.js → middleware-C-45wr85.js} +20 -9
- package/dist/{middleware-DHHRwSZH.mjs → middleware-Co_QOX9H.mjs} +20 -17
- package/dist/{middleware-XXuSt_6b.cjs → middleware-DHGVHIUj.cjs} +21 -10
- package/dist/{middleware-DDT9ljTQ.mjs → middleware-DmTWC5VG.mjs} +1 -1
- package/dist/{middleware-BXJpAXhO.cjs → middleware-dGW2gSDG.cjs} +1 -1
- package/dist/{mod-Bx80LUTA.d.cts → mod-BmlfRBmU.d.cts} +1 -1
- package/dist/{mod-DcAiY74j.d.ts → mod-CWJNbyju.d.ts} +1 -1
- package/dist/{mod-DkE98l_7.d.cts → mod-Cn9GJ5ex.d.cts} +1 -1
- package/dist/{mod-DqkY4FDr.d.ts → mod-DNEgTI8M.d.ts} +1 -1
- package/dist/mod.cjs +4 -4
- package/dist/mod.d.cts +4 -4
- package/dist/mod.d.ts +4 -4
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/handler.test.mjs +1 -1
- package/dist/otel/mod.d.cts +1 -1
- package/dist/otel/mod.d.ts +1 -1
- package/dist/{owner-DklgvZXn.mjs → owner-B3ZkY-Ov.mjs} +2 -2
- package/dist/{proof-Dsa_ZC-M.js → proof-BeGIkK97.js} +1 -1
- package/dist/{proof-CI4rsVLu.mjs → proof-DIGrz49z.mjs} +2 -2
- package/dist/{proof-DzFzyfIc.cjs → proof-DzOl2GlQ.cjs} +1 -1
- package/dist/{send-DJmW6Z-I.mjs → send-N2w1IwXT.mjs} +2 -2
- package/dist/sig/http.test.mjs +2 -2
- package/dist/sig/key.test.mjs +1 -1
- package/dist/sig/ld.test.mjs +2 -2
- 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 +1 -1
- package/dist/{temporal-BanFifxu.mjs → temporal-CpT0u5Mx.mjs} +1 -1
- package/dist/utils/docloader.test.mjs +2 -2
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.d.cts +1 -1
- package/dist/utils/mod.d.ts +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +6 -6
|
@@ -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 { a as verifyRequestDetailed, d as importJwk, f as validateCryptoKey, i as verifyRequest, m as formatAcceptSignature, n as parseRfc9421SignatureInput, o as exportJwk, t as doubleKnock, v as name, y as version } from "./http-
|
|
5
|
+
import { a as verifyRequestDetailed, d as importJwk, f as validateCryptoKey, i as verifyRequest, m as formatAcceptSignature, n as parseRfc9421SignatureInput, o as exportJwk, t as doubleKnock, v as name, y as version } from "./http-CeK9QmL_.js";
|
|
6
6
|
import { a as MAX_BODY_SIZE, i as BodyTooLargeError, n as getNodeInfo, o as readBoundedText, t as nodeInfoToJson } from "./types-miAYfiGO.js";
|
|
7
|
-
import { _ as signJsonLd, a as doesActorOwnKey, c as assertSafeJsonLd, f as detachSignature, g as isInvalidUrlTypeError, h as isClearlyMalformedContextReference, m as hasSignature, n as signObject, o as getKeyOwner, p as getNormalizationContextLoader, r as verifyObject, s as InvalidContextReferenceError, u as compactJsonLd, v as verifyCompactJsonLd, x as wrapContextLoaderForJsonLd } from "./proof-
|
|
8
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
7
|
+
import { _ as signJsonLd, a as doesActorOwnKey, c as assertSafeJsonLd, f as detachSignature, g as isInvalidUrlTypeError, h as isClearlyMalformedContextReference, m as hasSignature, n as signObject, o as getKeyOwner, p as getNormalizationContextLoader, r as verifyObject, s as InvalidContextReferenceError, u as compactJsonLd, v as verifyCompactJsonLd, x as wrapContextLoaderForJsonLd } from "./proof-BeGIkK97.js";
|
|
8
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CEJICY0R.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";
|
|
@@ -327,6 +327,7 @@ var FederationBuilderImpl = class {
|
|
|
327
327
|
* Symbol registry for unique identification of unnamed symbols.
|
|
328
328
|
*/
|
|
329
329
|
#symbolRegistry = /* @__PURE__ */ new Map();
|
|
330
|
+
#collectionNames = /* @__PURE__ */ new Map();
|
|
330
331
|
constructor() {
|
|
331
332
|
this.router = new Router$1();
|
|
332
333
|
this.objectCallbacks = {};
|
|
@@ -348,6 +349,8 @@ var FederationBuilderImpl = class {
|
|
|
348
349
|
f.objectTypeIds = { ...this.objectTypeIds };
|
|
349
350
|
f.collectionCallbacks = { ...this.collectionCallbacks };
|
|
350
351
|
f.collectionTypeIds = { ...this.collectionTypeIds };
|
|
352
|
+
f.#symbolRegistry = new Map(this.#symbolRegistry);
|
|
353
|
+
f.#collectionNames = new Map(this.#collectionNames);
|
|
351
354
|
f.inboxPath = this.inboxPath;
|
|
352
355
|
f.inboxCallbacks = this.inboxCallbacks == null ? void 0 : { ...this.inboxCallbacks };
|
|
353
356
|
f.outboxCallbacks = this.outboxCallbacks == null ? void 0 : { ...this.outboxCallbacks };
|
|
@@ -760,6 +763,7 @@ var FederationBuilderImpl = class {
|
|
|
760
763
|
if (this.router.has(routeName)) throw new RouterError(`Collection dispatcher for ${strName} already set.`);
|
|
761
764
|
if (this.collectionCallbacks[name] != null) throw new RouterError(`Collection dispatcher for ${strName} already set.`);
|
|
762
765
|
if (this.router.add(path, routeName).size < 1) throw new RouterError("Path for collection dispatcher must have at least one variable.");
|
|
766
|
+
this.#collectionNames.set(routeName, name);
|
|
763
767
|
const callbacks = { dispatcher };
|
|
764
768
|
this.collectionCallbacks[name] = callbacks;
|
|
765
769
|
this.collectionTypeIds[name] = itemType;
|
|
@@ -796,6 +800,10 @@ var FederationBuilderImpl = class {
|
|
|
796
800
|
const routeName = this.#uniqueCollectionId(name);
|
|
797
801
|
return this.router.build(`collection:${routeName}`, values) ?? this.router.build(`orderedCollection:${routeName}`, values);
|
|
798
802
|
}
|
|
803
|
+
/** Resolves a custom collection route to its original name. */
|
|
804
|
+
getCollectionName(routeName) {
|
|
805
|
+
return this.#collectionNames.get(routeName) ?? routeName.replace(/^(collection|orderedCollection):/, "");
|
|
806
|
+
}
|
|
799
807
|
setOutboxPermanentFailureHandler(handler) {
|
|
800
808
|
this.outboxPermanentFailureHandler = handler;
|
|
801
809
|
}
|
|
@@ -3812,10 +3820,10 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
3812
3820
|
onNotFound
|
|
3813
3821
|
});
|
|
3814
3822
|
case "collection": {
|
|
3815
|
-
const name = route.name
|
|
3823
|
+
const name = this.getCollectionName(route.name);
|
|
3816
3824
|
const callbacks = this.collectionCallbacks[name];
|
|
3817
3825
|
return await handleCustomCollection(request, {
|
|
3818
|
-
name,
|
|
3826
|
+
name: String(name),
|
|
3819
3827
|
context,
|
|
3820
3828
|
values: route.values,
|
|
3821
3829
|
collectionCallbacks: callbacks,
|
|
@@ -3825,10 +3833,10 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
3825
3833
|
});
|
|
3826
3834
|
}
|
|
3827
3835
|
case "orderedCollection": {
|
|
3828
|
-
const name = route.name
|
|
3836
|
+
const name = this.getCollectionName(route.name);
|
|
3829
3837
|
const callbacks = this.collectionCallbacks[name];
|
|
3830
3838
|
return await handleOrderedCollection(request, {
|
|
3831
|
-
name,
|
|
3839
|
+
name: String(name),
|
|
3832
3840
|
context,
|
|
3833
3841
|
values: route.values,
|
|
3834
3842
|
collectionCallbacks: callbacks,
|
|
@@ -4011,8 +4019,10 @@ var ContextImpl = class ContextImpl {
|
|
|
4011
4019
|
const collectionRegex = new RegExp(`^(${["collection", "orderedCollection"].join("|")}):(.*)$`);
|
|
4012
4020
|
const match = route.name.match(collectionRegex);
|
|
4013
4021
|
if (match !== null) {
|
|
4014
|
-
const [, type
|
|
4022
|
+
const [, type] = match;
|
|
4023
|
+
const name = this.federation.getCollectionName(route.name);
|
|
4015
4024
|
const cls = this.federation.collectionTypeIds[name];
|
|
4025
|
+
if (cls == null) return null;
|
|
4016
4026
|
return {
|
|
4017
4027
|
type,
|
|
4018
4028
|
name,
|
|
@@ -4359,7 +4369,7 @@ var ContextImpl = class ContextImpl {
|
|
|
4359
4369
|
"inbox"
|
|
4360
4370
|
]);
|
|
4361
4371
|
const contextLoader = options.contextLoader ?? this.contextLoader;
|
|
4362
|
-
|
|
4372
|
+
let json = await activity.toJsonLd({ contextLoader });
|
|
4363
4373
|
const keyCache = new KvKeyCache(this.federation.kv, this.federation.kvPrefixes.publicKey, this);
|
|
4364
4374
|
if (await verifyObject(Activity, json, {
|
|
4365
4375
|
contextLoader,
|
|
@@ -4415,6 +4425,7 @@ var ContextImpl = class ContextImpl {
|
|
|
4415
4425
|
}
|
|
4416
4426
|
logger.debug("Successfully fetched the remote activity object {activityId}; ignore the original activity and use the fetched one, which is trustworthy.");
|
|
4417
4427
|
activity = fetched;
|
|
4428
|
+
json = await fetched.toJsonLd({ contextLoader });
|
|
4418
4429
|
} else logger.debug("Object Integrity Proofs are verified.", {
|
|
4419
4430
|
recipient,
|
|
4420
4431
|
activity: json
|
|
@@ -2,25 +2,25 @@ 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-
|
|
5
|
+
import { n as version, t as name } from "./deno-ChmEXNOv.mjs";
|
|
6
6
|
import { t as formatAcceptSignature } from "./accept-BavzedPB.mjs";
|
|
7
|
-
import { o as importJwk, s as validateCryptoKey, t as exportJwk } from "./key-
|
|
8
|
-
import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-
|
|
9
|
-
import { t as getAuthenticatedDocumentLoader } from "./docloader-
|
|
7
|
+
import { o as importJwk, s as validateCryptoKey, t as exportJwk } from "./key-BJcK-1Av.mjs";
|
|
8
|
+
import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-B_M80hBW.mjs";
|
|
9
|
+
import { t as getAuthenticatedDocumentLoader } from "./docloader-DEVImb5e.mjs";
|
|
10
10
|
import { n as kvCache } from "./kv-cache-DqEKe5E0.mjs";
|
|
11
|
-
import { a as compactJsonLd, c as getNormalizationContextLoader, d as isInvalidUrlTypeError, f as signJsonLd, g as wrapContextLoaderForJsonLd, l as hasSignature, p as verifyCompactJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as isClearlyMalformedContextReference } from "./ld-
|
|
12
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-
|
|
13
|
-
import { n as signObject, r as verifyObject } from "./proof-
|
|
11
|
+
import { a as compactJsonLd, c as getNormalizationContextLoader, d as isInvalidUrlTypeError, f as signJsonLd, g as wrapContextLoaderForJsonLd, l as hasSignature, p as verifyCompactJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as isClearlyMalformedContextReference } from "./ld-YAXn6sG8.mjs";
|
|
12
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-B3ZkY-Ov.mjs";
|
|
13
|
+
import { n as signObject, r as verifyObject } from "./proof-DIGrz49z.mjs";
|
|
14
14
|
import { d as readBoundedText, l as BodyTooLargeError, t as getNodeInfo, u as MAX_BODY_SIZE } from "./client-DM72NZuk.mjs";
|
|
15
15
|
import { t as nodeInfoToJson } from "./types-C37hquWI.mjs";
|
|
16
|
-
import { n as routeActivity } from "./inbox-
|
|
17
|
-
import { t as FederationBuilderImpl } from "./builder-
|
|
16
|
+
import { n as routeActivity } from "./inbox-B_O6TjZS.mjs";
|
|
17
|
+
import { t as FederationBuilderImpl } from "./builder-9KbL1CoC.mjs";
|
|
18
18
|
import { t as buildCollectionSynchronizationHeader } from "./collection-ChgDTHLz.mjs";
|
|
19
19
|
import { t as KvKeyCache } from "./keycache-CaO7wyQA.mjs";
|
|
20
20
|
import { t as acceptsJsonLd } from "./negotiation-BehA2uul.mjs";
|
|
21
|
-
import { t as hasMalformedKnownTemporalLiteral } from "./temporal-
|
|
21
|
+
import { t as hasMalformedKnownTemporalLiteral } from "./temporal-CpT0u5Mx.mjs";
|
|
22
22
|
import { t as createExponentialBackoffPolicy } from "./retry-B_E3V_Dx.mjs";
|
|
23
|
-
import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-
|
|
23
|
+
import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-N2w1IwXT.mjs";
|
|
24
24
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
25
25
|
import { lookupWebFinger } from "@fedify/webfinger";
|
|
26
26
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
@@ -2531,10 +2531,10 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2531
2531
|
onNotFound
|
|
2532
2532
|
});
|
|
2533
2533
|
case "collection": {
|
|
2534
|
-
const name = route.name
|
|
2534
|
+
const name = this.getCollectionName(route.name);
|
|
2535
2535
|
const callbacks = this.collectionCallbacks[name];
|
|
2536
2536
|
return await handleCustomCollection(request, {
|
|
2537
|
-
name,
|
|
2537
|
+
name: String(name),
|
|
2538
2538
|
context,
|
|
2539
2539
|
values: route.values,
|
|
2540
2540
|
collectionCallbacks: callbacks,
|
|
@@ -2544,10 +2544,10 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
2544
2544
|
});
|
|
2545
2545
|
}
|
|
2546
2546
|
case "orderedCollection": {
|
|
2547
|
-
const name = route.name
|
|
2547
|
+
const name = this.getCollectionName(route.name);
|
|
2548
2548
|
const callbacks = this.collectionCallbacks[name];
|
|
2549
2549
|
return await handleOrderedCollection(request, {
|
|
2550
|
-
name,
|
|
2550
|
+
name: String(name),
|
|
2551
2551
|
context,
|
|
2552
2552
|
values: route.values,
|
|
2553
2553
|
collectionCallbacks: callbacks,
|
|
@@ -2730,8 +2730,10 @@ var ContextImpl = class ContextImpl {
|
|
|
2730
2730
|
const collectionRegex = new RegExp(`^(${["collection", "orderedCollection"].join("|")}):(.*)$`);
|
|
2731
2731
|
const match = route.name.match(collectionRegex);
|
|
2732
2732
|
if (match !== null) {
|
|
2733
|
-
const [, type
|
|
2733
|
+
const [, type] = match;
|
|
2734
|
+
const name = this.federation.getCollectionName(route.name);
|
|
2734
2735
|
const cls = this.federation.collectionTypeIds[name];
|
|
2736
|
+
if (cls == null) return null;
|
|
2735
2737
|
return {
|
|
2736
2738
|
type,
|
|
2737
2739
|
name,
|
|
@@ -3078,7 +3080,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3078
3080
|
"inbox"
|
|
3079
3081
|
]);
|
|
3080
3082
|
const contextLoader = options.contextLoader ?? this.contextLoader;
|
|
3081
|
-
|
|
3083
|
+
let json = await activity.toJsonLd({ contextLoader });
|
|
3082
3084
|
const keyCache = new KvKeyCache(this.federation.kv, this.federation.kvPrefixes.publicKey, this);
|
|
3083
3085
|
if (await verifyObject(Activity, json, {
|
|
3084
3086
|
contextLoader,
|
|
@@ -3134,6 +3136,7 @@ var ContextImpl = class ContextImpl {
|
|
|
3134
3136
|
}
|
|
3135
3137
|
logger.debug("Successfully fetched the remote activity object {activityId}; ignore the original activity and use the fetched one, which is trustworthy.");
|
|
3136
3138
|
activity = fetched;
|
|
3139
|
+
json = await fetched.toJsonLd({ contextLoader });
|
|
3137
3140
|
} else logger.debug("Object Integrity Proofs are verified.", {
|
|
3138
3141
|
recipient,
|
|
3139
3142
|
activity: json
|
|
@@ -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-BOH-uFLj.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-DzOl2GlQ.cjs");
|
|
8
|
+
const require_kv_cache = require("./kv-cache-BlOG31SS.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");
|
|
@@ -328,6 +328,7 @@ var FederationBuilderImpl = class {
|
|
|
328
328
|
* Symbol registry for unique identification of unnamed symbols.
|
|
329
329
|
*/
|
|
330
330
|
#symbolRegistry = /* @__PURE__ */ new Map();
|
|
331
|
+
#collectionNames = /* @__PURE__ */ new Map();
|
|
331
332
|
constructor() {
|
|
332
333
|
this.router = new Router();
|
|
333
334
|
this.objectCallbacks = {};
|
|
@@ -336,7 +337,7 @@ var FederationBuilderImpl = class {
|
|
|
336
337
|
this.collectionTypeIds = {};
|
|
337
338
|
}
|
|
338
339
|
async build(options) {
|
|
339
|
-
const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-
|
|
340
|
+
const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-dGW2gSDG.cjs"));
|
|
340
341
|
const f = new FederationImpl(options);
|
|
341
342
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
342
343
|
f.router = this.router.clone();
|
|
@@ -349,6 +350,8 @@ var FederationBuilderImpl = class {
|
|
|
349
350
|
f.objectTypeIds = { ...this.objectTypeIds };
|
|
350
351
|
f.collectionCallbacks = { ...this.collectionCallbacks };
|
|
351
352
|
f.collectionTypeIds = { ...this.collectionTypeIds };
|
|
353
|
+
f.#symbolRegistry = new Map(this.#symbolRegistry);
|
|
354
|
+
f.#collectionNames = new Map(this.#collectionNames);
|
|
352
355
|
f.inboxPath = this.inboxPath;
|
|
353
356
|
f.inboxCallbacks = this.inboxCallbacks == null ? void 0 : { ...this.inboxCallbacks };
|
|
354
357
|
f.outboxCallbacks = this.outboxCallbacks == null ? void 0 : { ...this.outboxCallbacks };
|
|
@@ -761,6 +764,7 @@ var FederationBuilderImpl = class {
|
|
|
761
764
|
if (this.router.has(routeName)) throw new RouterError(`Collection dispatcher for ${strName} already set.`);
|
|
762
765
|
if (this.collectionCallbacks[name] != null) throw new RouterError(`Collection dispatcher for ${strName} already set.`);
|
|
763
766
|
if (this.router.add(path, routeName).size < 1) throw new RouterError("Path for collection dispatcher must have at least one variable.");
|
|
767
|
+
this.#collectionNames.set(routeName, name);
|
|
764
768
|
const callbacks = { dispatcher };
|
|
765
769
|
this.collectionCallbacks[name] = callbacks;
|
|
766
770
|
this.collectionTypeIds[name] = itemType;
|
|
@@ -797,6 +801,10 @@ var FederationBuilderImpl = class {
|
|
|
797
801
|
const routeName = this.#uniqueCollectionId(name);
|
|
798
802
|
return this.router.build(`collection:${routeName}`, values) ?? this.router.build(`orderedCollection:${routeName}`, values);
|
|
799
803
|
}
|
|
804
|
+
/** Resolves a custom collection route to its original name. */
|
|
805
|
+
getCollectionName(routeName) {
|
|
806
|
+
return this.#collectionNames.get(routeName) ?? routeName.replace(/^(collection|orderedCollection):/, "");
|
|
807
|
+
}
|
|
800
808
|
setOutboxPermanentFailureHandler(handler) {
|
|
801
809
|
this.outboxPermanentFailureHandler = handler;
|
|
802
810
|
}
|
|
@@ -3806,10 +3814,10 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
3806
3814
|
onNotFound
|
|
3807
3815
|
});
|
|
3808
3816
|
case "collection": {
|
|
3809
|
-
const name = route.name
|
|
3817
|
+
const name = this.getCollectionName(route.name);
|
|
3810
3818
|
const callbacks = this.collectionCallbacks[name];
|
|
3811
3819
|
return await handleCustomCollection(request, {
|
|
3812
|
-
name,
|
|
3820
|
+
name: String(name),
|
|
3813
3821
|
context,
|
|
3814
3822
|
values: route.values,
|
|
3815
3823
|
collectionCallbacks: callbacks,
|
|
@@ -3819,10 +3827,10 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
3819
3827
|
});
|
|
3820
3828
|
}
|
|
3821
3829
|
case "orderedCollection": {
|
|
3822
|
-
const name = route.name
|
|
3830
|
+
const name = this.getCollectionName(route.name);
|
|
3823
3831
|
const callbacks = this.collectionCallbacks[name];
|
|
3824
3832
|
return await handleOrderedCollection(request, {
|
|
3825
|
-
name,
|
|
3833
|
+
name: String(name),
|
|
3826
3834
|
context,
|
|
3827
3835
|
values: route.values,
|
|
3828
3836
|
collectionCallbacks: callbacks,
|
|
@@ -4005,8 +4013,10 @@ var ContextImpl = class ContextImpl {
|
|
|
4005
4013
|
const collectionRegex = new RegExp(`^(${["collection", "orderedCollection"].join("|")}):(.*)$`);
|
|
4006
4014
|
const match = route.name.match(collectionRegex);
|
|
4007
4015
|
if (match !== null) {
|
|
4008
|
-
const [, type
|
|
4016
|
+
const [, type] = match;
|
|
4017
|
+
const name = this.federation.getCollectionName(route.name);
|
|
4009
4018
|
const cls = this.federation.collectionTypeIds[name];
|
|
4019
|
+
if (cls == null) return null;
|
|
4010
4020
|
return {
|
|
4011
4021
|
type,
|
|
4012
4022
|
name,
|
|
@@ -4353,7 +4363,7 @@ var ContextImpl = class ContextImpl {
|
|
|
4353
4363
|
"inbox"
|
|
4354
4364
|
]);
|
|
4355
4365
|
const contextLoader = options.contextLoader ?? this.contextLoader;
|
|
4356
|
-
|
|
4366
|
+
let json = await activity.toJsonLd({ contextLoader });
|
|
4357
4367
|
const keyCache = new KvKeyCache(this.federation.kv, this.federation.kvPrefixes.publicKey, this);
|
|
4358
4368
|
if (await require_proof.verifyObject(_fedify_vocab.Activity, json, {
|
|
4359
4369
|
contextLoader,
|
|
@@ -4409,6 +4419,7 @@ var ContextImpl = class ContextImpl {
|
|
|
4409
4419
|
}
|
|
4410
4420
|
logger.debug("Successfully fetched the remote activity object {activityId}; ignore the original activity and use the fetched one, which is trustworthy.");
|
|
4411
4421
|
activity = fetched;
|
|
4422
|
+
json = await fetched.toJsonLd({ contextLoader });
|
|
4412
4423
|
} else logger.debug("Object Integrity Proofs are verified.", {
|
|
4413
4424
|
recipient,
|
|
4414
4425
|
activity: 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-DHGVHIUj.cjs");
|
|
4
4
|
exports.FederationImpl = require_middleware.FederationImpl;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { Q as ActorHandleMapper, X as ActorAliasMapper, Z as ActorDispatcher, _t as WebFingerLinksDispatcher, s as RequestContext } from "./context-
|
|
2
|
+
import { Q as ActorHandleMapper, X as ActorAliasMapper, Z as ActorDispatcher, _t as WebFingerLinksDispatcher, s as RequestContext } from "./context-BNwv9Q1v.cjs";
|
|
3
3
|
import { Span, Tracer } from "@opentelemetry/api";
|
|
4
4
|
|
|
5
5
|
//#region src/federation/webfinger.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { Q as ActorHandleMapper, X as ActorAliasMapper, Z as ActorDispatcher, _t as WebFingerLinksDispatcher, s as RequestContext } from "./context-
|
|
2
|
+
import { Q as ActorHandleMapper, X as ActorAliasMapper, Z as ActorDispatcher, _t as WebFingerLinksDispatcher, s as RequestContext } from "./context-DLLaDau8.js";
|
|
3
3
|
import { Span, Tracer } from "@opentelemetry/api";
|
|
4
4
|
|
|
5
5
|
//#region src/federation/webfinger.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { n as HttpMessageSignaturesSpecDeterminer } from "./http-DqZhyEso.cjs";
|
|
3
|
-
import { n as KvStore, t as KvKey } from "./kv-
|
|
3
|
+
import { n as KvStore, t as KvKey } from "./kv-CZKl1IUS.cjs";
|
|
4
4
|
import { DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
|
|
5
5
|
import { TracerProvider } from "@opentelemetry/api";
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
2
|
import { n as HttpMessageSignaturesSpecDeterminer } from "./http-Dl00HXr4.js";
|
|
3
|
-
import { n as KvStore, t as KvKey } from "./kv-
|
|
3
|
+
import { n as KvStore, t as KvKey } from "./kv-CxaI4eGo.js";
|
|
4
4
|
import { TracerProvider } from "@opentelemetry/api";
|
|
5
5
|
import { DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
|
|
6
6
|
|
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-BOH-uFLj.cjs");
|
|
8
|
+
const require_middleware = require("./middleware-DHGVHIUj.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-DzOl2GlQ.cjs");
|
|
11
|
+
const require_kv_cache = require("./kv-cache-BlOG31SS.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.d.cts
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-CAM_bQXx.cjs";
|
|
3
3
|
import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-DqZhyEso.cjs";
|
|
4
4
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-B3hNQCG8.cjs";
|
|
5
|
-
import { $ as ActorKeyPairsDispatcher, A as createFederation, B as RouterRouteResult, C as InboxChallengePolicy, Ct as ActivityTransformer, D as FederationKvPrefixes, E as Rfc6570Expression, F as Message, G as InProcessMessageQueueOptions, H as respondWithObject, I as createFederationBuilder, J as MessageQueueListenOptions, K as MessageQueue, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as ActorHandleMapper, R as RouterError, S as IdempotencyStrategy, St as digest, T as ObjectCallbackSetters, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as InProcessMessageQueue, X as ActorAliasMapper, Y as ParallelMessageQueue, Z as ActorDispatcher, _ as FederationBuilder, _t as WebFingerLinksDispatcher, a as InboxContext, at as CustomCollectionCursor, b as FederationStartQueueOptions, bt as PageItems, c as RouteActivityOptions, ct as InboxListener, d as ActorCallbackSetters, dt as ObjectDispatcher, et as AuthorizePredicate, f as CollectionCallbackSetters, ft as OutboxErrorHandler, g as Federation, gt as UnverifiedActivityReason, h as Federatable, ht as UnverifiedActivityHandler, i as GetSignedKeyOptions, it as CustomCollectionCounter, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as NodeInfoDispatcher, m as CustomCollectionCallbackSetters, mt as SharedInboxKeyDispatcher, n as Context, nt as CollectionCursor, o as ParseUriResult, ot as CustomCollectionDispatcher, p as ConstructorWithTypeId, pt as OutboxPermanentFailureHandler, q as MessageQueueEnqueueOptions, r as ForwardActivityOptions, rt as CollectionDispatcher, s as RequestContext, st as InboxErrorHandler, t as ActorKeyPair, tt as CollectionCounter, u as SendActivityOptionsForCollection, ut as ObjectAuthorizePredicate, v as FederationFetchOptions, vt as SendActivityError, w as InboxListenerSetters, x as IdempotencyKeyCallback, xt as buildCollectionSynchronizationHeader, y as FederationOptions, yt as SenderKeyPair, z as RouterOptions } from "./context-
|
|
6
|
-
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-
|
|
5
|
+
import { $ as ActorKeyPairsDispatcher, A as createFederation, B as RouterRouteResult, C as InboxChallengePolicy, Ct as ActivityTransformer, D as FederationKvPrefixes, E as Rfc6570Expression, F as Message, G as InProcessMessageQueueOptions, H as respondWithObject, I as createFederationBuilder, J as MessageQueueListenOptions, K as MessageQueue, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as ActorHandleMapper, R as RouterError, S as IdempotencyStrategy, St as digest, T as ObjectCallbackSetters, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as InProcessMessageQueue, X as ActorAliasMapper, Y as ParallelMessageQueue, Z as ActorDispatcher, _ as FederationBuilder, _t as WebFingerLinksDispatcher, a as InboxContext, at as CustomCollectionCursor, b as FederationStartQueueOptions, bt as PageItems, c as RouteActivityOptions, ct as InboxListener, d as ActorCallbackSetters, dt as ObjectDispatcher, et as AuthorizePredicate, f as CollectionCallbackSetters, ft as OutboxErrorHandler, g as Federation, gt as UnverifiedActivityReason, h as Federatable, ht as UnverifiedActivityHandler, i as GetSignedKeyOptions, it as CustomCollectionCounter, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as NodeInfoDispatcher, m as CustomCollectionCallbackSetters, mt as SharedInboxKeyDispatcher, n as Context, nt as CollectionCursor, o as ParseUriResult, ot as CustomCollectionDispatcher, p as ConstructorWithTypeId, pt as OutboxPermanentFailureHandler, q as MessageQueueEnqueueOptions, r as ForwardActivityOptions, rt as CollectionDispatcher, s as RequestContext, st as InboxErrorHandler, t as ActorKeyPair, tt as CollectionCounter, u as SendActivityOptionsForCollection, ut as ObjectAuthorizePredicate, v as FederationFetchOptions, vt as SendActivityError, w as InboxListenerSetters, x as IdempotencyKeyCallback, xt as buildCollectionSynchronizationHeader, y as FederationOptions, yt as SenderKeyPair, z as RouterOptions } from "./context-BNwv9Q1v.cjs";
|
|
6
|
+
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-CZKl1IUS.cjs";
|
|
7
7
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.cjs";
|
|
8
|
-
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-
|
|
8
|
+
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-BmlfRBmU.cjs";
|
|
9
9
|
import { _ as verifyJsonLd, a as createProof, c as verifyProof, d as VerifyJsonLdOptions, f as VerifySignatureOptions, g as signJsonLd, h as detachSignature, i as VerifyProofOptions, l as CreateSignatureOptions, m as createSignature, n as SignObjectOptions, o as signObject, p as attachSignature, r as VerifyObjectOptions, s as verifyObject, t as CreateProofOptions, u as SignJsonLdOptions, v as verifySignature } from "./mod-DiuFTYUt.cjs";
|
|
10
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-Cn9GJ5ex.cjs";
|
|
11
11
|
export * from "@fedify/vocab-runtime";
|
|
12
12
|
|
|
13
13
|
//#region src/mod.d.ts
|
package/dist/mod.d.ts
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { a as InboundService, c as OutboundService, d as Software, f as Usage, i as parseNodeInfo, l as Protocol, n as ParseNodeInfoOptions, o as JsonValue, p as nodeInfoToJson, r as getNodeInfo, s as NodeInfo, t as GetNodeInfoOptions, u as Services } from "./client-CSddvgWN.js";
|
|
3
3
|
import { C as exportJwk, D as importJwk, E as generateCryptoKeyPair, S as KeyCache, T as fetchKeyDetailed, _ as validateAcceptSignature, a as VerifyRequestDetailedResult, b as FetchKeyOptions, c as signRequest, d as AcceptSignatureMember, f as AcceptSignatureParameters, g as parseAcceptSignature, h as fulfillAcceptSignature, i as SignRequestOptions, l as verifyRequest, m as formatAcceptSignature, n as HttpMessageSignaturesSpecDeterminer, o as VerifyRequestFailureReason, p as FulfillAcceptSignatureResult, r as Rfc9421SignRequestOptions, s as VerifyRequestOptions, t as HttpMessageSignaturesSpec, u as verifyRequestDetailed, v as FetchKeyDetailedResult, w as fetchKey, x as FetchKeyResult, y as FetchKeyErrorResult } from "./http-Dl00HXr4.js";
|
|
4
4
|
import { i as getKeyOwner, n as GetKeyOwnerOptions, r as doesActorOwnKey, t as DoesActorOwnKeyOptions } from "./owner-CiBPcC6F.js";
|
|
5
|
-
import { $ as ActorKeyPairsDispatcher, A as createFederation, B as RouterRouteResult, C as InboxChallengePolicy, Ct as ActivityTransformer, D as FederationKvPrefixes, E as Rfc6570Expression, F as Message, G as InProcessMessageQueueOptions, H as respondWithObject, I as createFederationBuilder, J as MessageQueueListenOptions, K as MessageQueue, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as ActorHandleMapper, R as RouterError, S as IdempotencyStrategy, St as digest, T as ObjectCallbackSetters, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as InProcessMessageQueue, X as ActorAliasMapper, Y as ParallelMessageQueue, Z as ActorDispatcher, _ as FederationBuilder, _t as WebFingerLinksDispatcher, a as InboxContext, at as CustomCollectionCursor, b as FederationStartQueueOptions, bt as PageItems, c as RouteActivityOptions, ct as InboxListener, d as ActorCallbackSetters, dt as ObjectDispatcher, et as AuthorizePredicate, f as CollectionCallbackSetters, ft as OutboxErrorHandler, g as Federation, gt as UnverifiedActivityReason, h as Federatable, ht as UnverifiedActivityHandler, i as GetSignedKeyOptions, it as CustomCollectionCounter, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as NodeInfoDispatcher, m as CustomCollectionCallbackSetters, mt as SharedInboxKeyDispatcher, n as Context, nt as CollectionCursor, o as ParseUriResult, ot as CustomCollectionDispatcher, p as ConstructorWithTypeId, pt as OutboxPermanentFailureHandler, q as MessageQueueEnqueueOptions, r as ForwardActivityOptions, rt as CollectionDispatcher, s as RequestContext, st as InboxErrorHandler, t as ActorKeyPair, tt as CollectionCounter, u as SendActivityOptionsForCollection, ut as ObjectAuthorizePredicate, v as FederationFetchOptions, vt as SendActivityError, w as InboxListenerSetters, x as IdempotencyKeyCallback, xt as buildCollectionSynchronizationHeader, y as FederationOptions, yt as SenderKeyPair, z as RouterOptions } from "./context-
|
|
6
|
-
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-
|
|
5
|
+
import { $ as ActorKeyPairsDispatcher, A as createFederation, B as RouterRouteResult, C as InboxChallengePolicy, Ct as ActivityTransformer, D as FederationKvPrefixes, E as Rfc6570Expression, F as Message, G as InProcessMessageQueueOptions, H as respondWithObject, I as createFederationBuilder, J as MessageQueueListenOptions, K as MessageQueue, L as Router, M as RetryContext, N as RetryPolicy, O as FederationOrigin, P as createExponentialBackoffPolicy, Q as ActorHandleMapper, R as RouterError, S as IdempotencyStrategy, St as digest, T as ObjectCallbackSetters, U as respondWithObjectIfAcceptable, V as RespondWithObjectOptions, W as InProcessMessageQueue, X as ActorAliasMapper, Y as ParallelMessageQueue, Z as ActorDispatcher, _ as FederationBuilder, _t as WebFingerLinksDispatcher, a as InboxContext, at as CustomCollectionCursor, b as FederationStartQueueOptions, bt as PageItems, c as RouteActivityOptions, ct as InboxListener, d as ActorCallbackSetters, dt as ObjectDispatcher, et as AuthorizePredicate, f as CollectionCallbackSetters, ft as OutboxErrorHandler, g as Federation, gt as UnverifiedActivityReason, h as Federatable, ht as UnverifiedActivityHandler, i as GetSignedKeyOptions, it as CustomCollectionCounter, j as CreateExponentialBackoffPolicyOptions, k as FederationQueueOptions, l as SendActivityOptions, lt as NodeInfoDispatcher, m as CustomCollectionCallbackSetters, mt as SharedInboxKeyDispatcher, n as Context, nt as CollectionCursor, o as ParseUriResult, ot as CustomCollectionDispatcher, p as ConstructorWithTypeId, pt as OutboxPermanentFailureHandler, q as MessageQueueEnqueueOptions, r as ForwardActivityOptions, rt as CollectionDispatcher, s as RequestContext, st as InboxErrorHandler, t as ActorKeyPair, tt as CollectionCounter, u as SendActivityOptionsForCollection, ut as ObjectAuthorizePredicate, v as FederationFetchOptions, vt as SendActivityError, w as InboxListenerSetters, x as IdempotencyKeyCallback, xt as buildCollectionSynchronizationHeader, y as FederationOptions, yt as SenderKeyPair, z as RouterOptions } from "./context-DLLaDau8.js";
|
|
6
|
+
import { a as MemoryKvStore, i as KvStoreSetOptions, n as KvStore, r as KvStoreListEntry, t as KvKey } from "./kv-CxaI4eGo.js";
|
|
7
7
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./compat/mod.js";
|
|
8
|
-
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-
|
|
8
|
+
import { n as handleWebFinger, t as WebFingerHandlerParameters } from "./mod-CWJNbyju.js";
|
|
9
9
|
import { _ as verifyJsonLd, a as createProof, c as verifyProof, d as VerifyJsonLdOptions, f as VerifySignatureOptions, g as signJsonLd, h as detachSignature, i as VerifyProofOptions, l as CreateSignatureOptions, m as createSignature, n as SignObjectOptions, o as signObject, p as attachSignature, r as VerifyObjectOptions, s as verifyObject, t as CreateProofOptions, u as SignJsonLdOptions, v as verifySignature } from "./mod-BLDHhuW0.js";
|
|
10
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./mod-DNEgTI8M.js";
|
|
11
11
|
export * from "@fedify/vocab-runtime";
|
|
12
12
|
|
|
13
13
|
//#region src/mod.d.ts
|
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-CeK9QmL_.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-C-45wr85.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-BeGIkK97.js";
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-CEJICY0R.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 { n as createRequestContext } from "../context-Juj6bdHC.mjs";
|
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-BUOJXi-Z.mjs";
|
|
7
7
|
import { t as MemoryKvStore } from "../kv-BrZHNugx.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-Co_QOX9H.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
//#region src/nodeinfo/handler.test.ts
|
|
11
11
|
test("handleNodeInfo()", async () => {
|
package/dist/otel/mod.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { n as KvStore, t as KvKey } from "../kv-
|
|
2
|
+
import { n as KvStore, t as KvKey } from "../kv-CZKl1IUS.cjs";
|
|
3
3
|
import { ReadableSpan, SpanExporter } from "@opentelemetry/sdk-trace-base";
|
|
4
4
|
import { ExportResultCode } from "@opentelemetry/core";
|
|
5
5
|
|
package/dist/otel/mod.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { n as KvStore, t as KvKey } from "../kv-
|
|
2
|
+
import { n as KvStore, t as KvKey } from "../kv-CxaI4eGo.js";
|
|
3
3
|
import { ExportResultCode } from "@opentelemetry/core";
|
|
4
4
|
import { ReadableSpan, SpanExporter } from "@opentelemetry/sdk-trace-base";
|
|
5
5
|
|
|
@@ -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-ChmEXNOv.mjs";
|
|
5
|
+
import { c as verifyKeyOwnership, n as fetchActorDocument, t as exportJwk } from "./key-BJcK-1Av.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,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-CeK9QmL_.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 { 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-ChmEXNOv.mjs";
|
|
5
|
+
import { r as fetchKey, s as validateCryptoKey } from "./key-BJcK-1Av.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,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-BOH-uFLj.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 "@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-ChmEXNOv.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-B_M80hBW.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
|
@@ -7,8 +7,8 @@ import { i as assertExists, t as assertStringIncludes } from "../std__assert-BUO
|
|
|
7
7
|
import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
8
8
|
import { t as assert } from "../assert-BhQd8QHP.mjs";
|
|
9
9
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
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-
|
|
10
|
+
import { t as exportJwk } from "../key-BJcK-1Av.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-B_M80hBW.mjs";
|
|
12
12
|
import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-CtZLJq76.mjs";
|
|
13
13
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
14
14
|
import { FetchError, exportSpki } from "@fedify/vocab-runtime";
|
package/dist/sig/key.test.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import "../std__assert-BUOJXi-Z.mjs";
|
|
|
6
6
|
import { t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
7
7
|
import { t as assert } from "../assert-BhQd8QHP.mjs";
|
|
8
8
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
9
|
-
import { a as generateCryptoKeyPair, i as fetchKeyDetailed, o as importJwk, r as fetchKey, s as validateCryptoKey, t as exportJwk } from "../key-
|
|
9
|
+
import { a as generateCryptoKeyPair, i as fetchKeyDetailed, o as importJwk, r as fetchKey, s as validateCryptoKey, t as exportJwk } from "../key-BJcK-1Av.mjs";
|
|
10
10
|
import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-CtZLJq76.mjs";
|
|
11
11
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
12
12
|
import { CryptographicKey, Multikey } from "@fedify/vocab";
|
package/dist/sig/ld.test.mjs
CHANGED
|
@@ -5,9 +5,9 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
|
5
5
|
import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
6
6
|
import { n as assertInstanceOf, t as assert } from "../assert-BhQd8QHP.mjs";
|
|
7
7
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
8
|
-
import { a as generateCryptoKeyPair } from "../key-
|
|
8
|
+
import { a as generateCryptoKeyPair } from "../key-BJcK-1Av.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-YAXn6sG8.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-BOH-uFLj.cjs");
|
|
5
|
+
const require_proof = require("../proof-DzOl2GlQ.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-CeK9QmL_.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-BeGIkK97.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
|
@@ -6,7 +6,7 @@ import "../std__assert-BUOJXi-Z.mjs";
|
|
|
6
6
|
import { n as assertFalse } from "../assert_rejects-B-qJtC9Z.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-B3ZkY-Ov.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
|