@fedify/fedify 1.6.1-dev.880 → 1.6.1-dev.883
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-DvmEmDn9.js → actor-CwAL6Q82.js} +180 -180
- package/dist/{actor-DIk6hH_U.js → actor-DezwbbQX.js} +3 -3
- package/dist/{actor-f67C7yQD.d.ts → actor-tT_B0pDn.d.ts} +5 -8
- package/dist/{assert-Dv75vaGI.js → assert-YJk-1DlZ.js} +1 -1
- package/dist/{assert_equals-ClvzlhZu.js → assert_equals-Dnj7ejjL.js} +16 -9
- package/dist/{assert_instance_of--9UCVKsi.js → assert_instance_of-DBIoG5k7.js} +1 -1
- package/dist/{assert_is_error-D162gXcM.js → assert_is_error-jyzqjHud.js} +1 -1
- package/dist/{assert_not_equals-Cyf5m9Ke.js → assert_not_equals-wx-SRs4i.js} +1 -1
- package/dist/{assert_rejects-FOHCtlD2.js → assert_rejects-BZjUwo62.js} +2 -2
- package/dist/{assert_throws-CRfQJvVx.js → assert_throws-gBPv3v2V.js} +2 -2
- package/dist/{authdocloader-B3ME-k-0.js → authdocloader-C-_Lr-KH.js} +3 -3
- package/dist/{authdocloader-Bt52x-cz.js → authdocloader-Df1y1MKv.js} +4 -4
- package/dist/{builder-DT_CjHJM.js → builder-C8tsk_Xe.js} +3 -3
- package/dist/{client-Dw1pCSIt.d.ts → client-Cd552pKL.d.ts} +6 -9
- package/dist/{client-CSQzJhcr.js → client-CwjvB-Dh.js} +1 -1
- package/dist/{collection-QaGK9TVn.js → collection-Dfb0TPno.js} +1 -1
- package/dist/compat/mod.d.ts +12 -12
- package/dist/compat/mod.js +1 -1
- package/dist/compat/transformers.test.js +21 -21
- package/dist/{context-DBM4y1xF.d.ts → context-DRhhOsMk.d.ts} +12 -28
- package/dist/{context-DaUJ8XgG.js → context-DfToVZY6.js} +2 -2
- package/dist/{docloader-BesQV-nU.js → docloader-BFRgyDAa.js} +1 -2
- package/dist/{docloader-DdQSFoDK.js → docloader-BXc5egq6.js} +1 -2
- package/dist/{docloader-DTRsVZPo.d.ts → docloader-DlUDOVSe.d.ts} +4 -7
- package/dist/{esm-BxIKwi-M.js → esm-Btx3E8og.js} +1 -1
- package/dist/federation/builder.test.js +12 -12
- package/dist/federation/collection.test.js +9 -9
- package/dist/federation/handler.test.js +28 -28
- package/dist/federation/inbox.test.js +6 -6
- package/dist/federation/keycache.test.js +6 -6
- package/dist/federation/kv.test.js +8 -8
- package/dist/federation/middleware.test.js +28 -28
- package/dist/federation/mod.d.ts +11 -11
- package/dist/federation/mod.js +12 -12
- package/dist/federation/mq.test.js +10 -10
- package/dist/federation/retry.test.js +2 -2
- package/dist/federation/router.test.js +9 -9
- package/dist/federation/send.test.js +18 -18
- package/dist/{federation-Bmj7soSg.js → federation-3B6BDKCK.js} +1 -1
- package/dist/{http-nvlEiwC4.js → http-3CJyDlPz.js} +4 -4
- package/dist/{http-CZyKN-rt.d.ts → http-BkUCISGt.d.ts} +6 -14
- package/dist/{http-DKFoMKYk.js → http-DC3mY9EG.js} +4 -4
- package/dist/{inbox-DUxOSixz.js → inbox-CCbuuUqY.js} +4 -4
- package/dist/{key-C_i44VCP.js → key-CD8i4ZB_.js} +2 -2
- package/dist/{key-B6j6aQIf.js → key-Ce8aGBE5.js} +5 -5
- package/dist/{key-DnZNsfoE.js → key-D0WW7EHK.js} +3 -3
- package/dist/{key-BiM3rCVA.js → key-Y8a6dgOq.js} +4 -4
- package/dist/{keycache-NtvEqcq9.js → keycache-BtADunPo.js} +2 -2
- package/dist/{keys-R9p0S8_o.js → keys-BIY57kjo.js} +1 -1
- package/dist/{kv-BmsWxOQ2.d.ts → kv-p8sC8PTT.d.ts} +3 -7
- package/dist/{ld-BLZnxCWX.js → ld-D4G5WL1G.js} +4 -4
- package/dist/{lookup-B38eCiCI.js → lookup-C8V37GPa.js} +1 -1
- package/dist/{lookup-DXgwlvAK.js → lookup-CQnVHXIh.js} +3 -3
- package/dist/{lookup-CNK83LQK.js → lookup-Ds1_3qy2.js} +1 -1
- package/dist/{lookup-nlxO7x0u.d.ts → lookup-vJccIKCS.d.ts} +4 -8
- package/dist/middleware-DPuaf71I.js +17 -0
- package/dist/{middleware-Bjqgfc8l.js → middleware-DRpRVwO7.js} +18 -18
- package/dist/{middleware-FhQhkH0G.js → middleware-Jvf6WsMN.js} +18 -18
- package/dist/middleware-XHndzOUD.js +33 -0
- package/dist/{mod-iE_61Xjt.d.ts → mod-BTHfUeLo.d.ts} +2 -9
- package/dist/{mod-BUAWJ2pK.d.ts → mod-BUTm-sog.d.ts} +5 -9
- package/dist/{mod-CsYfI7YL.d.ts → mod-CgmTOt4z.d.ts} +3 -21
- package/dist/{mod-Bx6Du4Ct.d.ts → mod-DSPyncxx.d.ts} +5 -11
- package/dist/mod.d.ts +14 -14
- package/dist/mod.js +12 -12
- package/dist/{mq-Bue016Tz.d.ts → mq-nceTGCuc.d.ts} +3 -7
- package/dist/nodeinfo/client.test.js +23 -36
- package/dist/nodeinfo/handler.test.js +27 -27
- package/dist/nodeinfo/mod.d.ts +3 -3
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +8 -8
- package/dist/nodeinfo/types.test.js +8 -8
- package/dist/{owner-C_Gw25Id.d.ts → owner-CbRc94FP.d.ts} +6 -9
- package/dist/{owner-DKsEWurW.js → owner-Dyk0zd-q.js} +3 -3
- package/dist/{proof-DtIUHGA0.js → proof-B8Hm2M5c.js} +3 -3
- package/dist/{proof-DKetjewp.js → proof-D-CWdNQx.js} +5 -5
- package/dist/runtime/authdocloader.test.js +17 -17
- package/dist/runtime/docloader.test.js +69 -66
- package/dist/runtime/key.test.js +13 -13
- package/dist/runtime/langstr.test.js +8 -8
- package/dist/runtime/mod.d.ts +5 -5
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +8 -8
- package/dist/runtime/url.test.js +4 -4
- package/dist/{send-Z9IEW2ZG.js → send-CJXTH3ST.js} +3 -3
- package/dist/sig/http.test.js +52 -47
- package/dist/sig/key.test.js +14 -14
- package/dist/sig/ld.test.js +12 -12
- package/dist/sig/mod.d.ts +7 -7
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +16 -16
- package/dist/sig/proof.test.js +15 -15
- package/dist/{std__assert-CaBUULmX.js → std__assert-CHXwj7zk.js} +1 -1
- package/dist/testing/docloader.test.js +8 -8
- package/dist/testing/mod.d.ts +0 -1
- package/dist/{transformers-jxj-4o2K.js → transformers-ghwJuzGY.js} +1 -1
- package/dist/{types-C9A_t_ZN.js → types-D3XNqpGz.js} +1 -1
- package/dist/vocab/actor.test.js +60 -49
- package/dist/vocab/lookup.test.js +13 -13
- package/dist/vocab/mod.d.ts +5 -5
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +3 -3
- package/dist/vocab/vocab.test.js +129 -132
- package/dist/{vocab-CHuz96Ha.js → vocab-CPrCb9BR.js} +3 -3
- package/dist/{vocab-7mZSoHR0.js → vocab-CaZSjoCB.js} +178 -178
- package/dist/{vocab-C4bpdeio.d.ts → vocab-DSFLLLe6.d.ts} +2 -7
- package/dist/webfinger/handler.test.js +27 -27
- package/dist/webfinger/lookup.test.js +41 -46
- package/dist/webfinger/mod.d.ts +3 -3
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.d.ts +2 -9
- package/dist/x/cfworkers.test.js +8 -8
- package/dist/x/hono.d.ts +11 -12
- package/dist/x/sveltekit.d.ts +11 -12
- package/package.json +2 -3
- package/dist/hongminhee__deno-mock-fetch-DJKLj_H-.js +0 -188
- package/dist/middleware-B8XTnZdu.js +0 -33
- package/dist/middleware-D-_NS4x8.js +0 -17
- /package/dist/{denokv-iB_ggPGm.js → denokv-B_GFWjrl.js} +0 -0
@@ -3,8 +3,8 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { deno_default } from "./docloader-
|
7
|
-
import { Activity } from "./vocab-
|
6
|
+
import { deno_default } from "./docloader-BXc5egq6.js";
|
7
|
+
import { Activity } from "./vocab-CaZSjoCB.js";
|
8
8
|
import { getTypeId } from "./type-D2s5lmbZ.js";
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
10
10
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
@@ -13,7 +13,7 @@ import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentele
|
|
13
13
|
var InboxListenerSet = class InboxListenerSet {
|
14
14
|
#listeners;
|
15
15
|
constructor() {
|
16
|
-
this.#listeners = new Map();
|
16
|
+
this.#listeners = /* @__PURE__ */ new Map();
|
17
17
|
}
|
18
18
|
clone() {
|
19
19
|
const clone = new InboxListenerSet();
|
@@ -89,7 +89,7 @@ async function routeActivity({ context: ctx, json, activity, recipient, inboxLis
|
|
89
89
|
activity: json,
|
90
90
|
identifier: recipient,
|
91
91
|
attempt: 0,
|
92
|
-
started: new Date().toISOString(),
|
92
|
+
started: (/* @__PURE__ */ new Date()).toISOString(),
|
93
93
|
traceContext: carrier
|
94
94
|
});
|
95
95
|
} catch (error) {
|
@@ -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-BFRgyDAa.js";
|
6
|
+
import { CryptographicKey, Object as Object$1, isActor } from "./actor-CwAL6Q82.js";
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
9
9
|
|
@@ -3,14 +3,14 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import "./docloader-
|
6
|
+
import "./docloader-BXc5egq6.js";
|
7
7
|
import "./url-kTAI6_KP.js";
|
8
8
|
import "./multibase-DeCHcK8L.js";
|
9
|
-
import "./vocab-
|
9
|
+
import "./vocab-CaZSjoCB.js";
|
10
10
|
import "./langstr-DbWheeIS.js";
|
11
|
-
import "./lookup-
|
11
|
+
import "./lookup-Ds1_3qy2.js";
|
12
12
|
import "./type-D2s5lmbZ.js";
|
13
|
-
import "./actor-
|
14
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-
|
13
|
+
import "./actor-DezwbbQX.js";
|
14
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-D0WW7EHK.js";
|
15
15
|
|
16
16
|
export { validateCryptoKey };
|
@@ -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 { CryptographicKey, Object as Object$1 } from "./vocab-
|
8
|
-
import { isActor } from "./actor-
|
6
|
+
import { deno_default, getDocumentLoader } from "./docloader-BXc5egq6.js";
|
7
|
+
import { CryptographicKey, Object as Object$1 } from "./vocab-CaZSjoCB.js";
|
8
|
+
import { isActor } from "./actor-DezwbbQX.js";
|
9
9
|
import { getLogger } from "@logtape/logtape";
|
10
10
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
11
11
|
|
@@ -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-BFRgyDAa.js";
|
6
|
+
import "./actor-CwAL6Q82.js";
|
7
|
+
import "./lookup-C8V37GPa.js";
|
8
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-CD8i4ZB_.js";
|
9
9
|
|
10
10
|
export { validateCryptoKey };
|
@@ -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-CaZSjoCB.js";
|
7
7
|
|
8
8
|
//#region federation/keycache.ts
|
9
9
|
var KvKeyCache = class {
|
@@ -14,7 +14,7 @@ var KvKeyCache = class {
|
|
14
14
|
constructor(kv, prefix, options = {}) {
|
15
15
|
this.kv = kv;
|
16
16
|
this.prefix = prefix;
|
17
|
-
this.nullKeys = new Set();
|
17
|
+
this.nullKeys = /* @__PURE__ */ new Set();
|
18
18
|
this.options = options;
|
19
19
|
}
|
20
20
|
async get(keyId) {
|
@@ -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-CaZSjoCB.js";
|
7
7
|
|
8
8
|
//#region testing/keys.ts
|
9
9
|
const rsaPublicKey1 = new CryptographicKey({
|
@@ -2,11 +2,6 @@ import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
3
|
|
4
4
|
//#region federation/kv.d.ts
|
5
|
-
/**
|
6
|
-
* A key for a key-value store. An array of one or more strings.
|
7
|
-
*
|
8
|
-
* @since 0.5.0
|
9
|
-
*/
|
10
5
|
/**
|
11
6
|
* A key for a key-value store. An array of one or more strings.
|
12
7
|
*
|
@@ -70,5 +65,6 @@ declare class MemoryKvStore implements KvStore {
|
|
70
65
|
* {@inheritDoc KvStore.delete}
|
71
66
|
*/
|
72
67
|
delete(key: KvKey): Promise<void>;
|
73
|
-
}
|
74
|
-
|
68
|
+
}
|
69
|
+
//#endregion
|
70
|
+
export { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore };
|
@@ -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-BXc5egq6.js";
|
7
|
+
import { Activity, CryptographicKey, Object as Object$1 } from "./vocab-CaZSjoCB.js";
|
8
8
|
import { getTypeId } from "./type-D2s5lmbZ.js";
|
9
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
9
|
+
import { fetchKey, validateCryptoKey } from "./key-D0WW7EHK.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";
|
@@ -52,7 +52,7 @@ async function createSignature(jsonLd, privateKey, keyId, { contextLoader, creat
|
|
52
52
|
const options = {
|
53
53
|
"@context": "https://w3id.org/identity/v1",
|
54
54
|
creator: keyId.href,
|
55
|
-
created: created?.toString() ?? new Date().toISOString()
|
55
|
+
created: created?.toString() ?? (/* @__PURE__ */ new Date()).toISOString()
|
56
56
|
};
|
57
57
|
const optionsHash = await hashJsonLd(options, contextLoader);
|
58
58
|
const docHash = await hashJsonLd(jsonLd, contextLoader);
|
@@ -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-BFRgyDAa.js";
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
8
8
|
|
@@ -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-BXc5egq6.js";
|
7
|
+
import { Object as Object$1 } from "./vocab-CaZSjoCB.js";
|
8
|
+
import { lookupWebFinger } from "./lookup-Ds1_3qy2.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,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-BXc5egq6.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";
|
@@ -1,13 +1,9 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { GetUserAgentOptions } from "./docloader-
|
3
|
+
import { GetUserAgentOptions } from "./docloader-DlUDOVSe.js";
|
4
4
|
import { TracerProvider } from "@opentelemetry/api";
|
5
5
|
|
6
6
|
//#region webfinger/jrd.d.ts
|
7
|
-
/**
|
8
|
-
* Describes a resource. See also
|
9
|
-
* [RFC 7033 section 4.4](https://datatracker.ietf.org/doc/html/rfc7033#section-4.4).
|
10
|
-
*/
|
11
7
|
/**
|
12
8
|
* Describes a resource. See also
|
13
9
|
* [RFC 7033 section 4.4](https://datatracker.ietf.org/doc/html/rfc7033#section-4.4).
|
@@ -58,7 +54,8 @@ interface Link {
|
|
58
54
|
* Conveys additional information about the link relation.
|
59
55
|
*/
|
60
56
|
properties?: Record<string, string>;
|
61
|
-
}
|
57
|
+
}
|
58
|
+
//#endregion
|
62
59
|
//#region webfinger/lookup.d.ts
|
63
60
|
/**
|
64
61
|
* Options for {@link lookupWebFinger}.
|
@@ -95,6 +92,5 @@ interface LookupWebFingerOptions {
|
|
95
92
|
* @since 0.2.0
|
96
93
|
*/
|
97
94
|
declare function lookupWebFinger(resource: URL | string, options?: LookupWebFingerOptions): Promise<ResourceDescriptor | null>;
|
98
|
-
|
99
95
|
//#endregion
|
100
|
-
export { Link
|
96
|
+
export { Link, LookupWebFingerOptions, ResourceDescriptor, lookupWebFinger };
|
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
|
5
|
+
import "./transformers-ghwJuzGY.js";
|
6
|
+
import "./docloader-BFRgyDAa.js";
|
7
|
+
import "./actor-CwAL6Q82.js";
|
8
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-Jvf6WsMN.js";
|
9
|
+
import "./lookup-C8V37GPa.js";
|
10
|
+
import "./key-CD8i4ZB_.js";
|
11
|
+
import "./http-DC3mY9EG.js";
|
12
|
+
import "./proof-D-CWdNQx.js";
|
13
|
+
import "./types-D3XNqpGz.js";
|
14
|
+
import "./authdocloader-Df1y1MKv.js";
|
15
|
+
import "./vocab-CPrCb9BR.js";
|
16
|
+
|
17
|
+
export { FederationImpl };
|
@@ -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-
|
6
|
+
import { deno_default, getDocumentLoader, kvCache } from "./docloader-BXc5egq6.js";
|
7
|
+
import { getNodeInfo } from "./client-CwjvB-Dh.js";
|
8
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-CaZSjoCB.js";
|
11
|
+
import { lookupWebFinger } from "./lookup-Ds1_3qy2.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-
|
22
|
-
import { buildCollectionSynchronizationHeader } from "./collection-
|
23
|
-
import { KvKeyCache } from "./keycache-
|
13
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-D0WW7EHK.js";
|
14
|
+
import { verifyRequest } from "./http-3CJyDlPz.js";
|
15
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-C-_Lr-KH.js";
|
16
|
+
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-D4G5WL1G.js";
|
17
|
+
import { doesActorOwnKey, getKeyOwner } from "./owner-Dyk0zd-q.js";
|
18
|
+
import { signObject, verifyObject } from "./proof-B8Hm2M5c.js";
|
19
|
+
import { lookupObject, traverseCollection } from "./lookup-CQnVHXIh.js";
|
20
|
+
import { routeActivity } from "./inbox-CCbuuUqY.js";
|
21
|
+
import { FederationBuilderImpl } from "./builder-C8tsk_Xe.js";
|
22
|
+
import { buildCollectionSynchronizationHeader } from "./collection-Dfb0TPno.js";
|
23
|
+
import { KvKeyCache } from "./keycache-BtADunPo.js";
|
24
24
|
import { createExponentialBackoffPolicy } from "./retry-BiIhZWgD.js";
|
25
|
-
import { extractInboxes, sendActivity } from "./send-
|
25
|
+
import { extractInboxes, sendActivity } from "./send-CJXTH3ST.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";
|
@@ -1452,7 +1452,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
1452
1452
|
activityType: getTypeId(activity).href,
|
1453
1453
|
inbox,
|
1454
1454
|
sharedInbox: inboxes[inbox].sharedInbox,
|
1455
|
-
started: new Date().toISOString(),
|
1455
|
+
started: (/* @__PURE__ */ new Date()).toISOString(),
|
1456
1456
|
attempt: 0,
|
1457
1457
|
headers: collectionSync == null ? {} : { "Collection-Synchronization": await buildCollectionSynchronizationHeader(collectionSync, inboxes[inbox].actorIds) },
|
1458
1458
|
traceContext: carrier
|
@@ -2573,7 +2573,7 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
2573
2573
|
activityType: this.activityType,
|
2574
2574
|
inbox,
|
2575
2575
|
sharedInbox: inboxes[inbox].sharedInbox,
|
2576
|
-
started: new Date().toISOString(),
|
2576
|
+
started: (/* @__PURE__ */ new Date()).toISOString(),
|
2577
2577
|
attempt: 0,
|
2578
2578
|
headers: {},
|
2579
2579
|
traceContext: carrier
|
@@ -2,16 +2,16 @@
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
|
-
import { getDefaultActivityTransformers
|
6
|
-
import { deno_default, getDocumentLoader, kvCache } from "./docloader-
|
7
|
-
import { Activity, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId
|
8
|
-
import { lookupWebFinger } from "./lookup-
|
9
|
-
import { exportJwk, importJwk, validateCryptoKey } from "./key-
|
10
|
-
import { doubleKnock, verifyRequest } from "./http-
|
11
|
-
import { detachSignature
|
12
|
-
import { getNodeInfo, nodeInfoToJson } from "./types-
|
13
|
-
import { getAuthenticatedDocumentLoader
|
14
|
-
import { lookupObject, traverseCollection } from "./vocab-
|
5
|
+
import { getDefaultActivityTransformers } from "./transformers-ghwJuzGY.js";
|
6
|
+
import { deno_default, getDocumentLoader, kvCache } from "./docloader-BFRgyDAa.js";
|
7
|
+
import { Activity, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId } from "./actor-CwAL6Q82.js";
|
8
|
+
import { lookupWebFinger } from "./lookup-C8V37GPa.js";
|
9
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-CD8i4ZB_.js";
|
10
|
+
import { doubleKnock, verifyRequest } from "./http-DC3mY9EG.js";
|
11
|
+
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-D-CWdNQx.js";
|
12
|
+
import { getNodeInfo, nodeInfoToJson } from "./types-D3XNqpGz.js";
|
13
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-Df1y1MKv.js";
|
14
|
+
import { lookupObject, traverseCollection } from "./vocab-CPrCb9BR.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";
|
@@ -25,7 +25,7 @@ import { domainToASCII } from "node:url";
|
|
25
25
|
var InboxListenerSet = class InboxListenerSet {
|
26
26
|
#listeners;
|
27
27
|
constructor() {
|
28
|
-
this.#listeners = new Map();
|
28
|
+
this.#listeners = /* @__PURE__ */ new Map();
|
29
29
|
}
|
30
30
|
clone() {
|
31
31
|
const clone = new InboxListenerSet();
|
@@ -101,7 +101,7 @@ async function routeActivity({ context: ctx, json, activity, recipient, inboxLis
|
|
101
101
|
activity: json,
|
102
102
|
identifier: recipient,
|
103
103
|
attempt: 0,
|
104
|
-
started: new Date().toISOString(),
|
104
|
+
started: (/* @__PURE__ */ new Date()).toISOString(),
|
105
105
|
traceContext: carrier
|
106
106
|
});
|
107
107
|
} catch (error) {
|
@@ -312,7 +312,7 @@ var FederationBuilderImpl = class {
|
|
312
312
|
this.objectTypeIds = {};
|
313
313
|
}
|
314
314
|
async build(options) {
|
315
|
-
const { FederationImpl: FederationImpl$1 } = await import("./middleware-
|
315
|
+
const { FederationImpl: FederationImpl$1 } = await import("./middleware-DPuaf71I.js");
|
316
316
|
const f = new FederationImpl$1(options);
|
317
317
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
318
318
|
f.router = this.router.clone();
|
@@ -776,7 +776,7 @@ function createFederationBuilder() {
|
|
776
776
|
* @returns The digest.
|
777
777
|
*/
|
778
778
|
async function digest(uris) {
|
779
|
-
const processed = new Set();
|
779
|
+
const processed = /* @__PURE__ */ new Set();
|
780
780
|
const encoder = new TextEncoder();
|
781
781
|
const result = new Uint8Array(32);
|
782
782
|
for (const uri of uris) {
|
@@ -817,7 +817,7 @@ var KvKeyCache = class {
|
|
817
817
|
constructor(kv, prefix, options = {}) {
|
818
818
|
this.kv = kv;
|
819
819
|
this.prefix = prefix;
|
820
|
-
this.nullKeys = new Set();
|
820
|
+
this.nullKeys = /* @__PURE__ */ new Set();
|
821
821
|
this.options = options;
|
822
822
|
}
|
823
823
|
async get(keyId) {
|
@@ -1649,7 +1649,7 @@ function extractInboxes({ recipients, preferSharedInbox, excludeBaseUris }) {
|
|
1649
1649
|
if (inbox != null && recipient.id != null) {
|
1650
1650
|
if (excludeBaseUris != null && excludeBaseUris.some((u) => u.origin === inbox?.origin)) continue;
|
1651
1651
|
inboxes[inbox.href] ??= {
|
1652
|
-
actorIds: new Set(),
|
1652
|
+
actorIds: /* @__PURE__ */ new Set(),
|
1653
1653
|
sharedInbox
|
1654
1654
|
};
|
1655
1655
|
inboxes[inbox.href].actorIds.add(recipient.id.href);
|
@@ -2317,7 +2317,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
2317
2317
|
activityType: getTypeId(activity).href,
|
2318
2318
|
inbox,
|
2319
2319
|
sharedInbox: inboxes[inbox].sharedInbox,
|
2320
|
-
started: new Date().toISOString(),
|
2320
|
+
started: (/* @__PURE__ */ new Date()).toISOString(),
|
2321
2321
|
attempt: 0,
|
2322
2322
|
headers: collectionSync == null ? {} : { "Collection-Synchronization": await buildCollectionSynchronizationHeader(collectionSync, inboxes[inbox].actorIds) },
|
2323
2323
|
traceContext: carrier
|
@@ -3438,7 +3438,7 @@ var InboxContextImpl = class InboxContextImpl extends ContextImpl {
|
|
3438
3438
|
activityType: this.activityType,
|
3439
3439
|
inbox,
|
3440
3440
|
sharedInbox: inboxes[inbox].sharedInbox,
|
3441
|
-
started: new Date().toISOString(),
|
3441
|
+
started: (/* @__PURE__ */ new Date()).toISOString(),
|
3442
3442
|
attempt: 0,
|
3443
3443
|
headers: {},
|
3444
3444
|
traceContext: carrier
|
@@ -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-DRpRVwO7.js";
|
7
|
+
import "./docloader-BXc5egq6.js";
|
8
|
+
import "./url-kTAI6_KP.js";
|
9
|
+
import "./semver-CbbIgUsa.js";
|
10
|
+
import "./client-CwjvB-Dh.js";
|
11
|
+
import "./router-D_aVZZUc.js";
|
12
|
+
import "./types-CqoqWDkp.js";
|
13
|
+
import "./multibase-DeCHcK8L.js";
|
14
|
+
import "./vocab-CaZSjoCB.js";
|
15
|
+
import "./langstr-DbWheeIS.js";
|
16
|
+
import "./lookup-Ds1_3qy2.js";
|
17
|
+
import "./type-D2s5lmbZ.js";
|
18
|
+
import "./actor-DezwbbQX.js";
|
19
|
+
import "./key-D0WW7EHK.js";
|
20
|
+
import "./http-3CJyDlPz.js";
|
21
|
+
import "./authdocloader-C-_Lr-KH.js";
|
22
|
+
import "./ld-D4G5WL1G.js";
|
23
|
+
import "./owner-Dyk0zd-q.js";
|
24
|
+
import "./proof-B8Hm2M5c.js";
|
25
|
+
import "./lookup-CQnVHXIh.js";
|
26
|
+
import "./inbox-CCbuuUqY.js";
|
27
|
+
import "./builder-C8tsk_Xe.js";
|
28
|
+
import "./collection-Dfb0TPno.js";
|
29
|
+
import "./keycache-BtADunPo.js";
|
30
|
+
import "./retry-BiIhZWgD.js";
|
31
|
+
import "./send-CJXTH3ST.js";
|
32
|
+
|
33
|
+
export { FederationImpl };
|
@@ -1,15 +1,10 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { DocumentLoader, DocumentLoaderFactoryOptions } from "./docloader-
|
4
|
-
import { HttpMessageSignaturesSpecDeterminer } from "./http-
|
3
|
+
import { DocumentLoader, DocumentLoaderFactoryOptions } from "./docloader-DlUDOVSe.js";
|
4
|
+
import { HttpMessageSignaturesSpecDeterminer } from "./http-BkUCISGt.js";
|
5
5
|
import { TracerProvider } from "@opentelemetry/api";
|
6
6
|
|
7
7
|
//#region runtime/authdocloader.d.ts
|
8
|
-
/**
|
9
|
-
* Options for {@link getAuthenticatedDocumentLoader}.
|
10
|
-
* @see {@link getAuthenticatedDocumentLoader}
|
11
|
-
* @since 1.3.0
|
12
|
-
*/
|
13
8
|
/**
|
14
9
|
* Options for {@link getAuthenticatedDocumentLoader}.
|
15
10
|
* @see {@link getAuthenticatedDocumentLoader}
|
@@ -51,7 +46,6 @@ declare function getAuthenticatedDocumentLoader(identity: {
|
|
51
46
|
specDeterminer,
|
52
47
|
tracerProvider
|
53
48
|
}?: GetAuthenticatedDocumentLoaderOptions): DocumentLoader;
|
54
|
-
|
55
49
|
//#endregion
|
56
50
|
//#region runtime/key.d.ts
|
57
51
|
/**
|
@@ -106,6 +100,5 @@ declare function importMultibaseKey(key: string): Promise<CryptoKey>;
|
|
106
100
|
* @since 0.10.0
|
107
101
|
*/
|
108
102
|
declare function exportMultibaseKey(key: CryptoKey): Promise<string>;
|
109
|
-
|
110
103
|
//#endregion
|
111
104
|
export { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki };
|
@@ -1,15 +1,11 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { DocumentLoader } from "./docloader-
|
4
|
-
import { CryptographicKey
|
5
|
-
import { KeyCache } from "./http-
|
3
|
+
import { DocumentLoader } from "./docloader-DlUDOVSe.js";
|
4
|
+
import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "./vocab-DSFLLLe6.js";
|
5
|
+
import { KeyCache } from "./http-BkUCISGt.js";
|
6
6
|
import { TracerProvider } from "@opentelemetry/api";
|
7
7
|
|
8
8
|
//#region sig/ld.d.ts
|
9
|
-
/**
|
10
|
-
* A signature of a JSON-LD document.
|
11
|
-
* @since 1.0.0
|
12
|
-
*/
|
13
9
|
/**
|
14
10
|
* A signature of a JSON-LD document.
|
15
11
|
* @since 1.0.0
|
@@ -146,7 +142,8 @@ interface VerifyJsonLdOptions extends VerifySignatureOptions {}
|
|
146
142
|
* @param options Options for verifying the document.
|
147
143
|
* @returns `true` if the document is authentic; `false` otherwise.
|
148
144
|
*/
|
149
|
-
declare function verifyJsonLd(jsonLd: unknown, options?: VerifyJsonLdOptions): Promise<boolean>;
|
145
|
+
declare function verifyJsonLd(jsonLd: unknown, options?: VerifyJsonLdOptions): Promise<boolean>;
|
146
|
+
//#endregion
|
150
147
|
//#region sig/proof.d.ts
|
151
148
|
/**
|
152
149
|
* Options for {@link createProof}.
|
@@ -267,6 +264,5 @@ interface VerifyObjectOptions extends VerifyProofOptions {}
|
|
267
264
|
declare function verifyObject<T extends Object$1>(cls: (new (...args: any[]) => T) & {
|
268
265
|
fromJsonLd(jsonLd: unknown, options: VerifyObjectOptions): Promise<T>;
|
269
266
|
}, jsonLd: unknown, options?: VerifyObjectOptions): Promise<T | null>;
|
270
|
-
|
271
267
|
//#endregion
|
272
268
|
export { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature };
|
@@ -1,27 +1,10 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { Activity
|
4
|
-
import { ActivityTransformer, Context } from "./context-
|
3
|
+
import { Activity } from "./vocab-DSFLLLe6.js";
|
4
|
+
import { ActivityTransformer, Context } from "./context-DRhhOsMk.js";
|
5
5
|
|
6
6
|
//#region compat/transformers.d.ts
|
7
|
-
|
8
|
-
* An activity transformer that assigns a new random ID to an activity if it
|
9
|
-
* does not already have one. This is useful for ensuring that activities
|
10
|
-
* have an ID before they are sent to other servers.
|
11
|
-
*
|
12
|
-
* The generated ID is an origin URI with a fragment which contains an activity
|
13
|
-
* type name with a random UUID:
|
14
|
-
*
|
15
|
-
* ```
|
16
|
-
* https://example.com/#Follow/12345678-1234-5678-1234-567812345678
|
17
|
-
* ```
|
18
|
-
*
|
19
|
-
* @typeParam TContextData The type of the context data.
|
20
|
-
* @param activity The activity to assign an ID to.
|
21
|
-
* @param context The context of the activity.
|
22
|
-
* @return The activity with an ID assigned.
|
23
|
-
* @since 1.4.0
|
24
|
-
*/
|
7
|
+
|
25
8
|
/**
|
26
9
|
* An activity transformer that assigns a new random ID to an activity if it
|
27
10
|
* does not already have one. This is useful for ensuring that activities
|
@@ -95,6 +78,5 @@ declare function actorDehydrator<TContextData>(activity: Activity, _context: Con
|
|
95
78
|
* @since 1.4.0
|
96
79
|
*/
|
97
80
|
declare function getDefaultActivityTransformers<TContextData>(): readonly ActivityTransformer<TContextData>[];
|
98
|
-
|
99
81
|
//#endregion
|
100
82
|
export { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers };
|
@@ -1,15 +1,10 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { DocumentLoader, GetUserAgentOptions } from "./docloader-
|
4
|
-
import { Collection
|
3
|
+
import { DocumentLoader, GetUserAgentOptions } from "./docloader-DlUDOVSe.js";
|
4
|
+
import { Collection, Link, Object as Object$1 } from "./vocab-DSFLLLe6.js";
|
5
5
|
import { TracerProvider } from "@opentelemetry/api";
|
6
6
|
|
7
7
|
//#region vocab/lookup.d.ts
|
8
|
-
/**
|
9
|
-
* Options for the {@link lookupObject} function.
|
10
|
-
*
|
11
|
-
* @since 0.2.0
|
12
|
-
*/
|
13
8
|
/**
|
14
9
|
* Options for the {@link lookupObject} function.
|
15
10
|
*
|
@@ -119,7 +114,8 @@ interface TraverseCollectionOptions {
|
|
119
114
|
* @returns An async iterable of each item in the collection.
|
120
115
|
* @since 1.1.0
|
121
116
|
*/
|
122
|
-
declare function traverseCollection(collection: Collection, options?: TraverseCollectionOptions): AsyncIterable<Object$1 | Link>;
|
117
|
+
declare function traverseCollection(collection: Collection, options?: TraverseCollectionOptions): AsyncIterable<Object$1 | Link>;
|
118
|
+
//#endregion
|
123
119
|
//#region vocab/constants.d.ts
|
124
120
|
/**
|
125
121
|
* The special public collection for [public addressing]. *Do not mutate this
|
@@ -130,7 +126,6 @@ declare function traverseCollection(collection: Collection, options?: TraverseCo
|
|
130
126
|
* @since 0.7.0
|
131
127
|
*/
|
132
128
|
declare const PUBLIC_COLLECTION: URL;
|
133
|
-
|
134
129
|
//#endregion
|
135
130
|
//#region vocab/type.d.ts
|
136
131
|
/**
|
@@ -213,6 +208,5 @@ declare function getTypeId(object: Object$1 | Link | null): URL | null;
|
|
213
208
|
* @since 1.3.0
|
214
209
|
*/
|
215
210
|
declare function getTypeId(object: Object$1 | Link | null | undefined): URL | null | undefined;
|
216
|
-
|
217
211
|
//#endregion
|
218
|
-
export { LookupObjectOptions, PUBLIC_COLLECTION
|
212
|
+
export { LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, lookupObject, traverseCollection };
|