@fedify/fedify 1.6.1-pr.242.868 → 1.6.1-pr.245.872
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{actor-DTAqv8mf.js → actor-B7xKyIC7.js} +179 -179
- package/dist/{actor-4RHkloLu.js → actor-CFG182bR.js} +3 -3
- package/dist/{authdocloader-B8WXzKLO.js → authdocloader-Cdn3CbZy.js} +3 -3
- package/dist/{authdocloader-DWb2O07G.js → authdocloader-DMOLm8CY.js} +3 -3
- package/dist/{builder-DmqGnXEV.js → builder-CUExlGAH.js} +16 -16
- package/dist/{client-BXM1Jsjk.js → client-CNaeO0LW.js} +1 -1
- package/dist/compat/mod.d.ts +2 -2
- package/dist/compat/transformers.test.js +18 -18
- package/dist/{context-D-mAOKif.d.ts → context-CzJXjNR8.d.ts} +1 -0
- package/dist/{context-CNjBitqI.js → context-zJEtoVJS.js} +3 -3
- package/dist/{docloader-SoTWFoGg.js → docloader-Czco3P6X.js} +1 -1
- package/dist/{docloader-Bx3IyCbi.js → docloader-sgI6F7Ro.js} +1 -1
- package/dist/federation/builder.test.js +6 -5
- package/dist/federation/handler.test.js +20 -20
- package/dist/federation/inbox.test.js +3 -3
- package/dist/federation/keycache.test.js +3 -3
- package/dist/federation/middleware.test.js +19 -19
- package/dist/federation/mod.d.ts +1 -1
- package/dist/federation/mod.js +10 -10
- package/dist/federation/router.test.js +16 -3
- package/dist/federation/send.test.js +9 -9
- package/dist/{http-_wjASyrF.js → http-CP2pIuur.js} +3 -3
- package/dist/{http-Bx8zx0B9.js → http-CTBwZLuQ.js} +3 -3
- package/dist/{inbox-B25fOUCE.js → inbox-BuE9KPEc.js} +8 -3
- package/dist/{key-DJR5B9MR.js → key-0bfNHNRF.js} +5 -5
- package/dist/{key-DMjXmsGn.js → key-18i1FYDt.js} +3 -3
- package/dist/{key-BSJPc6d6.js → key-BPCLKNCh.js} +4 -4
- package/dist/{key-DLPGtYyL.js → key-BPc6d78q.js} +2 -2
- package/dist/{keycache-Bfb23HgF.js → keycache-hl2ARY8p.js} +1 -1
- package/dist/{keys-Bpe3lo_n.js → keys-Dk_Eyuyh.js} +1 -1
- package/dist/{ld-DnImogQ2.js → ld-C2BDnxcZ.js} +3 -3
- package/dist/{lookup-iEX2Qf_y.js → lookup-B12O9dcB.js} +1 -1
- package/dist/{lookup-DuhsEtQ9.js → lookup-CVqC_5fJ.js} +1 -1
- package/dist/{lookup-BdqwM7q0.js → lookup-D1spPv89.js} +3 -3
- package/dist/{middleware-DIkN1Cw2.js → middleware-DGcmjLJD.js} +55 -32
- package/dist/{middleware-kjMnS9e3.js → middleware-DqMtEAhx.js} +16 -16
- package/dist/middleware-bHJ1tYB5.js +33 -0
- package/dist/middleware-zXA47eNI.js +17 -0
- package/dist/{mod-zRl4tJCz.d.ts → mod-CeLnlsqE.d.ts} +1 -1
- package/dist/mod.d.ts +2 -2
- package/dist/mod.js +10 -10
- package/dist/nodeinfo/client.test.js +2 -2
- package/dist/nodeinfo/handler.test.js +19 -19
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/{owner-DqE35Vly.js → owner-BoNPBqME.js} +3 -3
- package/dist/{proof-DBWAm04A.js → proof-CThZUNyP.js} +3 -3
- package/dist/{proof-4GVd_94h.js → proof-CaBhkQKn.js} +3 -3
- package/dist/{router-BQ9wxxuz.js → router-D_aVZZUc.js} +19 -1
- package/dist/runtime/authdocloader.test.js +8 -8
- package/dist/runtime/docloader.test.js +1 -1
- package/dist/runtime/key.test.js +5 -5
- package/dist/runtime/mod.js +6 -6
- package/dist/{send-B6r0W6TU.js → send-BjLUPJXk.js} +2 -2
- package/dist/sig/http.test.js +7 -7
- package/dist/sig/key.test.js +6 -6
- package/dist/sig/ld.test.js +7 -7
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +8 -8
- package/dist/sig/proof.test.js +7 -7
- package/dist/{types-DPKT1AqJ.js → types-DZWmmHD8.js} +1 -1
- package/dist/vocab/actor.test.js +4 -4
- package/dist/vocab/lookup.test.js +4 -4
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +2 -2
- package/dist/vocab/vocab.test.js +4 -4
- package/dist/{vocab-Bkp-mLSq.js → vocab-BRExeuLZ.js} +3 -3
- package/dist/{vocab-DGenL1NB.js → vocab-ComC-LpL.js} +178 -178
- package/dist/webfinger/handler.test.js +19 -19
- package/dist/webfinger/lookup.test.js +2 -2
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/hono.d.ts +1 -1
- package/dist/x/sveltekit.d.ts +1 -1
- package/package.json +1 -1
- package/dist/middleware-BS5P5Q6N.js +0 -33
- package/dist/middleware-DXhUqEJ1.js +0 -17
@@ -2,9 +2,9 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import "./docloader-
|
6
|
-
import "./actor-
|
7
|
-
import "./lookup-
|
8
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-
|
5
|
+
import "./docloader-sgI6F7Ro.js";
|
6
|
+
import "./actor-B7xKyIC7.js";
|
7
|
+
import "./lookup-B12O9dcB.js";
|
8
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-BPc6d78q.js";
|
9
9
|
|
10
10
|
export { validateCryptoKey };
|
@@ -2,8 +2,8 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import { deno_default, getDocumentLoader } from "./docloader-
|
6
|
-
import { CryptographicKey, Object as Object$1, isActor } from "./actor-
|
5
|
+
import { deno_default, getDocumentLoader } from "./docloader-sgI6F7Ro.js";
|
6
|
+
import { CryptographicKey, Object as Object$1, isActor } from "./actor-B7xKyIC7.js";
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
9
9
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { CryptographicKey, Multikey } from "./vocab-
|
6
|
+
import { CryptographicKey, Multikey } from "./vocab-ComC-LpL.js";
|
7
7
|
|
8
8
|
//#region federation/keycache.ts
|
9
9
|
var KvKeyCache = class {
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { CryptographicKey, Multikey, importSpki } from "./vocab-
|
6
|
+
import { CryptographicKey, Multikey, importSpki } from "./vocab-ComC-LpL.js";
|
7
7
|
|
8
8
|
//#region testing/keys.ts
|
9
9
|
const rsaPublicKey1 = new CryptographicKey({
|
@@ -3,10 +3,10 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default, getDocumentLoader } from "./docloader-
|
7
|
-
import { Activity, CryptographicKey, Object as Object$1 } from "./vocab-
|
6
|
+
import { deno_default, getDocumentLoader } from "./docloader-Czco3P6X.js";
|
7
|
+
import { Activity, CryptographicKey, Object as Object$1 } from "./vocab-ComC-LpL.js";
|
8
8
|
import { getTypeId } from "./type-D2s5lmbZ.js";
|
9
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
9
|
+
import { fetchKey, validateCryptoKey } from "./key-18i1FYDt.js";
|
10
10
|
import { getLogger } from "@logtape/logtape";
|
11
11
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
12
12
|
import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import { UrlError, deno_default, getUserAgent, validatePublicUrl } from "./docloader-
|
5
|
+
import { UrlError, deno_default, getUserAgent, validatePublicUrl } from "./docloader-sgI6F7Ro.js";
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
8
8
|
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default, getUserAgent } from "./docloader-
|
6
|
+
import { deno_default, getUserAgent } from "./docloader-Czco3P6X.js";
|
7
7
|
import { UrlError, validatePublicUrl } from "./url-kTAI6_KP.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
@@ -3,9 +3,9 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default, getDocumentLoader } from "./docloader-
|
7
|
-
import { Object as Object$1 } from "./vocab-
|
8
|
-
import { lookupWebFinger } from "./lookup-
|
6
|
+
import { deno_default, getDocumentLoader } from "./docloader-Czco3P6X.js";
|
7
|
+
import { Object as Object$1 } from "./vocab-ComC-LpL.js";
|
8
|
+
import { lookupWebFinger } from "./lookup-CVqC_5fJ.js";
|
9
9
|
import { getTypeId } from "./type-D2s5lmbZ.js";
|
10
10
|
import { getLogger } from "@logtape/logtape";
|
11
11
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
@@ -3,29 +3,35 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
5
|
import { getDefaultActivityTransformers$1 as getDefaultActivityTransformers } from "./transformers-jxj-4o2K.js";
|
6
|
-
import { deno_default, getDocumentLoader, kvCache } from "./docloader-
|
7
|
-
import { Activity, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId$1 as getTypeId } from "./actor-
|
8
|
-
import { lookupWebFinger } from "./lookup-
|
9
|
-
import { exportJwk, importJwk, validateCryptoKey } from "./key-
|
10
|
-
import { doubleKnock, verifyRequest } from "./http-
|
11
|
-
import { detachSignature$1 as detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd$1 as signJsonLd, signObject$1 as signObject, verifyJsonLd$1 as verifyJsonLd, verifyObject$1 as verifyObject } from "./proof-
|
12
|
-
import { getNodeInfo, nodeInfoToJson } from "./types-
|
13
|
-
import { getAuthenticatedDocumentLoader$1 as getAuthenticatedDocumentLoader } from "./authdocloader-
|
14
|
-
import { lookupObject, traverseCollection } from "./vocab-
|
6
|
+
import { deno_default, getDocumentLoader, kvCache } from "./docloader-sgI6F7Ro.js";
|
7
|
+
import { Activity, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId$1 as getTypeId } from "./actor-B7xKyIC7.js";
|
8
|
+
import { lookupWebFinger } from "./lookup-B12O9dcB.js";
|
9
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-BPc6d78q.js";
|
10
|
+
import { doubleKnock, verifyRequest } from "./http-CP2pIuur.js";
|
11
|
+
import { detachSignature$1 as detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd$1 as signJsonLd, signObject$1 as signObject, verifyJsonLd$1 as verifyJsonLd, verifyObject$1 as verifyObject } from "./proof-CThZUNyP.js";
|
12
|
+
import { getNodeInfo, nodeInfoToJson } from "./types-DZWmmHD8.js";
|
13
|
+
import { getAuthenticatedDocumentLoader$1 as getAuthenticatedDocumentLoader } from "./authdocloader-DMOLm8CY.js";
|
14
|
+
import { lookupObject, traverseCollection } from "./vocab-BRExeuLZ.js";
|
15
15
|
import { getLogger, withContext } from "@logtape/logtape";
|
16
16
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
17
17
|
import { encodeHex } from "byte-encodings/hex";
|
18
|
+
import { cloneDeep } from "@es-toolkit/es-toolkit";
|
18
19
|
import { Router } from "uri-template-router";
|
19
20
|
import { parseTemplate } from "url-template";
|
20
21
|
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_HEADER, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
21
22
|
import { domainToASCII } from "node:url";
|
22
23
|
|
23
24
|
//#region federation/inbox.ts
|
24
|
-
var InboxListenerSet = class {
|
25
|
+
var InboxListenerSet = class InboxListenerSet {
|
25
26
|
#listeners;
|
26
27
|
constructor() {
|
27
28
|
this.#listeners = new Map();
|
28
29
|
}
|
30
|
+
clone() {
|
31
|
+
const clone = new InboxListenerSet();
|
32
|
+
clone.#listeners = new Map(this.#listeners);
|
33
|
+
return clone;
|
34
|
+
}
|
29
35
|
add(type, listener) {
|
30
36
|
if (this.#listeners.has(type)) throw new TypeError("Listener already set for this type.");
|
31
37
|
this.#listeners.set(type, listener);
|
@@ -175,11 +181,21 @@ async function routeActivity({ context: ctx, json, activity, recipient, inboxLis
|
|
175
181
|
|
176
182
|
//#endregion
|
177
183
|
//#region federation/router.ts
|
184
|
+
function cloneInnerRouter(router) {
|
185
|
+
const clone = new Router();
|
186
|
+
clone.nid = router.nid;
|
187
|
+
clone.fsm = cloneDeep(router.fsm);
|
188
|
+
clone.routeSet = new Set(router.routeSet);
|
189
|
+
clone.templateRouteMap = new Map(router.templateRouteMap);
|
190
|
+
clone.valueRouteMap = new Map(router.valueRouteMap);
|
191
|
+
clone.hierarchy = cloneDeep(router.hierarchy);
|
192
|
+
return clone;
|
193
|
+
}
|
178
194
|
/**
|
179
195
|
* URL router and constructor based on URI Template
|
180
196
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
|
181
197
|
*/
|
182
|
-
var Router$1 = class {
|
198
|
+
var Router$1 = class Router$1 {
|
183
199
|
#router;
|
184
200
|
#templates;
|
185
201
|
#templateStrings;
|
@@ -198,6 +214,13 @@ var Router$1 = class {
|
|
198
214
|
this.#templateStrings = {};
|
199
215
|
this.trailingSlashInsensitive = options.trailingSlashInsensitive ?? false;
|
200
216
|
}
|
217
|
+
clone() {
|
218
|
+
const clone = new Router$1({ trailingSlashInsensitive: this.trailingSlashInsensitive });
|
219
|
+
clone.#router = cloneInnerRouter(this.#router);
|
220
|
+
clone.#templates = { ...this.#templates };
|
221
|
+
clone.#templateStrings = { ...this.#templateStrings };
|
222
|
+
return clone;
|
223
|
+
}
|
201
224
|
/**
|
202
225
|
* Checks if a path name exists in the router.
|
203
226
|
* @param name The name of the path.
|
@@ -289,25 +312,25 @@ var FederationBuilderImpl = class {
|
|
289
312
|
this.objectTypeIds = {};
|
290
313
|
}
|
291
314
|
async build(options) {
|
292
|
-
const { FederationImpl: FederationImpl$1 } = await import("./middleware-
|
315
|
+
const { FederationImpl: FederationImpl$1 } = await import("./middleware-zXA47eNI.js");
|
293
316
|
const f = new FederationImpl$1(options);
|
294
317
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
295
|
-
f.router = this.router;
|
318
|
+
f.router = this.router.clone();
|
296
319
|
f.router.trailingSlashInsensitive = trailingSlashInsensitiveValue;
|
297
320
|
f._initializeRouter();
|
298
|
-
f.actorCallbacks = this.actorCallbacks;
|
321
|
+
f.actorCallbacks = this.actorCallbacks == null ? void 0 : { ...this.actorCallbacks };
|
299
322
|
f.nodeInfoDispatcher = this.nodeInfoDispatcher;
|
300
|
-
f.objectCallbacks = this.objectCallbacks;
|
301
|
-
f.objectTypeIds = this.objectTypeIds;
|
323
|
+
f.objectCallbacks = { ...this.objectCallbacks };
|
324
|
+
f.objectTypeIds = { ...this.objectTypeIds };
|
302
325
|
f.inboxPath = this.inboxPath;
|
303
|
-
f.inboxCallbacks = this.inboxCallbacks;
|
304
|
-
f.outboxCallbacks = this.outboxCallbacks;
|
305
|
-
f.followingCallbacks = this.followingCallbacks;
|
306
|
-
f.followersCallbacks = this.followersCallbacks;
|
307
|
-
f.likedCallbacks = this.likedCallbacks;
|
308
|
-
f.featuredCallbacks = this.featuredCallbacks;
|
309
|
-
f.featuredTagsCallbacks = this.featuredTagsCallbacks;
|
310
|
-
f.inboxListeners = this.inboxListeners;
|
326
|
+
f.inboxCallbacks = this.inboxCallbacks == null ? void 0 : { ...this.inboxCallbacks };
|
327
|
+
f.outboxCallbacks = this.outboxCallbacks == null ? void 0 : { ...this.outboxCallbacks };
|
328
|
+
f.followingCallbacks = this.followingCallbacks == null ? void 0 : { ...this.followingCallbacks };
|
329
|
+
f.followersCallbacks = this.followersCallbacks == null ? void 0 : { ...this.followersCallbacks };
|
330
|
+
f.likedCallbacks = this.likedCallbacks == null ? void 0 : { ...this.likedCallbacks };
|
331
|
+
f.featuredCallbacks = this.featuredCallbacks == null ? void 0 : { ...this.featuredCallbacks };
|
332
|
+
f.featuredTagsCallbacks = this.featuredTagsCallbacks == null ? void 0 : { ...this.featuredTagsCallbacks };
|
333
|
+
f.inboxListeners = this.inboxListeners?.clone();
|
311
334
|
f.inboxErrorHandler = this.inboxErrorHandler;
|
312
335
|
f.sharedInboxKeyDispatcher = this.sharedInboxKeyDispatcher;
|
313
336
|
return f;
|
@@ -1601,8 +1624,8 @@ function createExponentialBackoffPolicy(options = {}) {
|
|
1601
1624
|
milliseconds *= 1 + Math.random();
|
1602
1625
|
milliseconds = Math.round(milliseconds);
|
1603
1626
|
}
|
1604
|
-
const delay = Temporal.Duration.from({ milliseconds });
|
1605
|
-
return Temporal.Duration.compare(delay, maxDelay) > 0 ? maxDelay : delay;
|
1627
|
+
const delay$1 = Temporal.Duration.from({ milliseconds });
|
1628
|
+
return Temporal.Duration.compare(delay$1, maxDelay) > 0 ? maxDelay : delay$1;
|
1606
1629
|
};
|
1607
1630
|
}
|
1608
1631
|
|
@@ -2027,11 +2050,11 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
2027
2050
|
error: error$1
|
2028
2051
|
});
|
2029
2052
|
}
|
2030
|
-
const delay = this.outboxRetryPolicy({
|
2053
|
+
const delay$1 = this.outboxRetryPolicy({
|
2031
2054
|
elapsedTime: Temporal.Instant.from(message.started).until(Temporal.Now.instant()),
|
2032
2055
|
attempts: message.attempt
|
2033
2056
|
});
|
2034
|
-
if (delay != null) {
|
2057
|
+
if (delay$1 != null) {
|
2035
2058
|
logger$1.error("Failed to send activity {activityId} to {inbox} (attempt #{attempt}); retry...:\n{error}", {
|
2036
2059
|
...logData,
|
2037
2060
|
error
|
@@ -2039,7 +2062,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
2039
2062
|
await this.outboxQueue?.enqueue({
|
2040
2063
|
...message,
|
2041
2064
|
attempt: message.attempt + 1
|
2042
|
-
}, { delay: Temporal.Duration.compare(delay, { seconds: 0 }) < 0 ? Temporal.Duration.from({ seconds: 0 }) : delay });
|
2065
|
+
}, { delay: Temporal.Duration.compare(delay$1, { seconds: 0 }) < 0 ? Temporal.Duration.from({ seconds: 0 }) : delay$1 });
|
2043
2066
|
} else logger$1.error("Failed to send activity {activityId} to {inbox} after {attempt} attempts; giving up:\n{error}", {
|
2044
2067
|
...logData,
|
2045
2068
|
error
|
@@ -2112,11 +2135,11 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
2112
2135
|
recipient: message.identifier
|
2113
2136
|
});
|
2114
2137
|
}
|
2115
|
-
const delay = this.inboxRetryPolicy({
|
2138
|
+
const delay$1 = this.inboxRetryPolicy({
|
2116
2139
|
elapsedTime: Temporal.Instant.from(message.started).until(Temporal.Now.instant()),
|
2117
2140
|
attempts: message.attempt
|
2118
2141
|
});
|
2119
|
-
if (delay != null) {
|
2142
|
+
if (delay$1 != null) {
|
2120
2143
|
logger$1.error("Failed to process the incoming activity {activityId} (attempt #{attempt}); retry...:\n{error}", {
|
2121
2144
|
error,
|
2122
2145
|
attempt: message.attempt,
|
@@ -2127,7 +2150,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
2127
2150
|
await this.inboxQueue?.enqueue({
|
2128
2151
|
...message,
|
2129
2152
|
attempt: message.attempt + 1
|
2130
|
-
}, { delay: Temporal.Duration.compare(delay, { seconds: 0 }) < 0 ? Temporal.Duration.from({ seconds: 0 }) : delay });
|
2153
|
+
}, { delay: Temporal.Duration.compare(delay$1, { seconds: 0 }) < 0 ? Temporal.Duration.from({ seconds: 0 }) : delay$1 });
|
2131
2154
|
} else logger$1.error("Failed to process the incoming activity {activityId} after {trial} attempts; giving up:\n{error}", {
|
2132
2155
|
error,
|
2133
2156
|
activityId: activity.id?.href,
|
@@ -3,26 +3,26 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default, getDocumentLoader, kvCache } from "./docloader-
|
7
|
-
import { getNodeInfo } from "./client-
|
8
|
-
import { RouterError } from "./router-
|
6
|
+
import { deno_default, getDocumentLoader, kvCache } from "./docloader-Czco3P6X.js";
|
7
|
+
import { getNodeInfo } from "./client-CNaeO0LW.js";
|
8
|
+
import { RouterError } from "./router-D_aVZZUc.js";
|
9
9
|
import { nodeInfoToJson } from "./types-CqoqWDkp.js";
|
10
|
-
import { Activity, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage } from "./vocab-
|
11
|
-
import { lookupWebFinger } from "./lookup-
|
10
|
+
import { Activity, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage } from "./vocab-ComC-LpL.js";
|
11
|
+
import { lookupWebFinger } from "./lookup-CVqC_5fJ.js";
|
12
12
|
import { getTypeId } from "./type-D2s5lmbZ.js";
|
13
|
-
import { exportJwk, importJwk, validateCryptoKey } from "./key-
|
14
|
-
import { verifyRequest } from "./http-
|
15
|
-
import { getAuthenticatedDocumentLoader } from "./authdocloader-
|
16
|
-
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-
|
17
|
-
import { doesActorOwnKey, getKeyOwner } from "./owner-
|
18
|
-
import { signObject, verifyObject } from "./proof-
|
19
|
-
import { lookupObject, traverseCollection } from "./lookup-
|
20
|
-
import { routeActivity } from "./inbox-
|
21
|
-
import { FederationBuilderImpl } from "./builder-
|
13
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-18i1FYDt.js";
|
14
|
+
import { verifyRequest } from "./http-CTBwZLuQ.js";
|
15
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-Cdn3CbZy.js";
|
16
|
+
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-C2BDnxcZ.js";
|
17
|
+
import { doesActorOwnKey, getKeyOwner } from "./owner-BoNPBqME.js";
|
18
|
+
import { signObject, verifyObject } from "./proof-CaBhkQKn.js";
|
19
|
+
import { lookupObject, traverseCollection } from "./lookup-D1spPv89.js";
|
20
|
+
import { routeActivity } from "./inbox-BuE9KPEc.js";
|
21
|
+
import { FederationBuilderImpl } from "./builder-CUExlGAH.js";
|
22
22
|
import { buildCollectionSynchronizationHeader } from "./collection-QaGK9TVn.js";
|
23
|
-
import { KvKeyCache } from "./keycache-
|
23
|
+
import { KvKeyCache } from "./keycache-hl2ARY8p.js";
|
24
24
|
import { createExponentialBackoffPolicy } from "./retry-BiIhZWgD.js";
|
25
|
-
import { extractInboxes, sendActivity } from "./send-
|
25
|
+
import { extractInboxes, sendActivity } from "./send-BjLUPJXk.js";
|
26
26
|
import { getLogger, withContext } from "@logtape/logtape";
|
27
27
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
28
28
|
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_HEADER, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
@@ -0,0 +1,33 @@
|
|
1
|
+
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
globalThis.addEventListener = () => {};
|
5
|
+
|
6
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-DqMtEAhx.js";
|
7
|
+
import "./docloader-Czco3P6X.js";
|
8
|
+
import "./url-kTAI6_KP.js";
|
9
|
+
import "./semver-CbbIgUsa.js";
|
10
|
+
import "./client-CNaeO0LW.js";
|
11
|
+
import "./router-D_aVZZUc.js";
|
12
|
+
import "./types-CqoqWDkp.js";
|
13
|
+
import "./multibase-DeCHcK8L.js";
|
14
|
+
import "./vocab-ComC-LpL.js";
|
15
|
+
import "./langstr-DbWheeIS.js";
|
16
|
+
import "./lookup-CVqC_5fJ.js";
|
17
|
+
import "./type-D2s5lmbZ.js";
|
18
|
+
import "./actor-CFG182bR.js";
|
19
|
+
import "./key-18i1FYDt.js";
|
20
|
+
import "./http-CTBwZLuQ.js";
|
21
|
+
import "./authdocloader-Cdn3CbZy.js";
|
22
|
+
import "./ld-C2BDnxcZ.js";
|
23
|
+
import "./owner-BoNPBqME.js";
|
24
|
+
import "./proof-CaBhkQKn.js";
|
25
|
+
import "./lookup-D1spPv89.js";
|
26
|
+
import "./inbox-BuE9KPEc.js";
|
27
|
+
import "./builder-CUExlGAH.js";
|
28
|
+
import "./collection-QaGK9TVn.js";
|
29
|
+
import "./keycache-hl2ARY8p.js";
|
30
|
+
import "./retry-BiIhZWgD.js";
|
31
|
+
import "./send-BjLUPJXk.js";
|
32
|
+
|
33
|
+
export { FederationImpl };
|
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
|
5
|
+
import "./transformers-jxj-4o2K.js";
|
6
|
+
import "./docloader-sgI6F7Ro.js";
|
7
|
+
import "./actor-B7xKyIC7.js";
|
8
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-DGcmjLJD.js";
|
9
|
+
import "./lookup-B12O9dcB.js";
|
10
|
+
import "./key-BPc6d78q.js";
|
11
|
+
import "./http-CP2pIuur.js";
|
12
|
+
import "./proof-CThZUNyP.js";
|
13
|
+
import "./types-DZWmmHD8.js";
|
14
|
+
import "./authdocloader-DMOLm8CY.js";
|
15
|
+
import "./vocab-BRExeuLZ.js";
|
16
|
+
|
17
|
+
export { FederationImpl };
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
3
|
import { Activity$1 as Activity } from "./vocab-CLWdoo7y.js";
|
4
|
-
import { ActivityTransformer, Context } from "./context-
|
4
|
+
import { ActivityTransformer, Context } from "./context-CzJXjNR8.js";
|
5
5
|
|
6
6
|
//#region compat/transformers.d.ts
|
7
7
|
/**
|
package/dist/mod.d.ts
CHANGED
@@ -9,9 +9,9 @@ import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessage
|
|
9
9
|
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey$1 as doesActorOwnKey, getKeyOwner$1 as getKeyOwner } from "./owner-BjpObx-L.js";
|
10
10
|
import { LookupObjectOptions, PUBLIC_COLLECTION$1 as PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, lookupObject$1 as lookupObject, traverseCollection$1 as traverseCollection } from "./mod-DysVoXOu.js";
|
11
11
|
import { ResourceDescriptor, lookupWebFinger$1 as lookupWebFinger } from "./lookup-DAfStZtI.js";
|
12
|
-
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router$1 as Router, RouterError$1 as RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader$1 as buildCollectionSynchronizationHeader, createExponentialBackoffPolicy$1 as createExponentialBackoffPolicy, createFederation$1 as createFederation, createFederationBuilder$1 as createFederationBuilder, digest$1 as digest, respondWithObject$1 as respondWithObject, respondWithObjectIfAcceptable$1 as respondWithObjectIfAcceptable } from "./context-
|
12
|
+
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router$1 as Router, RouterError$1 as RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader$1 as buildCollectionSynchronizationHeader, createExponentialBackoffPolicy$1 as createExponentialBackoffPolicy, createFederation$1 as createFederation, createFederationBuilder$1 as createFederationBuilder, digest$1 as digest, respondWithObject$1 as respondWithObject, respondWithObjectIfAcceptable$1 as respondWithObjectIfAcceptable } from "./context-CzJXjNR8.js";
|
13
13
|
import { InProcessMessageQueue$1 as InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue$1 as ParallelMessageQueue } from "./mq-Bue016Tz.js";
|
14
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-
|
14
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-CeLnlsqE.js";
|
15
15
|
import "./mod-g0xFzAP9.js";
|
16
16
|
import "./mod-1pDWKvUL.js";
|
17
17
|
import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "./mod-BxwG4X3V.js";
|
package/dist/mod.js
CHANGED
@@ -4,17 +4,17 @@
|
|
4
4
|
|
5
5
|
import { actorDehydrator$1 as actorDehydrator, autoIdAssigner$1 as autoIdAssigner, getDefaultActivityTransformers$1 as getDefaultActivityTransformers } from "./transformers-jxj-4o2K.js";
|
6
6
|
import "./compat-Bb5myD13.js";
|
7
|
-
import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-
|
8
|
-
import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, exportMultibaseKey$1 as exportMultibaseKey, exportSpki$1 as exportSpki, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId$1 as getTypeId, importMultibaseKey$1 as importMultibaseKey, importPem$1 as importPem, importPkcs1$1 as importPkcs1, importSpki$1 as importSpki, isActor, normalizeActorHandle } from "./actor-
|
9
|
-
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-
|
10
|
-
import { lookupWebFinger } from "./lookup-
|
11
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk } from "./key-
|
12
|
-
import { signRequest, verifyRequest } from "./http-
|
13
|
-
import { attachSignature$1 as attachSignature, createProof$1 as createProof, createSignature$1 as createSignature, detachSignature$1 as detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd$1 as signJsonLd, signObject$1 as signObject, verifyJsonLd$1 as verifyJsonLd, verifyObject$1 as verifyObject, verifyProof$1 as verifyProof, verifySignature$1 as verifySignature } from "./proof-
|
7
|
+
import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-sgI6F7Ro.js";
|
8
|
+
import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, exportMultibaseKey$1 as exportMultibaseKey, exportSpki$1 as exportSpki, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId$1 as getTypeId, importMultibaseKey$1 as importMultibaseKey, importPem$1 as importPem, importPkcs1$1 as importPkcs1, importSpki$1 as importSpki, isActor, normalizeActorHandle } from "./actor-B7xKyIC7.js";
|
9
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-DGcmjLJD.js";
|
10
|
+
import { lookupWebFinger } from "./lookup-B12O9dcB.js";
|
11
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk } from "./key-BPc6d78q.js";
|
12
|
+
import { signRequest, verifyRequest } from "./http-CP2pIuur.js";
|
13
|
+
import { attachSignature$1 as attachSignature, createProof$1 as createProof, createSignature$1 as createSignature, detachSignature$1 as detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd$1 as signJsonLd, signObject$1 as signObject, verifyJsonLd$1 as verifyJsonLd, verifyObject$1 as verifyObject, verifyProof$1 as verifyProof, verifySignature$1 as verifySignature } from "./proof-CThZUNyP.js";
|
14
14
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-Bmj7soSg.js";
|
15
|
-
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./types-
|
16
|
-
import { getAuthenticatedDocumentLoader$1 as getAuthenticatedDocumentLoader } from "./authdocloader-
|
17
|
-
import { PUBLIC_COLLECTION, lookupObject, traverseCollection } from "./vocab-
|
15
|
+
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./types-DZWmmHD8.js";
|
16
|
+
import { getAuthenticatedDocumentLoader$1 as getAuthenticatedDocumentLoader } from "./authdocloader-DMOLm8CY.js";
|
17
|
+
import { PUBLIC_COLLECTION, lookupObject, traverseCollection } from "./vocab-BRExeuLZ.js";
|
18
18
|
import "./nodeinfo-CyEbLjHs.js";
|
19
19
|
import "./runtime-BSkOVUWM.js";
|
20
20
|
import "./sig-BXJO--F9.js";
|
@@ -6,10 +6,10 @@
|
|
6
6
|
import { assertEquals } from "../assert_equals-ClvzlhZu.js";
|
7
7
|
import "../assert-Dv75vaGI.js";
|
8
8
|
import "../assert_instance_of--9UCVKsi.js";
|
9
|
-
import "../docloader-
|
9
|
+
import "../docloader-Czco3P6X.js";
|
10
10
|
import "../url-kTAI6_KP.js";
|
11
11
|
import "../semver-CbbIgUsa.js";
|
12
|
-
import { getNodeInfo, parseInboundService, parseNodeInfo, parseOutboundService, parseProtocol, parseServices, parseSoftware, parseUsage } from "../client-
|
12
|
+
import { getNodeInfo, parseInboundService, parseNodeInfo, parseOutboundService, parseProtocol, parseServices, parseSoftware, parseUsage } from "../client-CNaeO0LW.js";
|
13
13
|
import { test } from "../testing-jcGLO9Lp.js";
|
14
14
|
import "../std__assert-CaBUULmX.js";
|
15
15
|
import "../assert_rejects-FOHCtlD2.js";
|
@@ -7,32 +7,32 @@ import { assertEquals } from "../assert_equals-ClvzlhZu.js";
|
|
7
7
|
import "../assert-Dv75vaGI.js";
|
8
8
|
import "../assert_instance_of--9UCVKsi.js";
|
9
9
|
import { MemoryKvStore } from "../kv-DohFOP2C.js";
|
10
|
-
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-
|
11
|
-
import "../docloader-
|
10
|
+
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-DqMtEAhx.js";
|
11
|
+
import "../docloader-Czco3P6X.js";
|
12
12
|
import "../url-kTAI6_KP.js";
|
13
13
|
import { parseSemVer } from "../semver-CbbIgUsa.js";
|
14
|
-
import "../client-
|
15
|
-
import "../router-
|
14
|
+
import "../client-CNaeO0LW.js";
|
15
|
+
import "../router-D_aVZZUc.js";
|
16
16
|
import "../types-CqoqWDkp.js";
|
17
17
|
import "../multibase-DeCHcK8L.js";
|
18
|
-
import "../vocab-
|
18
|
+
import "../vocab-ComC-LpL.js";
|
19
19
|
import "../langstr-DbWheeIS.js";
|
20
|
-
import "../lookup-
|
20
|
+
import "../lookup-CVqC_5fJ.js";
|
21
21
|
import "../type-D2s5lmbZ.js";
|
22
|
-
import "../actor-
|
23
|
-
import "../key-
|
24
|
-
import "../http-
|
25
|
-
import "../authdocloader-
|
26
|
-
import "../ld-
|
27
|
-
import "../owner-
|
28
|
-
import "../proof-
|
29
|
-
import "../lookup-
|
30
|
-
import "../inbox-
|
31
|
-
import "../builder-
|
22
|
+
import "../actor-CFG182bR.js";
|
23
|
+
import "../key-18i1FYDt.js";
|
24
|
+
import "../http-CTBwZLuQ.js";
|
25
|
+
import "../authdocloader-Cdn3CbZy.js";
|
26
|
+
import "../ld-C2BDnxcZ.js";
|
27
|
+
import "../owner-BoNPBqME.js";
|
28
|
+
import "../proof-CaBhkQKn.js";
|
29
|
+
import "../lookup-D1spPv89.js";
|
30
|
+
import "../inbox-BuE9KPEc.js";
|
31
|
+
import "../builder-CUExlGAH.js";
|
32
32
|
import "../collection-QaGK9TVn.js";
|
33
|
-
import "../keycache-
|
33
|
+
import "../keycache-hl2ARY8p.js";
|
34
34
|
import "../retry-BiIhZWgD.js";
|
35
|
-
import "../send-
|
35
|
+
import "../send-BjLUPJXk.js";
|
36
36
|
import { test } from "../testing-jcGLO9Lp.js";
|
37
37
|
import "../std__assert-CaBUULmX.js";
|
38
38
|
import "../assert_rejects-FOHCtlD2.js";
|
@@ -40,7 +40,7 @@ import "../assert_is_error-D162gXcM.js";
|
|
40
40
|
import "../assert_not_equals-Cyf5m9Ke.js";
|
41
41
|
import "../assert_throws-CRfQJvVx.js";
|
42
42
|
import "../docloader-09nVWLAZ.js";
|
43
|
-
import { createRequestContext } from "../context-
|
43
|
+
import { createRequestContext } from "../context-zJEtoVJS.js";
|
44
44
|
|
45
45
|
//#region nodeinfo/handler.test.ts
|
46
46
|
test("handleNodeInfo()", async () => {
|
package/dist/nodeinfo/mod.js
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import "../docloader-
|
6
|
-
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../types-
|
5
|
+
import "../docloader-sgI6F7Ro.js";
|
6
|
+
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../types-DZWmmHD8.js";
|
7
7
|
import "../nodeinfo-CyEbLjHs.js";
|
8
8
|
|
9
9
|
export { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer };
|
@@ -3,9 +3,9 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { getDocumentLoader } from "./docloader-
|
7
|
-
import { CryptographicKey, Object as Object$1 } from "./vocab-
|
8
|
-
import { isActor } from "./actor-
|
6
|
+
import { getDocumentLoader } from "./docloader-Czco3P6X.js";
|
7
|
+
import { CryptographicKey, Object as Object$1 } from "./vocab-ComC-LpL.js";
|
8
|
+
import { isActor } from "./actor-CFG182bR.js";
|
9
9
|
import { trace } from "@opentelemetry/api";
|
10
10
|
|
11
11
|
//#region sig/owner.ts
|
@@ -2,9 +2,9 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import { deno_default, getDocumentLoader } from "./docloader-
|
6
|
-
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId$1 as getTypeId, isActor } from "./actor-
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
5
|
+
import { deno_default, getDocumentLoader } from "./docloader-sgI6F7Ro.js";
|
6
|
+
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId$1 as getTypeId, isActor } from "./actor-B7xKyIC7.js";
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-BPc6d78q.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
10
10
|
import jsonld from "jsonld";
|
@@ -3,10 +3,10 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default } from "./docloader-
|
7
|
-
import { Activity, DataIntegrityProof, Multikey } from "./vocab-
|
6
|
+
import { deno_default } from "./docloader-Czco3P6X.js";
|
7
|
+
import { Activity, DataIntegrityProof, Multikey } from "./vocab-ComC-LpL.js";
|
8
8
|
import { getTypeId } from "./type-D2s5lmbZ.js";
|
9
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
9
|
+
import { fetchKey, validateCryptoKey } from "./key-18i1FYDt.js";
|
10
10
|
import { getLogger } from "@logtape/logtape";
|
11
11
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
12
12
|
import { encodeHex } from "byte-encodings/hex";
|
@@ -3,15 +3,26 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
+
import { cloneDeep } from "@es-toolkit/es-toolkit";
|
6
7
|
import { Router } from "uri-template-router";
|
7
8
|
import { parseTemplate } from "url-template";
|
8
9
|
|
9
10
|
//#region federation/router.ts
|
11
|
+
function cloneInnerRouter(router) {
|
12
|
+
const clone = new Router();
|
13
|
+
clone.nid = router.nid;
|
14
|
+
clone.fsm = cloneDeep(router.fsm);
|
15
|
+
clone.routeSet = new Set(router.routeSet);
|
16
|
+
clone.templateRouteMap = new Map(router.templateRouteMap);
|
17
|
+
clone.valueRouteMap = new Map(router.valueRouteMap);
|
18
|
+
clone.hierarchy = cloneDeep(router.hierarchy);
|
19
|
+
return clone;
|
20
|
+
}
|
10
21
|
/**
|
11
22
|
* URL router and constructor based on URI Template
|
12
23
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
|
13
24
|
*/
|
14
|
-
var Router$1 = class {
|
25
|
+
var Router$1 = class Router$1 {
|
15
26
|
#router;
|
16
27
|
#templates;
|
17
28
|
#templateStrings;
|
@@ -30,6 +41,13 @@ var Router$1 = class {
|
|
30
41
|
this.#templateStrings = {};
|
31
42
|
this.trailingSlashInsensitive = options.trailingSlashInsensitive ?? false;
|
32
43
|
}
|
44
|
+
clone() {
|
45
|
+
const clone = new Router$1({ trailingSlashInsensitive: this.trailingSlashInsensitive });
|
46
|
+
clone.#router = cloneInnerRouter(this.#router);
|
47
|
+
clone.#templates = { ...this.#templates };
|
48
|
+
clone.#templateStrings = { ...this.#templateStrings };
|
49
|
+
return clone;
|
50
|
+
}
|
33
51
|
/**
|
34
52
|
* Checks if a path name exists in the router.
|
35
53
|
* @param name The name of the path.
|