@fedify/fedify 1.8.1-pr.339.1222 → 1.8.1-pr.339.1267
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/README.md +14 -11
- package/dist/{actor-B4TBtqRP.d.ts → actor-C2nhWp6O.d.ts} +3 -3
- package/dist/{actor-Bt5xDUZo.js → actor-CmkL94HP.js} +2 -2
- package/dist/{actor-DVPWhxHG.js → actor-aW87k6YP.js} +189 -189
- package/dist/{assert-DwEa6glZ.js → assert-MZs1qjMx.js} +2 -2
- package/dist/{assert_equals-C5gKCm6A.js → assert_equals-DSbWqCm3.js} +9 -9
- package/dist/{assert_instance_of-C9QtN-X9.js → assert_instance_of-DHz7EHNU.js} +2 -2
- package/dist/{assert_is_error-CeVBLPsZ.js → assert_is_error-BPGph1Jx.js} +2 -2
- package/dist/{assert_not_equals-D2R2nl5h.js → assert_not_equals-f3m3epl3.js} +2 -2
- package/dist/{assert_rejects-AjlKk-Vo.js → assert_rejects-DiIiJbZn.js} +4 -4
- package/dist/{assert_throws-CqMKbTh_.js → assert_throws-BOO88avQ.js} +3 -3
- package/dist/{authdocloader-DgY04ZH-.js → authdocloader-CSdMJ3OD.js} +4 -4
- package/dist/{authdocloader-C-AUsWQ2.js → authdocloader-CfZzF6aW.js} +4 -4
- package/dist/{builder-C9T8U_Uf.js → builder-KOoy-ITr.js} +6 -6
- package/dist/{client-BQ4AQGKo.d.ts → client-D2tgjFk3.d.ts} +4 -4
- package/dist/{client-DWpUfRbw.js → client-DfttEsJO.js} +3 -3
- package/dist/{collection-D5V3UzU3.js → collection-CSzG2j1P.js} +1 -1
- package/dist/compat/mod.d.ts +12 -12
- package/dist/compat/mod.js +1 -1
- package/dist/compat/transformers.test.js +25 -25
- package/dist/{context-Csbv_Ssv.d.ts → context-BBD2ZH_P.d.ts} +95 -95
- package/dist/{denokv-DK9P5Jq7.js → denokv-2x6-IpXO.js} +1 -1
- package/dist/{docloader-vzD7dFee.js → docloader-BCgyiRag.js} +34 -34
- package/dist/{docloader-BeCtcTOJ.d.ts → docloader-Bz56sKV5.d.ts} +2 -2
- package/dist/{esm-CvgSbZB6.js → esm-BwBAFDMZ.js} +15 -15
- package/dist/federation/builder.test.js +16 -16
- package/dist/federation/collection.test.js +13 -13
- package/dist/federation/handler.test.js +31 -31
- package/dist/federation/inbox.test.js +8 -8
- package/dist/federation/keycache.test.js +9 -9
- package/dist/federation/kv.test.js +13 -13
- package/dist/federation/middleware.test.js +34 -34
- package/dist/federation/mod.d.ts +11 -11
- package/dist/federation/mod.js +12 -12
- package/dist/federation/mq.test.js +15 -15
- package/dist/federation/retry.test.js +7 -7
- package/dist/federation/router.test.js +12 -12
- package/dist/federation/send.test.js +19 -19
- package/dist/{federation-C44ekWNP.js → federation-CMX7WzeL.js} +2 -2
- package/dist/{http-CJ_WXWxy.js → http-B1ff1viM.js} +4 -4
- package/dist/{http-sujZOSn0.js → http-BUhvpgNR.js} +3 -3
- package/dist/{http-BL6S1G0j.d.ts → http-l4uEvaAw.d.ts} +5 -5
- package/dist/{inbox-ziHZFl9m.js → inbox-CJoj4ew9.js} +2 -2
- package/dist/{key-CqPfdz_a.js → key-B9HDRSYF.js} +4 -4
- package/dist/{key-C8O0PF-4.js → key-Bycq40gh.js} +4 -4
- package/dist/{key-B8eVu_yr.js → key-D-lyguVw.js} +3 -3
- package/dist/{key-CSJmowMR.js → key-Dytvox0s.js} +4 -4
- package/dist/{keycache-8pBZ0_On.js → keycache-DRL-euZL.js} +2 -2
- package/dist/{keys-BNpjYTyO.js → keys-3qmW6xNM.js} +2 -2
- package/dist/{kv-DDdb1hMa.d.ts → kv-C7sopW2E.d.ts} +2 -2
- package/dist/{kv-D7Yt6pnB.js → kv-CRZrzyXm.js} +1 -1
- package/dist/{ld-BL1xjQSp.js → ld-DCy3fb6F.js} +3 -3
- package/dist/{lookup-COgtfqH1.js → lookup-B0kqr1YK.js} +4 -4
- package/dist/{lookup-J_m4YZg0.d.ts → lookup-BJelGpWr.d.ts} +3 -3
- package/dist/{lookup-DofYsQEG.js → lookup-gra7DAIV.js} +2 -2
- package/dist/middleware-B8IJYZA9.js +17 -0
- package/dist/{middleware-CKluVPhT.js → middleware-CAzmuaK9.js} +53 -53
- package/dist/{middleware-DLufxElo.js → middleware-CWKaURv5.js} +51 -51
- package/dist/middleware-D8Av026r.js +26 -0
- package/dist/{mod-BFwgZ7_K.d.ts → mod-D79SaXL-.d.ts} +6 -6
- package/dist/{mod-Dc_fDCtK.d.ts → mod-DDwnlIlm.d.ts} +6 -6
- package/dist/{mod-D8-liXFY.d.ts → mod-DM7ZpXF4.d.ts} +4 -4
- package/dist/{mod-j0OCtlRW.d.ts → mod-DwquBB1g.d.ts} +6 -6
- package/dist/mod.d.ts +14 -14
- package/dist/mod.js +12 -12
- package/dist/{mq-DYKDDJmp.d.ts → mq-CRGm1e_F.d.ts} +1 -1
- package/dist/nodeinfo/client.test.js +15 -15
- package/dist/nodeinfo/handler.test.js +30 -30
- package/dist/nodeinfo/mod.d.ts +3 -3
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +13 -13
- package/dist/nodeinfo/types.test.js +14 -14
- package/dist/{owner-X6sRUlBy.js → owner-DExszVkD.js} +3 -3
- package/dist/{owner-CEv_PfyK.d.ts → owner-fFqUg4lq.d.ts} +4 -4
- package/dist/{proof-DeKaTDaf.js → proof-Cnxcwp1a.js} +4 -4
- package/dist/{proof-5_7xBmeg.js → proof-DY_ZcCZq.js} +7 -7
- package/dist/{retry-BnpVRGFC.js → retry-D4GJ670a.js} +1 -1
- package/dist/runtime/authdocloader.test.js +18 -18
- package/dist/runtime/docloader.test.js +14 -14
- package/dist/runtime/key.test.js +14 -14
- package/dist/runtime/langstr.test.js +12 -12
- package/dist/runtime/mod.d.ts +5 -5
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +12 -12
- package/dist/runtime/url.test.js +8 -8
- package/dist/{semver-DCqorrj5.js → semver-dArNLkR9.js} +1 -1
- package/dist/{send-CgfThRII.js → send-ovNk9TQg.js} +3 -3
- package/dist/sig/http.test.js +17 -17
- package/dist/sig/key.test.js +15 -15
- package/dist/sig/ld.test.js +13 -13
- 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 +16 -16
- package/dist/{std__assert-BQdmxyzF.js → std__assert-X-_kMxKM.js} +6 -6
- package/dist/testing/docloader.test.js +12 -12
- package/dist/testing/mod.d.ts +90 -90
- package/dist/testing/mod.js +3 -3
- package/dist/{testing-BoRC_4LY.js → testing-Ddk8H2Ez.js} +5 -5
- package/dist/{transformers-ghwJuzGY.js → transformers-Dna8Fg7k.js} +4 -4
- package/dist/{type-ezvzDgRG.js → type-C4M92j6x.js} +221 -221
- package/dist/{types-n7HI7VFr.js → types-BIgY6c-l.js} +2 -2
- package/dist/{types-CyMsyyYb.js → types-C0RmUAha.js} +4 -4
- package/dist/vocab/actor.test.js +143 -143
- 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 +5 -5
- package/dist/vocab/vocab.test.js +54 -54
- package/dist/{vocab-By6mpzr-.d.ts → vocab-CA7YwVEz.d.ts} +3 -3
- package/dist/{vocab-DSvb-EJO.js → vocab-DyLqaidG.js} +6 -6
- package/dist/webfinger/handler.test.js +30 -30
- package/dist/webfinger/lookup.test.js +13 -13
- package/dist/webfinger/mod.d.ts +3 -3
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.d.ts +3 -3
- package/dist/x/cfworkers.js +1 -1
- package/dist/x/cfworkers.test.js +13 -13
- package/dist/x/hono.d.ts +16 -16
- package/dist/x/hono.js +3 -3
- package/dist/x/sveltekit.d.ts +13 -13
- package/dist/x/sveltekit.js +2 -2
- package/package.json +3 -3
- package/dist/middleware-BJaUQkU6.js +0 -26
- package/dist/middleware-DsFygqcs.js +0 -17
- /package/dist/{vocab → src/vocab}/accept.yaml +0 -0
- /package/dist/{vocab → src/vocab}/activity.yaml +0 -0
- /package/dist/{vocab → src/vocab}/add.yaml +0 -0
- /package/dist/{vocab → src/vocab}/announce.yaml +0 -0
- /package/dist/{vocab → src/vocab}/application.yaml +0 -0
- /package/dist/{vocab → src/vocab}/arrive.yaml +0 -0
- /package/dist/{vocab → src/vocab}/article.yaml +0 -0
- /package/dist/{vocab → src/vocab}/audio.yaml +0 -0
- /package/dist/{vocab → src/vocab}/block.yaml +0 -0
- /package/dist/{vocab → src/vocab}/chatmessage.yaml +0 -0
- /package/dist/{vocab → src/vocab}/collection.yaml +0 -0
- /package/dist/{vocab → src/vocab}/collectionpage.yaml +0 -0
- /package/dist/{vocab → src/vocab}/create.yaml +0 -0
- /package/dist/{vocab → src/vocab}/dataintegrityproof.yaml +0 -0
- /package/dist/{vocab → src/vocab}/delete.yaml +0 -0
- /package/dist/{vocab → src/vocab}/didservice.yaml +0 -0
- /package/dist/{vocab → src/vocab}/dislike.yaml +0 -0
- /package/dist/{vocab → src/vocab}/document.yaml +0 -0
- /package/dist/{vocab → src/vocab}/emoji.yaml +0 -0
- /package/dist/{vocab → src/vocab}/emojireact.yaml +0 -0
- /package/dist/{vocab → src/vocab}/endpoints.yaml +0 -0
- /package/dist/{vocab → src/vocab}/event.yaml +0 -0
- /package/dist/{vocab → src/vocab}/export.yaml +0 -0
- /package/dist/{vocab → src/vocab}/flag.yaml +0 -0
- /package/dist/{vocab → src/vocab}/follow.yaml +0 -0
- /package/dist/{vocab → src/vocab}/group.yaml +0 -0
- /package/dist/{vocab → src/vocab}/hashtag.yaml +0 -0
- /package/dist/{vocab → src/vocab}/ignore.yaml +0 -0
- /package/dist/{vocab → src/vocab}/image.yaml +0 -0
- /package/dist/{vocab → src/vocab}/intransitiveactivity.yaml +0 -0
- /package/dist/{vocab → src/vocab}/invite.yaml +0 -0
- /package/dist/{vocab → src/vocab}/join.yaml +0 -0
- /package/dist/{vocab → src/vocab}/key.yaml +0 -0
- /package/dist/{vocab → src/vocab}/leave.yaml +0 -0
- /package/dist/{vocab → src/vocab}/like.yaml +0 -0
- /package/dist/{vocab → src/vocab}/link.yaml +0 -0
- /package/dist/{vocab → src/vocab}/listen.yaml +0 -0
- /package/dist/{vocab → src/vocab}/mention.yaml +0 -0
- /package/dist/{vocab → src/vocab}/move.yaml +0 -0
- /package/dist/{vocab → src/vocab}/multikey.yaml +0 -0
- /package/dist/{vocab → src/vocab}/note.yaml +0 -0
- /package/dist/{vocab → src/vocab}/object.yaml +0 -0
- /package/dist/{vocab → src/vocab}/offer.yaml +0 -0
- /package/dist/{vocab → src/vocab}/orderedcollection.yaml +0 -0
- /package/dist/{vocab → src/vocab}/orderedcollectionpage.yaml +0 -0
- /package/dist/{vocab → src/vocab}/organization.yaml +0 -0
- /package/dist/{vocab → src/vocab}/page.yaml +0 -0
- /package/dist/{vocab → src/vocab}/person.yaml +0 -0
- /package/dist/{vocab → src/vocab}/place.yaml +0 -0
- /package/dist/{vocab → src/vocab}/profile.yaml +0 -0
- /package/dist/{vocab → src/vocab}/propertyvalue.yaml +0 -0
- /package/dist/{vocab → src/vocab}/question.yaml +0 -0
- /package/dist/{vocab → src/vocab}/read.yaml +0 -0
- /package/dist/{vocab → src/vocab}/reject.yaml +0 -0
- /package/dist/{vocab → src/vocab}/relationship.yaml +0 -0
- /package/dist/{vocab → src/vocab}/remove.yaml +0 -0
- /package/dist/{vocab → src/vocab}/service.yaml +0 -0
- /package/dist/{vocab → src/vocab}/source.yaml +0 -0
- /package/dist/{vocab → src/vocab}/tentativeaccept.yaml +0 -0
- /package/dist/{vocab → src/vocab}/tentativereject.yaml +0 -0
- /package/dist/{vocab → src/vocab}/tombstone.yaml +0 -0
- /package/dist/{vocab → src/vocab}/travel.yaml +0 -0
- /package/dist/{vocab → src/vocab}/undo.yaml +0 -0
- /package/dist/{vocab → src/vocab}/update.yaml +0 -0
- /package/dist/{vocab → src/vocab}/video.yaml +0 -0
- /package/dist/{vocab → src/vocab}/view.yaml +0 -0
|
@@ -1,10 +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-Bz56sKV5.js";
|
|
4
|
+
import { HttpMessageSignaturesSpecDeterminer } from "./http-l4uEvaAw.js";
|
|
5
5
|
import { TracerProvider } from "@opentelemetry/api";
|
|
6
6
|
|
|
7
|
-
//#region runtime/authdocloader.d.ts
|
|
7
|
+
//#region src/runtime/authdocloader.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* Options for {@link getAuthenticatedDocumentLoader}.
|
|
10
10
|
* @see {@link getAuthenticatedDocumentLoader}
|
|
@@ -47,7 +47,7 @@ declare function getAuthenticatedDocumentLoader(identity: {
|
|
|
47
47
|
tracerProvider
|
|
48
48
|
}?: GetAuthenticatedDocumentLoaderOptions): DocumentLoader;
|
|
49
49
|
//#endregion
|
|
50
|
-
//#region runtime/key.d.ts
|
|
50
|
+
//#region src/runtime/key.d.ts
|
|
51
51
|
/**
|
|
52
52
|
* Imports a PEM-SPKI formatted public key.
|
|
53
53
|
* @param pem The PEM-SPKI formatted public key.
|
|
@@ -1,11 +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, DataIntegrityProof, Multikey, Object as Object$1 } from "./vocab-
|
|
5
|
-
import { KeyCache } from "./http-
|
|
3
|
+
import { DocumentLoader } from "./docloader-Bz56sKV5.js";
|
|
4
|
+
import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "./vocab-CA7YwVEz.js";
|
|
5
|
+
import { KeyCache } from "./http-l4uEvaAw.js";
|
|
6
6
|
import { TracerProvider } from "@opentelemetry/api";
|
|
7
7
|
|
|
8
|
-
//#region sig/ld.d.ts
|
|
8
|
+
//#region src/sig/ld.d.ts
|
|
9
9
|
/**
|
|
10
10
|
* A signature of a JSON-LD document.
|
|
11
11
|
* @since 1.0.0
|
|
@@ -144,7 +144,7 @@ interface VerifyJsonLdOptions extends VerifySignatureOptions {}
|
|
|
144
144
|
*/
|
|
145
145
|
declare function verifyJsonLd(jsonLd: unknown, options?: VerifyJsonLdOptions): Promise<boolean>;
|
|
146
146
|
//#endregion
|
|
147
|
-
//#region sig/proof.d.ts
|
|
147
|
+
//#region src/sig/proof.d.ts
|
|
148
148
|
/**
|
|
149
149
|
* Options for {@link createProof}.
|
|
150
150
|
* @since 0.10.0
|
|
@@ -251,7 +251,7 @@ interface VerifyObjectOptions extends VerifyProofOptions {}
|
|
|
251
251
|
* Verifies the given object. It will verify all the proofs in the object,
|
|
252
252
|
* and succeed only if all the proofs are valid and all attributions and
|
|
253
253
|
* actors are authenticated by the proofs.
|
|
254
|
-
* @
|
|
254
|
+
* @template T The type of the object to verify.
|
|
255
255
|
* @param cls The class of the object to verify. It must be a subclass of
|
|
256
256
|
* the {@link Object}.
|
|
257
257
|
* @param jsonLd The JSON-LD object to verify. It's assumed that the object
|
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 { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./mod-
|
|
11
|
-
import { ResourceDescriptor, lookupWebFinger } from "./lookup-
|
|
12
|
-
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-
|
|
13
|
-
import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "./mq-
|
|
14
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-
|
|
3
|
+
import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "./kv-C7sopW2E.js";
|
|
4
|
+
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, FetchError, GetDocumentLoaderOptions, GetUserAgentOptions, KvCacheParameters, RemoteDocument, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-Bz56sKV5.js";
|
|
5
|
+
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./client-D2tgjFk3.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-CA7YwVEz.js";
|
|
7
|
+
import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "./actor-C2nhWp6O.js";
|
|
8
|
+
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-l4uEvaAw.js";
|
|
9
|
+
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-fFqUg4lq.js";
|
|
10
|
+
import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./mod-D79SaXL-.js";
|
|
11
|
+
import { ResourceDescriptor, lookupWebFinger } from "./lookup-BJelGpWr.js";
|
|
12
|
+
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-BBD2ZH_P.js";
|
|
13
|
+
import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "./mq-CRGm1e_F.js";
|
|
14
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-DDwnlIlm.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-DM7ZpXF4.js";
|
|
18
|
+
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-DwquBB1g.js";
|
|
19
19
|
import "./mod-GIh5OYxW.js";
|
|
20
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, ConstructorWithTypeId, Context, Create, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CreateProofOptions, CreateSignatureOptions, CryptographicKey, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, 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, ParamsKeyPath, 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
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./transformers-
|
|
5
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./transformers-Dna8Fg7k.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, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./vocab-
|
|
7
|
+
import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-BCgyiRag.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-aW87k6YP.js";
|
|
9
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-CWKaURv5.js";
|
|
10
|
+
import { lookupWebFinger } from "./lookup-gra7DAIV.js";
|
|
11
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk } from "./key-B9HDRSYF.js";
|
|
12
|
+
import { signRequest, verifyRequest } from "./http-B1ff1viM.js";
|
|
13
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-DY_ZcCZq.js";
|
|
14
|
+
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-CMX7WzeL.js";
|
|
15
|
+
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./types-C0RmUAha.js";
|
|
16
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-CSdMJ3OD.js";
|
|
17
|
+
import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./vocab-DyLqaidG.js";
|
|
18
18
|
import "./nodeinfo-CyEbLjHs.js";
|
|
19
19
|
import "./runtime-BSkOVUWM.js";
|
|
20
20
|
import "./sig-BXJO--F9.js";
|
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import "../semver-
|
|
11
|
-
import { getNodeInfo, parseInboundService, parseNodeInfo, parseOutboundService, parseProtocol, parseServices, parseSoftware, parseUsage } from "../client-
|
|
12
|
-
import "../lookup-
|
|
13
|
-
import { test } from "../testing-
|
|
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-
|
|
6
|
+
import "../type-C4M92j6x.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import "../assert-MZs1qjMx.js";
|
|
9
|
+
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import "../semver-dArNLkR9.js";
|
|
11
|
+
import { getNodeInfo, parseInboundService, parseNodeInfo, parseOutboundService, parseProtocol, parseServices, parseSoftware, parseUsage } from "../client-DfttEsJO.js";
|
|
12
|
+
import "../lookup-B0kqr1YK.js";
|
|
13
|
+
import { test } from "../testing-Ddk8H2Ez.js";
|
|
14
|
+
import "../std__assert-X-_kMxKM.js";
|
|
15
|
+
import "../assert_rejects-DiIiJbZn.js";
|
|
16
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
17
|
+
import "../assert_not_equals-f3m3epl3.js";
|
|
18
|
+
import "../assert_throws-BOO88avQ.js";
|
|
19
|
+
import { esm_default } from "../esm-BwBAFDMZ.js";
|
|
20
20
|
|
|
21
|
-
//#region nodeinfo/client.test.ts
|
|
21
|
+
//#region src/nodeinfo/client.test.ts
|
|
22
22
|
test("getNodeInfo()", async (t) => {
|
|
23
23
|
esm_default.spyGlobal();
|
|
24
24
|
esm_default.get("https://example.com/.well-known/nodeinfo", { body: { links: [{
|
|
@@ -3,37 +3,37 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import { MemoryKvStore } from "../kv-
|
|
11
|
-
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-
|
|
12
|
-
import { parseSemVer } from "../semver-
|
|
13
|
-
import "../client-
|
|
14
|
-
import "../lookup-
|
|
15
|
-
import "../types-
|
|
16
|
-
import "../actor-
|
|
17
|
-
import "../key-
|
|
18
|
-
import "../http-
|
|
19
|
-
import "../authdocloader-
|
|
20
|
-
import "../ld-
|
|
21
|
-
import "../owner-
|
|
22
|
-
import "../proof-
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
25
|
-
import "../collection-
|
|
26
|
-
import "../keycache-
|
|
27
|
-
import "../retry-
|
|
28
|
-
import "../send-
|
|
29
|
-
import { createRequestContext, test } from "../testing-
|
|
30
|
-
import "../std__assert-
|
|
31
|
-
import "../assert_rejects-
|
|
32
|
-
import "../assert_is_error-
|
|
33
|
-
import "../assert_not_equals-
|
|
34
|
-
import "../assert_throws-
|
|
6
|
+
import "../type-C4M92j6x.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import "../assert-MZs1qjMx.js";
|
|
9
|
+
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import { MemoryKvStore } from "../kv-CRZrzyXm.js";
|
|
11
|
+
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-CAzmuaK9.js";
|
|
12
|
+
import { parseSemVer } from "../semver-dArNLkR9.js";
|
|
13
|
+
import "../client-DfttEsJO.js";
|
|
14
|
+
import "../lookup-B0kqr1YK.js";
|
|
15
|
+
import "../types-BIgY6c-l.js";
|
|
16
|
+
import "../actor-CmkL94HP.js";
|
|
17
|
+
import "../key-Dytvox0s.js";
|
|
18
|
+
import "../http-BUhvpgNR.js";
|
|
19
|
+
import "../authdocloader-CfZzF6aW.js";
|
|
20
|
+
import "../ld-DCy3fb6F.js";
|
|
21
|
+
import "../owner-DExszVkD.js";
|
|
22
|
+
import "../proof-Cnxcwp1a.js";
|
|
23
|
+
import "../inbox-CJoj4ew9.js";
|
|
24
|
+
import "../builder-KOoy-ITr.js";
|
|
25
|
+
import "../collection-CSzG2j1P.js";
|
|
26
|
+
import "../keycache-DRL-euZL.js";
|
|
27
|
+
import "../retry-D4GJ670a.js";
|
|
28
|
+
import "../send-ovNk9TQg.js";
|
|
29
|
+
import { createRequestContext, test } from "../testing-Ddk8H2Ez.js";
|
|
30
|
+
import "../std__assert-X-_kMxKM.js";
|
|
31
|
+
import "../assert_rejects-DiIiJbZn.js";
|
|
32
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
33
|
+
import "../assert_not_equals-f3m3epl3.js";
|
|
34
|
+
import "../assert_throws-BOO88avQ.js";
|
|
35
35
|
|
|
36
|
-
//#region nodeinfo/handler.test.ts
|
|
36
|
+
//#region src/nodeinfo/handler.test.ts
|
|
37
37
|
test("handleNodeInfo()", async () => {
|
|
38
38
|
const request = new Request("https://example.com/nodeinfo/2.1");
|
|
39
39
|
const federation = createFederation({ kv: new MemoryKvStore() });
|
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-C7sopW2E.js";
|
|
4
|
+
import "../docloader-Bz56sKV5.js";
|
|
5
|
+
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../client-D2tgjFk3.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-BCgyiRag.js";
|
|
6
|
+
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../types-C0RmUAha.js";
|
|
7
7
|
import "../nodeinfo-CyEbLjHs.js";
|
|
8
8
|
|
|
9
9
|
export { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer };
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import { formatSemVer, parseSemVer } from "../semver-
|
|
11
|
-
import "../lookup-
|
|
12
|
-
import { test } from "../testing-
|
|
13
|
-
import "../std__assert-
|
|
14
|
-
import "../assert_rejects-
|
|
15
|
-
import "../assert_is_error-
|
|
16
|
-
import "../assert_not_equals-
|
|
17
|
-
import { assertThrows } from "../assert_throws-
|
|
6
|
+
import "../type-C4M92j6x.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import "../assert-MZs1qjMx.js";
|
|
9
|
+
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import { formatSemVer, parseSemVer } from "../semver-dArNLkR9.js";
|
|
11
|
+
import "../lookup-B0kqr1YK.js";
|
|
12
|
+
import { test } from "../testing-Ddk8H2Ez.js";
|
|
13
|
+
import "../std__assert-X-_kMxKM.js";
|
|
14
|
+
import "../assert_rejects-DiIiJbZn.js";
|
|
15
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
16
|
+
import "../assert_not_equals-f3m3epl3.js";
|
|
17
|
+
import { assertThrows } from "../assert_throws-BOO88avQ.js";
|
|
18
18
|
|
|
19
|
-
//#region nodeinfo/semver.test.ts
|
|
19
|
+
//#region src/nodeinfo/semver.test.ts
|
|
20
20
|
test("parseSemVer() handles major", async (t) => {
|
|
21
21
|
const versions = [
|
|
22
22
|
["1.2.3", 1],
|
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import "../semver-
|
|
11
|
-
import "../lookup-
|
|
12
|
-
import { nodeInfoToJson } from "../types-
|
|
13
|
-
import { test } from "../testing-
|
|
14
|
-
import "../std__assert-
|
|
15
|
-
import "../assert_rejects-
|
|
16
|
-
import "../assert_is_error-
|
|
17
|
-
import "../assert_not_equals-
|
|
18
|
-
import { assertThrows } from "../assert_throws-
|
|
6
|
+
import "../type-C4M92j6x.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import "../assert-MZs1qjMx.js";
|
|
9
|
+
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import "../semver-dArNLkR9.js";
|
|
11
|
+
import "../lookup-B0kqr1YK.js";
|
|
12
|
+
import { nodeInfoToJson } from "../types-BIgY6c-l.js";
|
|
13
|
+
import { test } from "../testing-Ddk8H2Ez.js";
|
|
14
|
+
import "../std__assert-X-_kMxKM.js";
|
|
15
|
+
import "../assert_rejects-DiIiJbZn.js";
|
|
16
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
17
|
+
import "../assert_not_equals-f3m3epl3.js";
|
|
18
|
+
import { assertThrows } from "../assert_throws-BOO88avQ.js";
|
|
19
19
|
|
|
20
|
-
//#region nodeinfo/types.test.ts
|
|
20
|
+
//#region src/nodeinfo/types.test.ts
|
|
21
21
|
test("nodeInfoToJson()", () => {
|
|
22
22
|
const validInfo = {
|
|
23
23
|
software: {
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { CryptographicKey, Object as Object$1, getDocumentLoader } from "./type-
|
|
7
|
-
import { isActor } from "./actor-
|
|
6
|
+
import { CryptographicKey, Object as Object$1, getDocumentLoader } from "./type-C4M92j6x.js";
|
|
7
|
+
import { isActor } from "./actor-CmkL94HP.js";
|
|
8
8
|
import { trace } from "@opentelemetry/api";
|
|
9
9
|
|
|
10
|
-
//#region sig/owner.ts
|
|
10
|
+
//#region src/sig/owner.ts
|
|
11
11
|
/**
|
|
12
12
|
* Checks if the actor of the given activity owns the specified key.
|
|
13
13
|
* @param activity The activity to check.
|
|
@@ -1,11 +1,11 @@
|
|
|
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-Bz56sKV5.js";
|
|
4
|
+
import { Activity, CryptographicKey } from "./vocab-CA7YwVEz.js";
|
|
5
|
+
import { Actor } from "./actor-C2nhWp6O.js";
|
|
6
6
|
import { TracerProvider } from "@opentelemetry/api";
|
|
7
7
|
|
|
8
|
-
//#region sig/owner.d.ts
|
|
8
|
+
//#region src/sig/owner.d.ts
|
|
9
9
|
/**
|
|
10
10
|
* Options for {@link doesActorOwnKey}.
|
|
11
11
|
* @since 0.8.0
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, DataIntegrityProof, Multikey, deno_default, getTypeId } from "./type-
|
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
|
6
|
+
import { Activity, DataIntegrityProof, Multikey, deno_default, getTypeId } from "./type-C4M92j6x.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-Dytvox0s.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
import { encodeHex } from "byte-encodings/hex";
|
|
11
11
|
import serialize from "json-canon";
|
|
12
12
|
|
|
13
|
-
//#region sig/proof.ts
|
|
13
|
+
//#region src/sig/proof.ts
|
|
14
14
|
const logger = getLogger([
|
|
15
15
|
"fedify",
|
|
16
16
|
"sig",
|
|
@@ -222,7 +222,7 @@ async function verifyProofInternal(jsonLd, proof, options) {
|
|
|
222
222
|
* Verifies the given object. It will verify all the proofs in the object,
|
|
223
223
|
* and succeed only if all the proofs are valid and all attributions and
|
|
224
224
|
* actors are authenticated by the proofs.
|
|
225
|
-
* @
|
|
225
|
+
* @template T The type of the object to verify.
|
|
226
226
|
* @param cls The class of the object to verify. It must be a subclass of
|
|
227
227
|
* the {@link Object}.
|
|
228
228
|
* @param jsonLd The JSON-LD object to verify. It's assumed that the object
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { deno_default, getDocumentLoader } from "./docloader-
|
|
6
|
-
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "./actor-
|
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
|
5
|
+
import { deno_default, getDocumentLoader } from "./docloader-BCgyiRag.js";
|
|
6
|
+
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "./actor-aW87k6YP.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-B9HDRSYF.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
import jsonld from "jsonld";
|
|
@@ -12,7 +12,7 @@ import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
|
|
12
12
|
import { encodeHex } from "byte-encodings/hex";
|
|
13
13
|
import serialize from "json-canon";
|
|
14
14
|
|
|
15
|
-
//#region sig/ld.ts
|
|
15
|
+
//#region src/sig/ld.ts
|
|
16
16
|
const logger$1 = getLogger([
|
|
17
17
|
"fedify",
|
|
18
18
|
"sig",
|
|
@@ -266,7 +266,7 @@ async function hashJsonLd(jsonLd, contextLoader) {
|
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
//#endregion
|
|
269
|
-
//#region sig/owner.ts
|
|
269
|
+
//#region src/sig/owner.ts
|
|
270
270
|
/**
|
|
271
271
|
* Checks if the actor of the given activity owns the specified key.
|
|
272
272
|
* @param activity The activity to check.
|
|
@@ -344,7 +344,7 @@ async function getKeyOwner(keyId, options) {
|
|
|
344
344
|
}
|
|
345
345
|
|
|
346
346
|
//#endregion
|
|
347
|
-
//#region sig/proof.ts
|
|
347
|
+
//#region src/sig/proof.ts
|
|
348
348
|
const logger = getLogger([
|
|
349
349
|
"fedify",
|
|
350
350
|
"sig",
|
|
@@ -556,7 +556,7 @@ async function verifyProofInternal(jsonLd, proof, options) {
|
|
|
556
556
|
* Verifies the given object. It will verify all the proofs in the object,
|
|
557
557
|
* and succeed only if all the proofs are valid and all attributions and
|
|
558
558
|
* actors are authenticated by the proofs.
|
|
559
|
-
* @
|
|
559
|
+
* @template T The type of the object to verify.
|
|
560
560
|
* @param cls The class of the object to verify. It must be a subclass of
|
|
561
561
|
* the {@link Object}.
|
|
562
562
|
* @param jsonLd The JSON-LD object to verify. It's assumed that the object
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
//#region federation/retry.ts
|
|
6
|
+
//#region src/federation/retry.ts
|
|
7
7
|
/**
|
|
8
8
|
* Creates an exponential backoff retry policy. The delay between retries
|
|
9
9
|
* starts at the `initialDelay` and is multiplied by the `factor` for each
|
|
@@ -3,25 +3,25 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { UrlError } from "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import "../lookup-
|
|
11
|
-
import "../actor-
|
|
12
|
-
import "../key-
|
|
13
|
-
import { verifyRequest } from "../http-
|
|
14
|
-
import { getAuthenticatedDocumentLoader } from "../authdocloader-
|
|
15
|
-
import { mockDocumentLoader, test } from "../testing-
|
|
16
|
-
import "../std__assert-
|
|
17
|
-
import { assertRejects } from "../assert_rejects-
|
|
18
|
-
import "../assert_is_error-
|
|
19
|
-
import "../assert_not_equals-
|
|
20
|
-
import "../assert_throws-
|
|
21
|
-
import { rsaPrivateKey2 } from "../keys-
|
|
22
|
-
import { esm_default } from "../esm-
|
|
6
|
+
import { UrlError } from "../type-C4M92j6x.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import "../assert-MZs1qjMx.js";
|
|
9
|
+
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import "../lookup-B0kqr1YK.js";
|
|
11
|
+
import "../actor-CmkL94HP.js";
|
|
12
|
+
import "../key-Dytvox0s.js";
|
|
13
|
+
import { verifyRequest } from "../http-BUhvpgNR.js";
|
|
14
|
+
import { getAuthenticatedDocumentLoader } from "../authdocloader-CfZzF6aW.js";
|
|
15
|
+
import { mockDocumentLoader, test } from "../testing-Ddk8H2Ez.js";
|
|
16
|
+
import "../std__assert-X-_kMxKM.js";
|
|
17
|
+
import { assertRejects } from "../assert_rejects-DiIiJbZn.js";
|
|
18
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
19
|
+
import "../assert_not_equals-f3m3epl3.js";
|
|
20
|
+
import "../assert_throws-BOO88avQ.js";
|
|
21
|
+
import { rsaPrivateKey2 } from "../keys-3qmW6xNM.js";
|
|
22
|
+
import { esm_default } from "../esm-BwBAFDMZ.js";
|
|
23
23
|
|
|
24
|
-
//#region runtime/authdocloader.test.ts
|
|
24
|
+
//#region src/runtime/authdocloader.test.ts
|
|
25
25
|
test("getAuthenticatedDocumentLoader()", async (t) => {
|
|
26
26
|
esm_default.spyGlobal();
|
|
27
27
|
esm_default.get("begin:https://example.com/object", async (cl) => {
|
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { FetchError, UrlError, contexts_default, deno_default, getDocumentLoader, getUserAgent, kvCache } from "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import { MemoryKvStore } from "../kv-
|
|
11
|
-
import "../lookup-
|
|
12
|
-
import { mockDocumentLoader, test } from "../testing-
|
|
13
|
-
import "../std__assert-
|
|
14
|
-
import { assertRejects } from "../assert_rejects-
|
|
15
|
-
import "../assert_is_error-
|
|
16
|
-
import "../assert_not_equals-
|
|
17
|
-
import { assertThrows } from "../assert_throws-
|
|
18
|
-
import { esm_default } from "../esm-
|
|
6
|
+
import { FetchError, UrlError, contexts_default, deno_default, getDocumentLoader, getUserAgent, kvCache } from "../type-C4M92j6x.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import "../assert-MZs1qjMx.js";
|
|
9
|
+
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import { MemoryKvStore } from "../kv-CRZrzyXm.js";
|
|
11
|
+
import "../lookup-B0kqr1YK.js";
|
|
12
|
+
import { mockDocumentLoader, test } from "../testing-Ddk8H2Ez.js";
|
|
13
|
+
import "../std__assert-X-_kMxKM.js";
|
|
14
|
+
import { assertRejects } from "../assert_rejects-DiIiJbZn.js";
|
|
15
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
16
|
+
import "../assert_not_equals-f3m3epl3.js";
|
|
17
|
+
import { assertThrows } from "../assert_throws-BOO88avQ.js";
|
|
18
|
+
import { esm_default } from "../esm-BwBAFDMZ.js";
|
|
19
19
|
import process from "node:process";
|
|
20
20
|
|
|
21
|
-
//#region runtime/docloader.test.ts
|
|
21
|
+
//#region src/runtime/docloader.test.ts
|
|
22
22
|
test("new FetchError()", () => {
|
|
23
23
|
const e = new FetchError("https://example.com/", "An error message.");
|
|
24
24
|
assertEquals(e.name, "FetchError");
|
package/dist/runtime/key.test.js
CHANGED
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { exportMultibaseKey, exportSpki, importMultibaseKey, importPem, importPkcs1, importSpki } from "../type-
|
|
7
|
-
import { assertEquals } from "../assert_equals-
|
|
8
|
-
import "../assert-
|
|
9
|
-
import "../assert_instance_of-
|
|
10
|
-
import "../lookup-
|
|
11
|
-
import "../actor-
|
|
12
|
-
import { exportJwk, importJwk } from "../key-
|
|
13
|
-
import { test } from "../testing-
|
|
14
|
-
import "../std__assert-
|
|
15
|
-
import "../assert_rejects-
|
|
16
|
-
import "../assert_is_error-
|
|
17
|
-
import "../assert_not_equals-
|
|
18
|
-
import "../assert_throws-
|
|
6
|
+
import { exportMultibaseKey, exportSpki, importMultibaseKey, importPem, importPkcs1, importSpki } from "../type-C4M92j6x.js";
|
|
7
|
+
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
|
+
import "../assert-MZs1qjMx.js";
|
|
9
|
+
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
+
import "../lookup-B0kqr1YK.js";
|
|
11
|
+
import "../actor-CmkL94HP.js";
|
|
12
|
+
import { exportJwk, importJwk } from "../key-Dytvox0s.js";
|
|
13
|
+
import { test } from "../testing-Ddk8H2Ez.js";
|
|
14
|
+
import "../std__assert-X-_kMxKM.js";
|
|
15
|
+
import "../assert_rejects-DiIiJbZn.js";
|
|
16
|
+
import "../assert_is_error-BPGph1Jx.js";
|
|
17
|
+
import "../assert_not_equals-f3m3epl3.js";
|
|
18
|
+
import "../assert_throws-BOO88avQ.js";
|
|
19
19
|
|
|
20
|
-
//#region runtime/key.test.ts
|
|
20
|
+
//#region src/runtime/key.test.ts
|
|
21
21
|
const rsaSpki = "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxsRuvCkgJtflBTl4OVsm\nnt/J1mQfZasfJtN33dcZ3d1lJroxmgmMu69zjGEAwkNbMQaWNLqC4eogkJaeJ4RR\n5MHYXkL9nNilVoTkjX5BVit3puzs7XJ7WQnKQgQMI+ezn24GHsZ/v1JIo77lerX5\nk4HNwTNVt+yaZVQWaOMR3+6FwziQR6kd0VuG9/a9dgAnz2cEoORRC1i4W7IZaB1s\nZnh1WbHbevlGd72HSXll5rocPIHn8gq6xpBgpHwRphlRsgn4KHaJ6brXDIJjrnQh\nIe/YUBOGj/ImSEXhRwlFerKsoAVnZ0Hwbfa46qk44TAt8CyoPMWmpK6pt0ng4pQ2\nuwIDAQAB\n-----END PUBLIC KEY-----\n";
|
|
22
22
|
const rsaPkcs1 = "-----BEGIN RSA PUBLIC KEY-----\nMIIBCgKCAQEAxsRuvCkgJtflBTl4OVsmnt/J1mQfZasfJtN33dcZ3d1lJroxmgmM\nu69zjGEAwkNbMQaWNLqC4eogkJaeJ4RR5MHYXkL9nNilVoTkjX5BVit3puzs7XJ7\nWQnKQgQMI+ezn24GHsZ/v1JIo77lerX5k4HNwTNVt+yaZVQWaOMR3+6FwziQR6kd\n0VuG9/a9dgAnz2cEoORRC1i4W7IZaB1sZnh1WbHbevlGd72HSXll5rocPIHn8gq6\nxpBgpHwRphlRsgn4KHaJ6brXDIJjrnQhIe/YUBOGj/ImSEXhRwlFerKsoAVnZ0Hw\nbfa46qk44TAt8CyoPMWmpK6pt0ng4pQ2uwIDAQAB\n-----END RSA PUBLIC KEY-----\n";
|
|
23
23
|
const rsaJwk = {
|