@fedify/fedify 1.7.5 → 1.8.0-dev.1003
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/LICENSE +20 -0
- package/README.md +33 -0
- package/dist/{actor-CPpvuBKU.d.ts → actor-B4TBtqRP.d.ts} +2 -2
- package/dist/{actor-CKXuhyRT.js → actor-CESvGo9c.js} +179 -179
- package/dist/{actor-D-zfQLAH.js → actor-CqSuisvH.js} +3 -3
- package/dist/{assert-0DSnLFa8.js → assert-DwEa6glZ.js} +2 -2
- package/dist/{assert_equals-XhPMqqO2.js → assert_equals-C5gKCm6A.js} +10 -22
- package/dist/{assert_instance_of-v5adm_-K.js → assert_instance_of-C9QtN-X9.js} +2 -2
- package/dist/{assert_is_error-Drwb_yQp.js → assert_is_error-DQdKoRgb.js} +2 -2
- package/dist/{assert_not_equals-BRPdeJ9D.js → assert_not_equals-7pyUM3Ib.js} +2 -2
- package/dist/{assert_rejects-D_nYI1gs.js → assert_rejects-DceVjUlD.js} +4 -4
- package/dist/{assert_throws-DNuPhPNp.js → assert_throws-DTDC_gwN.js} +3 -3
- package/dist/{authdocloader-CFk80WJv.js → authdocloader-QSRLyapW.js} +3 -3
- package/dist/{authdocloader-81r40Meg.js → authdocloader-rYXZAJDf.js} +3 -3
- package/dist/{builder-Cmn0cpiZ.js → builder-rGWE83Jn.js} +4 -4
- package/dist/{client-CuYHcL1K.js → client-B3xo9NFO.js} +1 -1
- package/dist/{client-DvtwXO7t.d.ts → client-BQ4AQGKo.d.ts} +1 -1
- package/dist/compat/mod.d.ts +11 -11
- package/dist/compat/transformers.test.js +22 -22
- package/dist/{context-DPggmpB4.d.ts → context-CrSyJrIa.d.ts} +9 -9
- package/dist/{context-CFiKyaR_.js → context-T6ATmy_o.js} +3 -3
- package/dist/{denokv-CvROlGYX.js → denokv-QWKsIqML.js} +2 -0
- package/dist/{docloader-Q42SMRIB.d.ts → docloader-BeCtcTOJ.d.ts} +1 -1
- package/dist/{docloader-BLY7GyoJ.js → docloader-Coh6BBtD.js} +5 -13
- package/dist/{docloader-Ck2GBnC3.js → docloader-DP2c5RKR.js} +5 -13
- package/dist/{esm-CASHO3OR.js → esm-d-9EVGaP.js} +14 -14
- package/dist/federation/builder.test.js +14 -14
- package/dist/federation/collection.test.js +8 -8
- package/dist/federation/handler.test.js +29 -29
- package/dist/federation/inbox.test.js +6 -6
- package/dist/federation/keycache.test.js +7 -7
- package/dist/federation/kv.test.js +21 -9
- package/dist/federation/middleware.test.js +644 -630
- package/dist/federation/mod.d.ts +10 -10
- package/dist/federation/mod.js +11 -11
- package/dist/federation/mq.test.js +11 -11
- 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-BRIQn-GV.js → federation-C44ekWNP.js} +28 -6
- package/dist/{http-B8EiSgi2.d.ts → http-CP2ZUALI.d.ts} +2 -2
- package/dist/{http-Cmpdwx_X.js → http-CkfVl7ql.js} +3 -3
- package/dist/{http-B6yJ2mAf.js → http-lmPPO2Eo.js} +3 -3
- package/dist/{inbox-CcAueP-r.js → inbox-CF21yedu.js} +2 -2
- package/dist/{key-BAckFVRH.js → key-BLqpPTN_.js} +3 -3
- package/dist/{key-D1uKqeD5.js → key-BjUOfK1Q.js} +2 -2
- package/dist/{key-Cj0F3jFv.js → key-CSLD2uRf.js} +4 -4
- package/dist/{key-rZ_Yr0Yr.js → key-NY6yQihW.js} +5 -5
- package/dist/{keycache-Ce9ou6p4.js → keycache-yqwT_M3m.js} +1 -1
- package/dist/{keys-DcrALCdq.js → keys-D9Gc5bvV.js} +1 -1
- package/dist/{kv-BMY6Qf_A.js → kv-D7Yt6pnB.js} +22 -0
- package/dist/{kv-DRaeSXco.d.ts → kv-DDdb1hMa.d.ts} +14 -0
- package/dist/{ld-S8bkC8Cg.js → ld-zsHn8nfn.js} +3 -3
- package/dist/{lookup-CQ5H1v6m.js → lookup-BYgWjDk7.js} +4 -3
- package/dist/{lookup-DW0leLqq.js → lookup-BlRxqykX.js} +62 -10
- package/dist/{lookup-DNZf9_oN.js → lookup-DU2MRGYe.js} +4 -3
- package/dist/{lookup-Bf-K85bV.d.ts → lookup-J_m4YZg0.d.ts} +7 -1
- package/dist/{middleware-Ba2-qvzk.js → middleware-BmxgK7wV.js} +11 -11
- package/dist/middleware-CILojq-d.js +17 -0
- package/dist/{middleware-CrCDov2d.js → middleware-CkV-ui-y.js} +16 -16
- package/dist/middleware-NVGAT7X_.js +33 -0
- package/dist/{mod-CDzlVCUF.d.ts → mod-BFwgZ7_K.d.ts} +77 -3
- package/dist/{mod-C2drFqH8.d.ts → mod-CytXBx8A.d.ts} +2 -2
- package/dist/{mod-sEI6_uZ2.d.ts → mod-D2uPZuP-.d.ts} +3 -3
- package/dist/{mod-CbjCOiVh.d.ts → mod-DpE8T10I.d.ts} +2 -2
- package/dist/mod.d.ts +14 -14
- package/dist/mod.js +12 -12
- package/dist/nodeinfo/client.test.js +11 -11
- package/dist/nodeinfo/handler.test.js +28 -28
- 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-D0cOz8R5.d.ts → owner-CEv_PfyK.d.ts} +3 -3
- package/dist/{owner-B5IFvDCy.js → owner-yriwUrxg.js} +3 -3
- package/dist/{proof-C6nF-oYD.js → proof-B0keqm8m.js} +3 -3
- package/dist/{proof-CnQWIl9G.js → proof-CTzg7mvj.js} +3 -3
- package/dist/{router-D_aVZZUc.js → router-D3UybECj.js} +1 -1
- package/dist/runtime/authdocloader.test.js +17 -17
- package/dist/runtime/docloader.test.js +11 -11
- 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-IlYZ_CVt.js → send-CdU_Vjiy.js} +2 -2
- package/dist/sig/http.test.js +16 -16
- 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-CmyZxqPw.js → std__assert-B3iAixc-.js} +6 -6
- package/dist/testing/docloader.test.js +8 -8
- package/dist/{types-BAIE7lzA.js → types-D9EP9eEB.js} +1 -1
- package/dist/vocab/actor.test.js +197 -190
- package/dist/vocab/lookup.test.js +13 -13
- package/dist/vocab/mod.d.ts +6 -6
- package/dist/vocab/mod.js +5 -5
- package/dist/vocab/type.test.js +3 -3
- package/dist/vocab/vocab.test.js +128 -110
- package/dist/{vocab-BdvvrpJb.js → vocab-BFfwVBw7.js} +84 -11
- package/dist/{vocab-CzEfWQk2.d.ts → vocab-By6mpzr-.d.ts} +1 -1
- package/dist/{vocab-Cs1Xg69m.js → vocab-Df91ohvp.js} +178 -178
- package/dist/webfinger/handler.test.js +28 -28
- package/dist/webfinger/lookup.test.js +30 -12
- package/dist/webfinger/mod.d.ts +3 -3
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.d.ts +6 -1
- package/dist/x/cfworkers.js +5 -0
- package/dist/x/cfworkers.test.js +14 -9
- package/dist/x/hono.d.ts +10 -10
- package/dist/x/sveltekit.d.ts +10 -10
- package/package.json +7 -6
- package/dist/middleware-BBLmcWi8.js +0 -33
- package/dist/middleware-OQqgTYLn.js +0 -17
@@ -1,6 +1,6 @@
|
|
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-BeCtcTOJ.js";
|
4
4
|
import { TracerProvider } from "@opentelemetry/api";
|
5
5
|
|
6
6
|
//#region webfinger/jrd.d.ts
|
@@ -78,6 +78,12 @@ interface LookupWebFingerOptions {
|
|
78
78
|
* @since 1.4.0
|
79
79
|
*/
|
80
80
|
allowPrivateAddress?: boolean;
|
81
|
+
/**
|
82
|
+
* The maximum number of redirections to follow.
|
83
|
+
* @default `5`
|
84
|
+
* @since 1.8.0
|
85
|
+
*/
|
86
|
+
maxRedirection?: number;
|
81
87
|
/**
|
82
88
|
* The OpenTelemetry tracer provider. If omitted, the global tracer provider
|
83
89
|
* is used.
|
@@ -3,19 +3,19 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
|
5
5
|
import { getDefaultActivityTransformers } from "./transformers-ghwJuzGY.js";
|
6
|
-
import { deno_default, getDocumentLoader, kvCache } from "./docloader-
|
7
|
-
import { Activity, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId } from "./actor-
|
8
|
-
import { lookupWebFinger } from "./lookup-
|
9
|
-
import { exportJwk, importJwk, validateCryptoKey } from "./key-
|
10
|
-
import { doubleKnock, verifyRequest } from "./http-
|
11
|
-
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-
|
12
|
-
import { getNodeInfo, nodeInfoToJson } from "./types-
|
13
|
-
import { getAuthenticatedDocumentLoader } from "./authdocloader-
|
14
|
-
import { lookupObject, traverseCollection } from "./vocab-
|
6
|
+
import { deno_default, getDocumentLoader, kvCache } from "./docloader-DP2c5RKR.js";
|
7
|
+
import { Activity, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId } from "./actor-CESvGo9c.js";
|
8
|
+
import { lookupWebFinger } from "./lookup-BYgWjDk7.js";
|
9
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-BjUOfK1Q.js";
|
10
|
+
import { doubleKnock, verifyRequest } from "./http-lmPPO2Eo.js";
|
11
|
+
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-B0keqm8m.js";
|
12
|
+
import { getNodeInfo, nodeInfoToJson } from "./types-D9EP9eEB.js";
|
13
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-QSRLyapW.js";
|
14
|
+
import { lookupObject, traverseCollection } from "./vocab-BFfwVBw7.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 "
|
18
|
+
import { cloneDeep } from "es-toolkit";
|
19
19
|
import { Router } from "uri-template-router";
|
20
20
|
import { parseTemplate } from "url-template";
|
21
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";
|
@@ -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-CILojq-d.js");
|
316
316
|
const f = new FederationImpl$1(options);
|
317
317
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
318
318
|
f.router = this.router.clone();
|
@@ -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-DP2c5RKR.js";
|
7
|
+
import "./actor-CESvGo9c.js";
|
8
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-BmxgK7wV.js";
|
9
|
+
import "./lookup-BYgWjDk7.js";
|
10
|
+
import "./key-BjUOfK1Q.js";
|
11
|
+
import "./http-lmPPO2Eo.js";
|
12
|
+
import "./proof-B0keqm8m.js";
|
13
|
+
import "./types-D9EP9eEB.js";
|
14
|
+
import "./authdocloader-QSRLyapW.js";
|
15
|
+
import "./vocab-BFfwVBw7.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-
|
8
|
-
import { RouterError } from "./router-
|
6
|
+
import { deno_default, getDocumentLoader, kvCache } from "./docloader-Coh6BBtD.js";
|
7
|
+
import { getNodeInfo } from "./client-B3xo9NFO.js";
|
8
|
+
import { RouterError } from "./router-D3UybECj.js";
|
9
9
|
import { nodeInfoToJson } from "./types-C7C_l-jz.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-Df91ohvp.js";
|
11
|
+
import { lookupWebFinger } from "./lookup-DU2MRGYe.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-BLqpPTN_.js";
|
14
|
+
import { verifyRequest } from "./http-CkfVl7ql.js";
|
15
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-rYXZAJDf.js";
|
16
|
+
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-zsHn8nfn.js";
|
17
|
+
import { doesActorOwnKey, getKeyOwner } from "./owner-yriwUrxg.js";
|
18
|
+
import { signObject, verifyObject } from "./proof-CTzg7mvj.js";
|
19
|
+
import { lookupObject, traverseCollection } from "./lookup-BlRxqykX.js";
|
20
|
+
import { routeActivity } from "./inbox-CF21yedu.js";
|
21
|
+
import { FederationBuilderImpl } from "./builder-rGWE83Jn.js";
|
22
22
|
import { buildCollectionSynchronizationHeader } from "./collection-Dfb0TPno.js";
|
23
|
-
import { KvKeyCache } from "./keycache-
|
23
|
+
import { KvKeyCache } from "./keycache-yqwT_M3m.js";
|
24
24
|
import { createExponentialBackoffPolicy } from "./retry-BiIhZWgD.js";
|
25
|
-
import { extractInboxes, sendActivity } from "./send-
|
25
|
+
import { extractInboxes, sendActivity } from "./send-CdU_Vjiy.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-CkV-ui-y.js";
|
7
|
+
import "./docloader-Coh6BBtD.js";
|
8
|
+
import "./url-kTAI6_KP.js";
|
9
|
+
import "./semver-DWClQt_5.js";
|
10
|
+
import "./client-B3xo9NFO.js";
|
11
|
+
import "./router-D3UybECj.js";
|
12
|
+
import "./types-C7C_l-jz.js";
|
13
|
+
import "./multibase-DeCHcK8L.js";
|
14
|
+
import "./vocab-Df91ohvp.js";
|
15
|
+
import "./langstr-DbWheeIS.js";
|
16
|
+
import "./lookup-DU2MRGYe.js";
|
17
|
+
import "./type-D2s5lmbZ.js";
|
18
|
+
import "./actor-CqSuisvH.js";
|
19
|
+
import "./key-BLqpPTN_.js";
|
20
|
+
import "./http-CkfVl7ql.js";
|
21
|
+
import "./authdocloader-rYXZAJDf.js";
|
22
|
+
import "./ld-zsHn8nfn.js";
|
23
|
+
import "./owner-yriwUrxg.js";
|
24
|
+
import "./proof-CTzg7mvj.js";
|
25
|
+
import "./lookup-BlRxqykX.js";
|
26
|
+
import "./inbox-CF21yedu.js";
|
27
|
+
import "./builder-rGWE83Jn.js";
|
28
|
+
import "./collection-Dfb0TPno.js";
|
29
|
+
import "./keycache-yqwT_M3m.js";
|
30
|
+
import "./retry-BiIhZWgD.js";
|
31
|
+
import "./send-CdU_Vjiy.js";
|
32
|
+
|
33
|
+
export { FederationImpl };
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { DocumentLoader, GetUserAgentOptions } from "./docloader-
|
4
|
-
import { Collection, Link, Object as Object$1 } from "./vocab-
|
3
|
+
import { DocumentLoader, GetUserAgentOptions } from "./docloader-BeCtcTOJ.js";
|
4
|
+
import { Collection, Link, Object as Object$1 } from "./vocab-By6mpzr-.js";
|
5
5
|
import { TracerProvider } from "@opentelemetry/api";
|
6
6
|
|
7
7
|
//#region vocab/lookup.d.ts
|
@@ -127,6 +127,80 @@ declare function traverseCollection(collection: Collection, options?: TraverseCo
|
|
127
127
|
*/
|
128
128
|
declare const PUBLIC_COLLECTION: URL;
|
129
129
|
//#endregion
|
130
|
+
//#region vocab/handle.d.ts
|
131
|
+
/**
|
132
|
+
* Represents a fediverse handle, which consists of a username and a host.
|
133
|
+
* The username can be alphanumeric and may include special characters,
|
134
|
+
* while the host is typically a domain name.
|
135
|
+
* @since 1.8.0
|
136
|
+
*/
|
137
|
+
interface FediverseHandle {
|
138
|
+
/**
|
139
|
+
* The username part of the fediverse handle.
|
140
|
+
* It can include alphanumeric characters and some special characters.
|
141
|
+
*/
|
142
|
+
readonly username: string;
|
143
|
+
/**
|
144
|
+
* The host part of the fediverse handle, typically a domain name.
|
145
|
+
* It is the part after the `@` symbol in the handle.
|
146
|
+
*/
|
147
|
+
readonly host: string;
|
148
|
+
}
|
149
|
+
/**
|
150
|
+
* Parses a fediverse handle in the format `@user@server` or `user@server`.
|
151
|
+
* The `user` part can contain alphanumeric characters and some special
|
152
|
+
* characters except `@`. The `server` part is all characters after the `@`
|
153
|
+
* symbol in the middle.
|
154
|
+
*
|
155
|
+
* @example
|
156
|
+
* ```typescript
|
157
|
+
* const handle = parseFediverseHandle("@username@example.com");
|
158
|
+
* console.log(handle?.username); // "username"
|
159
|
+
* console.log(handle?.host); // "example.com"
|
160
|
+
* ```
|
161
|
+
*
|
162
|
+
* @param handle - The fediverse handle string to parse.
|
163
|
+
* @returns A {@link FediverseHandle} object with `username` and `host`
|
164
|
+
* if the input is valid; otherwise `null`.
|
165
|
+
* @since 1.8.0
|
166
|
+
*/
|
167
|
+
declare function parseFediverseHandle(handle: string): FediverseHandle | null;
|
168
|
+
/**
|
169
|
+
* Checks if a string is a valid fediverse handle in the format `@user@server`
|
170
|
+
* or `user@server`. The `user` part can contain alphanumeric characters and
|
171
|
+
* some special characters except `@`. The `server` part is all characters
|
172
|
+
* after the `@` symbol in the middle.
|
173
|
+
*
|
174
|
+
* @example
|
175
|
+
* ```typescript
|
176
|
+
* console.log(isFediverseHandle("@username@example.com")); // true
|
177
|
+
* console.log(isFediverseHandle("username@example.com")); // true
|
178
|
+
* console.log(isFediverseHandle("@username@")); // false
|
179
|
+
* ```
|
180
|
+
*
|
181
|
+
* @param handle - The string to test as a fediverse handle.
|
182
|
+
* @returns `true` if the string matches the fediverse handle pattern;
|
183
|
+
* otherwise `false`.
|
184
|
+
* @since 1.8.0
|
185
|
+
*/
|
186
|
+
declare function isFediverseHandle(handle: string): handle is `${string}@${string}`;
|
187
|
+
/**
|
188
|
+
* Converts a fediverse handle in the format `@user@server` or `user@server`
|
189
|
+
* to an `acct:` URI, which is a URL-like identifier for ActivityPub actors.
|
190
|
+
*
|
191
|
+
* @example
|
192
|
+
* ```typescript
|
193
|
+
* const identifier = toAcctUrl("@username@example.com");
|
194
|
+
* console.log(identifier?.href); // "acct:username@example.com"
|
195
|
+
* ```
|
196
|
+
*
|
197
|
+
* @param handle - The fediverse handle string to convert.
|
198
|
+
* @returns A `URL` object representing the `acct:` URI if conversion succeeds;
|
199
|
+
* otherwise `null`.
|
200
|
+
* @since 1.8.0
|
201
|
+
*/
|
202
|
+
declare function toAcctUrl(handle: string): URL | null;
|
203
|
+
//#endregion
|
130
204
|
//#region vocab/type.d.ts
|
131
205
|
/**
|
132
206
|
* Returns the type URI of the given object.
|
@@ -209,4 +283,4 @@ declare function getTypeId(object: Object$1 | Link | null): URL | null;
|
|
209
283
|
*/
|
210
284
|
declare function getTypeId(object: Object$1 | Link | null | undefined): URL | null | undefined;
|
211
285
|
//#endregion
|
212
|
-
export { LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, lookupObject, traverseCollection };
|
286
|
+
export { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection };
|
@@ -1,7 +1,7 @@
|
|
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-BeCtcTOJ.js";
|
4
|
+
import { HttpMessageSignaturesSpecDeterminer } from "./http-CP2ZUALI.js";
|
5
5
|
import { TracerProvider } from "@opentelemetry/api";
|
6
6
|
|
7
7
|
//#region runtime/authdocloader.d.ts
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { DocumentLoader } from "./docloader-
|
4
|
-
import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "./vocab-
|
5
|
-
import { KeyCache } from "./http-
|
3
|
+
import { DocumentLoader } from "./docloader-BeCtcTOJ.js";
|
4
|
+
import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "./vocab-By6mpzr-.js";
|
5
|
+
import { KeyCache } from "./http-CP2ZUALI.js";
|
6
6
|
import { TracerProvider } from "@opentelemetry/api";
|
7
7
|
|
8
8
|
//#region sig/ld.d.ts
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { Activity } from "./vocab-
|
4
|
-
import { ActivityTransformer, Context } from "./context-
|
3
|
+
import { Activity } from "./vocab-By6mpzr-.js";
|
4
|
+
import { ActivityTransformer, Context } from "./context-CrSyJrIa.js";
|
5
5
|
|
6
6
|
//#region compat/transformers.d.ts
|
7
7
|
|
package/dist/mod.d.ts
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "./kv-
|
4
|
-
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, FetchError, GetDocumentLoaderOptions, GetUserAgentOptions, KvCacheParameters, RemoteDocument, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-
|
5
|
-
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./client-
|
6
|
-
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 } from "./vocab-
|
7
|
-
import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "./actor-
|
8
|
-
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-
|
9
|
-
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-
|
10
|
-
import { LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, lookupObject, traverseCollection } from "./mod-
|
11
|
-
import { ResourceDescriptor, lookupWebFinger } from "./lookup-
|
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, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-
|
3
|
+
import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "./kv-DDdb1hMa.js";
|
4
|
+
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, FetchError, GetDocumentLoaderOptions, GetUserAgentOptions, KvCacheParameters, RemoteDocument, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-BeCtcTOJ.js";
|
5
|
+
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./client-BQ4AQGKo.js";
|
6
|
+
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 } from "./vocab-By6mpzr-.js";
|
7
|
+
import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "./actor-B4TBtqRP.js";
|
8
|
+
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-CP2ZUALI.js";
|
9
|
+
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-CEv_PfyK.js";
|
10
|
+
import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./mod-BFwgZ7_K.js";
|
11
|
+
import { ResourceDescriptor, lookupWebFinger } from "./lookup-J_m4YZg0.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, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-CrSyJrIa.js";
|
13
13
|
import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "./mq-DYKDDJmp.js";
|
14
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-
|
14
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-DpE8T10I.js";
|
15
15
|
import "./mod-g0xFzAP9.js";
|
16
16
|
import "./mod-1pDWKvUL.js";
|
17
|
-
import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "./mod-
|
18
|
-
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-
|
17
|
+
import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "./mod-CytXBx8A.js";
|
18
|
+
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-D2uPZuP-.js";
|
19
19
|
import "./mod-GIh5OYxW.js";
|
20
|
-
export { Accept, Activity, ActivityTransformer, Actor, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, ActorTypeName, Add, Announce, Application, Arrive, Article, Audio, AuthenticatedDocumentLoaderFactory, AuthorizePredicate, Block, ChatMessage, Collection, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, CollectionPage, Context, Create, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CreateProofOptions, CreateSignatureOptions, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, DoesActorOwnKeyOptions, Emoji, EmojiReact, Endpoints, Event, Export, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FetchError, FetchKeyOptions, FetchKeyResult, Flag, Follow, ForwardActivityOptions, GetActorHandleOptions, GetAuthenticatedDocumentLoaderOptions, GetDocumentLoaderOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, GetUserAgentOptions, Group, Hashtag, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, Ignore, Image, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, IntransitiveActivity, Invite, Join, JsonValue, KeyCache, KvCacheParameters, KvKey, KvStore, KvStoreSetOptions, LanguageString, Leave, Like, Link, Listen, LookupObjectOptions, MemoryKvStore, Mention, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, Move, Multikey, NodeInfo, NodeInfoDispatcher, NormalizeActorHandleOptions, Note, Object$1 as Object, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, Offer, OrderedCollection, OrderedCollectionPage, Organization, OutboundService, OutboxErrorHandler, PUBLIC_COLLECTION, Page, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Person, Place, Profile, PropertyValue, Protocol, Question, Read, Recipient, Reject, Relationship, RemoteDocument, Remove, RequestContext, ResourceDescriptor, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SemVer, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Service, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, Video, View, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, exportMultibaseKey, exportSpki, fetchDocumentLoader, fetchKey, formatSemVer, generateCryptoKeyPair, getActorClassByTypeName, getActorHandle, getActorTypeName, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getDocumentLoader, getKeyOwner, getNodeInfo, getTypeId, getUserAgent, importJwk, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, kvCache, lookupObject, lookupWebFinger, nodeInfoToJson, normalizeActorHandle, parseNodeInfo, parseSemVer, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, traverseCollection, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|
20
|
+
export { Accept, Activity, ActivityTransformer, Actor, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, ActorTypeName, Add, Announce, Application, Arrive, Article, Audio, AuthenticatedDocumentLoaderFactory, AuthorizePredicate, Block, ChatMessage, Collection, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, CollectionPage, Context, Create, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CreateProofOptions, CreateSignatureOptions, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, DoesActorOwnKeyOptions, Emoji, EmojiReact, Endpoints, Event, Export, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FediverseHandle, FetchError, FetchKeyOptions, FetchKeyResult, Flag, Follow, ForwardActivityOptions, GetActorHandleOptions, GetAuthenticatedDocumentLoaderOptions, GetDocumentLoaderOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, GetUserAgentOptions, Group, Hashtag, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, Ignore, Image, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, IntransitiveActivity, Invite, Join, JsonValue, KeyCache, KvCacheParameters, KvKey, KvStore, KvStoreSetOptions, LanguageString, Leave, Like, Link, Listen, LookupObjectOptions, MemoryKvStore, Mention, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, Move, Multikey, NodeInfo, NodeInfoDispatcher, NormalizeActorHandleOptions, Note, Object$1 as Object, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, Offer, OrderedCollection, OrderedCollectionPage, Organization, OutboundService, OutboxErrorHandler, PUBLIC_COLLECTION, Page, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Person, Place, Profile, PropertyValue, Protocol, Question, Read, Recipient, Reject, Relationship, RemoteDocument, Remove, RequestContext, ResourceDescriptor, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SemVer, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Service, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, Video, View, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, exportMultibaseKey, exportSpki, fetchDocumentLoader, fetchKey, formatSemVer, generateCryptoKeyPair, getActorClassByTypeName, getActorHandle, getActorTypeName, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getDocumentLoader, getKeyOwner, getNodeInfo, getTypeId, getUserAgent, importJwk, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, isFediverseHandle, kvCache, lookupObject, lookupWebFinger, nodeInfoToJson, normalizeActorHandle, parseFediverseHandle, parseNodeInfo, parseSemVer, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, toAcctUrl, traverseCollection, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|
package/dist/mod.js
CHANGED
@@ -4,20 +4,20 @@
|
|
4
4
|
|
5
5
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./transformers-ghwJuzGY.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, exportSpki, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, importMultibaseKey, importPem, importPkcs1, 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, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-
|
14
|
-
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-
|
15
|
-
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./types-
|
16
|
-
import { getAuthenticatedDocumentLoader } from "./authdocloader-
|
17
|
-
import { PUBLIC_COLLECTION, lookupObject, traverseCollection } from "./vocab-
|
7
|
+
import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-DP2c5RKR.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, exportSpki, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, normalizeActorHandle } from "./actor-CESvGo9c.js";
|
9
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-BmxgK7wV.js";
|
10
|
+
import { lookupWebFinger } from "./lookup-BYgWjDk7.js";
|
11
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk } from "./key-BjUOfK1Q.js";
|
12
|
+
import { signRequest, verifyRequest } from "./http-lmPPO2Eo.js";
|
13
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-B0keqm8m.js";
|
14
|
+
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-C44ekWNP.js";
|
15
|
+
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./types-D9EP9eEB.js";
|
16
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-QSRLyapW.js";
|
17
|
+
import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./vocab-BFfwVBw7.js";
|
18
18
|
import "./nodeinfo-CyEbLjHs.js";
|
19
19
|
import "./runtime-BSkOVUWM.js";
|
20
20
|
import "./sig-BXJO--F9.js";
|
21
21
|
import "./webfinger-C3GIyXIg.js";
|
22
22
|
|
23
|
-
export { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, FetchError, Flag, Follow, Group, Hashtag, Ignore, Image, InProcessMessageQueue, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, Link, Listen, MemoryKvStore, Mention, Move, Multikey, Note, Object$1 as Object, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, ParallelMessageQueue, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Router, RouterError, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, exportMultibaseKey, exportSpki, fetchDocumentLoader, fetchKey, formatSemVer, generateCryptoKeyPair, getActorClassByTypeName, getActorHandle, getActorTypeName, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getDocumentLoader, getKeyOwner, getNodeInfo, getTypeId, getUserAgent, importJwk, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, kvCache, lookupObject, lookupWebFinger, nodeInfoToJson, normalizeActorHandle, parseNodeInfo, parseSemVer, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, traverseCollection, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|
23
|
+
export { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, FetchError, Flag, Follow, Group, Hashtag, Ignore, Image, InProcessMessageQueue, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, Link, Listen, MemoryKvStore, Mention, Move, Multikey, Note, Object$1 as Object, Offer, OrderedCollection, OrderedCollectionPage, Organization, PUBLIC_COLLECTION, Page, ParallelMessageQueue, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Router, RouterError, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, exportMultibaseKey, exportSpki, fetchDocumentLoader, fetchKey, formatSemVer, generateCryptoKeyPair, getActorClassByTypeName, getActorHandle, getActorTypeName, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getDocumentLoader, getKeyOwner, getNodeInfo, getTypeId, getUserAgent, importJwk, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, isFediverseHandle, kvCache, lookupObject, lookupWebFinger, nodeInfoToJson, normalizeActorHandle, parseFediverseHandle, parseNodeInfo, parseSemVer, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, toAcctUrl, traverseCollection, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|
@@ -3,20 +3,20 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { assertEquals } from "../assert_equals-
|
7
|
-
import "../assert-
|
8
|
-
import "../assert_instance_of-
|
9
|
-
import "../docloader-
|
6
|
+
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
|
+
import "../assert-DwEa6glZ.js";
|
8
|
+
import "../assert_instance_of-C9QtN-X9.js";
|
9
|
+
import "../docloader-Coh6BBtD.js";
|
10
10
|
import "../url-kTAI6_KP.js";
|
11
11
|
import "../semver-DWClQt_5.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-B3xo9NFO.js";
|
13
13
|
import { test } from "../testing-BZ0dJ4qn.js";
|
14
|
-
import "../std__assert-
|
15
|
-
import "../assert_rejects-
|
16
|
-
import "../assert_is_error-
|
17
|
-
import "../assert_not_equals-
|
18
|
-
import "../assert_throws-
|
19
|
-
import { esm_default } from "../esm-
|
14
|
+
import "../std__assert-B3iAixc-.js";
|
15
|
+
import "../assert_rejects-DceVjUlD.js";
|
16
|
+
import "../assert_is_error-DQdKoRgb.js";
|
17
|
+
import "../assert_not_equals-7pyUM3Ib.js";
|
18
|
+
import "../assert_throws-DTDC_gwN.js";
|
19
|
+
import { esm_default } from "../esm-d-9EVGaP.js";
|
20
20
|
|
21
21
|
//#region nodeinfo/client.test.ts
|
22
22
|
test("getNodeInfo()", async (t) => {
|
@@ -3,44 +3,44 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { assertEquals } from "../assert_equals-
|
7
|
-
import "../assert-
|
8
|
-
import "../assert_instance_of-
|
9
|
-
import { MemoryKvStore } from "../kv-
|
10
|
-
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-
|
11
|
-
import "../docloader-
|
6
|
+
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
|
+
import "../assert-DwEa6glZ.js";
|
8
|
+
import "../assert_instance_of-C9QtN-X9.js";
|
9
|
+
import { MemoryKvStore } from "../kv-D7Yt6pnB.js";
|
10
|
+
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-CkV-ui-y.js";
|
11
|
+
import "../docloader-Coh6BBtD.js";
|
12
12
|
import "../url-kTAI6_KP.js";
|
13
13
|
import { parseSemVer } from "../semver-DWClQt_5.js";
|
14
|
-
import "../client-
|
15
|
-
import "../router-
|
14
|
+
import "../client-B3xo9NFO.js";
|
15
|
+
import "../router-D3UybECj.js";
|
16
16
|
import "../types-C7C_l-jz.js";
|
17
17
|
import "../multibase-DeCHcK8L.js";
|
18
|
-
import "../vocab-
|
18
|
+
import "../vocab-Df91ohvp.js";
|
19
19
|
import "../langstr-DbWheeIS.js";
|
20
|
-
import "../lookup-
|
20
|
+
import "../lookup-DU2MRGYe.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-CqSuisvH.js";
|
23
|
+
import "../key-BLqpPTN_.js";
|
24
|
+
import "../http-CkfVl7ql.js";
|
25
|
+
import "../authdocloader-rYXZAJDf.js";
|
26
|
+
import "../ld-zsHn8nfn.js";
|
27
|
+
import "../owner-yriwUrxg.js";
|
28
|
+
import "../proof-CTzg7mvj.js";
|
29
|
+
import "../lookup-BlRxqykX.js";
|
30
|
+
import "../inbox-CF21yedu.js";
|
31
|
+
import "../builder-rGWE83Jn.js";
|
32
32
|
import "../collection-Dfb0TPno.js";
|
33
|
-
import "../keycache-
|
33
|
+
import "../keycache-yqwT_M3m.js";
|
34
34
|
import "../retry-BiIhZWgD.js";
|
35
|
-
import "../send-
|
35
|
+
import "../send-CdU_Vjiy.js";
|
36
36
|
import { test } from "../testing-BZ0dJ4qn.js";
|
37
|
-
import "../std__assert-
|
38
|
-
import "../assert_rejects-
|
39
|
-
import "../assert_is_error-
|
40
|
-
import "../assert_not_equals-
|
41
|
-
import "../assert_throws-
|
37
|
+
import "../std__assert-B3iAixc-.js";
|
38
|
+
import "../assert_rejects-DceVjUlD.js";
|
39
|
+
import "../assert_is_error-DQdKoRgb.js";
|
40
|
+
import "../assert_not_equals-7pyUM3Ib.js";
|
41
|
+
import "../assert_throws-DTDC_gwN.js";
|
42
42
|
import "../docloader-09nVWLAZ.js";
|
43
|
-
import { createRequestContext } from "../context-
|
43
|
+
import { createRequestContext } from "../context-T6ATmy_o.js";
|
44
44
|
|
45
45
|
//#region nodeinfo/handler.test.ts
|
46
46
|
test("handleNodeInfo()", async () => {
|
package/dist/nodeinfo/mod.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import "../kv-
|
4
|
-
import "../docloader-
|
5
|
-
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../client-
|
3
|
+
import "../kv-DDdb1hMa.js";
|
4
|
+
import "../docloader-BeCtcTOJ.js";
|
5
|
+
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../client-BQ4AQGKo.js";
|
6
6
|
import "../mod-1pDWKvUL.js";
|
7
7
|
export { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer };
|
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-DP2c5RKR.js";
|
6
|
+
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../types-D9EP9eEB.js";
|
7
7
|
import "../nodeinfo-CyEbLjHs.js";
|
8
8
|
|
9
9
|
export { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer };
|
@@ -3,16 +3,16 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { assertEquals } from "../assert_equals-
|
7
|
-
import "../assert-
|
8
|
-
import "../assert_instance_of-
|
6
|
+
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
|
+
import "../assert-DwEa6glZ.js";
|
8
|
+
import "../assert_instance_of-C9QtN-X9.js";
|
9
9
|
import { formatSemVer, parseSemVer } from "../semver-DWClQt_5.js";
|
10
10
|
import { test } from "../testing-BZ0dJ4qn.js";
|
11
|
-
import "../std__assert-
|
12
|
-
import "../assert_rejects-
|
13
|
-
import "../assert_is_error-
|
14
|
-
import "../assert_not_equals-
|
15
|
-
import { assertThrows } from "../assert_throws-
|
11
|
+
import "../std__assert-B3iAixc-.js";
|
12
|
+
import "../assert_rejects-DceVjUlD.js";
|
13
|
+
import "../assert_is_error-DQdKoRgb.js";
|
14
|
+
import "../assert_not_equals-7pyUM3Ib.js";
|
15
|
+
import { assertThrows } from "../assert_throws-DTDC_gwN.js";
|
16
16
|
|
17
17
|
//#region nodeinfo/semver.test.ts
|
18
18
|
test("parseSemVer() handles major", async (t) => {
|
@@ -3,17 +3,17 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import { assertEquals } from "../assert_equals-
|
7
|
-
import "../assert-
|
8
|
-
import "../assert_instance_of-
|
6
|
+
import { assertEquals } from "../assert_equals-C5gKCm6A.js";
|
7
|
+
import "../assert-DwEa6glZ.js";
|
8
|
+
import "../assert_instance_of-C9QtN-X9.js";
|
9
9
|
import "../semver-DWClQt_5.js";
|
10
10
|
import { nodeInfoToJson } from "../types-C7C_l-jz.js";
|
11
11
|
import { test } from "../testing-BZ0dJ4qn.js";
|
12
|
-
import "../std__assert-
|
13
|
-
import "../assert_rejects-
|
14
|
-
import "../assert_is_error-
|
15
|
-
import "../assert_not_equals-
|
16
|
-
import { assertThrows } from "../assert_throws-
|
12
|
+
import "../std__assert-B3iAixc-.js";
|
13
|
+
import "../assert_rejects-DceVjUlD.js";
|
14
|
+
import "../assert_is_error-DQdKoRgb.js";
|
15
|
+
import "../assert_not_equals-7pyUM3Ib.js";
|
16
|
+
import { assertThrows } from "../assert_throws-DTDC_gwN.js";
|
17
17
|
|
18
18
|
//#region nodeinfo/types.test.ts
|
19
19
|
test("nodeInfoToJson()", () => {
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { DocumentLoader } from "./docloader-
|
4
|
-
import { Activity, CryptographicKey } from "./vocab-
|
5
|
-
import { Actor } from "./actor-
|
3
|
+
import { DocumentLoader } from "./docloader-BeCtcTOJ.js";
|
4
|
+
import { Activity, CryptographicKey } from "./vocab-By6mpzr-.js";
|
5
|
+
import { Actor } from "./actor-B4TBtqRP.js";
|
6
6
|
import { TracerProvider } from "@opentelemetry/api";
|
7
7
|
|
8
8
|
//#region sig/owner.d.ts
|
@@ -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-Coh6BBtD.js";
|
7
|
+
import { CryptographicKey, Object as Object$1 } from "./vocab-Df91ohvp.js";
|
8
|
+
import { isActor } from "./actor-CqSuisvH.js";
|
9
9
|
import { trace } from "@opentelemetry/api";
|
10
10
|
|
11
11
|
//#region sig/owner.ts
|