@fedify/fedify 1.9.0-pr.407.1544 → 1.9.0-pr.421.1747
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{actor-Ch5yFYFG.d.ts → actor-C1Euqngb.d.ts} +1 -1
- package/dist/{actor-CeBu8hLy.js → actor-CNV1ck1S.js} +1 -1
- package/dist/actor-DaFSkBV-.cjs +42606 -0
- package/dist/{actor-BY--uubW.js → actor-J-9oLs-V.js} +6951 -2127
- package/dist/actor-Ydzhc8dj.d.cts +128 -0
- package/dist/{authdocloader-C89pKQKE.js → authdocloader-D4qQkXT9.js} +6 -6
- package/dist/{authdocloader-jHzDqZo2.js → authdocloader-DKEFUico.js} +3 -3
- package/dist/authdocloader-DM1vtjbY.cjs +58 -0
- package/dist/{builder-ClMKBUks.js → builder-2yBgTZpU.js} +14 -8
- package/dist/chunk-DqRYRqnO.cjs +34 -0
- package/dist/client-DjT_tegg.d.cts +294 -0
- package/dist/{client-DB3mC1oJ.js → client-nAHORZym.js} +1 -1
- package/dist/compat/mod.cjs +10 -0
- package/dist/compat/mod.d.cts +13 -0
- package/dist/compat/mod.d.ts +7 -7
- package/dist/compat/mod.js +5 -5
- package/dist/compat/transformers.test.js +16 -16
- package/dist/compat-DmDDELst.cjs +4 -0
- package/dist/compat-nxUqe4Z-.js +4 -0
- package/dist/{context-DFruNLny.d.ts → context-CXUibY4L.d.ts} +179 -116
- package/dist/context-CwUAkopp.d.cts +2324 -0
- package/dist/{docloader-BJTPo7_i.js → docloader-BRrqMbX0.js} +188 -8
- package/dist/docloader-D-MrRyHl.d.cts +219 -0
- package/dist/docloader-FAn755Ez.cjs +4862 -0
- package/dist/{esm-BjUpSZdQ.js → esm-CZDlG8Yt.js} +1 -1
- package/dist/federation/builder.test.js +5 -5
- package/dist/federation/collection.test.js +3 -3
- package/dist/federation/handler.test.js +17 -17
- package/dist/federation/idempotency.test.d.ts +3 -0
- package/dist/federation/idempotency.test.js +202 -0
- package/dist/federation/inbox.test.js +4 -4
- package/dist/federation/keycache.test.js +4 -4
- package/dist/federation/kv.test.js +4 -3
- package/dist/federation/middleware.test.js +18 -18
- package/dist/federation/mod.cjs +29 -0
- package/dist/federation/mod.d.cts +13 -0
- package/dist/federation/mod.d.ts +7 -7
- package/dist/federation/mod.js +15 -15
- package/dist/federation/mq.test.js +3 -3
- package/dist/federation/retry.test.js +3 -3
- package/dist/federation/router.test.js +3 -3
- package/dist/federation/send.test.js +10 -10
- package/dist/{federation-CMX7WzeL.js → federation-D1U8YY9t.js} +3 -3
- package/dist/federation-H2_En3j5.cjs +244 -0
- package/dist/fixtures/media.example.com/avatars/test-avatar.jpg.json +6 -0
- package/dist/{http-sU0Wj-tv.js → http-B0Rp4UOp.js} +7 -7
- package/dist/http-B1_DzfAU.d.cts +253 -0
- package/dist/{http-3pAI0mqb.js → http-CyMjXkYA.js} +3 -3
- package/dist/http-D7xo4v5M.cjs +826 -0
- package/dist/{http-D8Q4xH0d.d.ts → http-wsGR6KkT.d.ts} +1 -1
- package/dist/{inbox-Dg825gXU.js → inbox-CAt-VuhL.js} +29 -7
- package/dist/key-BZBF55sg.cjs +10 -0
- package/dist/key-CKScBmP1.js +10 -0
- package/dist/{key-l5QMtRss.js → key-D7A24D7c.js} +5 -5
- package/dist/key-DFZ_CvG0.cjs +290 -0
- package/dist/{key-RzI0hV7H.js → key-DbX-_KvI.js} +2 -2
- package/dist/{key-BWgRsIwz.js → key-uBD0-2wc.js} +3 -3
- package/dist/{keycache-BGlP5YTm.js → keycache-DVVM5m9f.js} +1 -1
- package/dist/{keys-BRbwmdDJ.js → keys-Hl2h0ZG0.js} +1 -1
- package/dist/kv-63Cil1MD.d.cts +81 -0
- package/dist/{ld-C9E9DPBz.js → ld-e-G3iYdn.js} +4 -4
- package/dist/{lookup-oZxe6kZr.js → lookup-DNGo5BR6.js} +21 -12
- package/dist/lookup-DSSOyhz2.cjs +137 -0
- package/dist/{lookup-CN62_yPh.js → lookup-Zzj9McvA.js} +4 -4
- package/dist/{middleware-extU7qDB.js → middleware-4mR2kSKQ.js} +96 -65
- package/dist/middleware-B-YooLeX.cjs +17 -0
- package/dist/middleware-BG51vY-0.js +17 -0
- package/dist/{middleware-jQ1GPh2U.js → middleware-BWW4nCk1.js} +57 -54
- package/dist/middleware-CVb0KXM7.cjs +4271 -0
- package/dist/middleware-DXunR6sJ.js +26 -0
- package/dist/mod-BUbqxBev.d.cts +307 -0
- package/dist/{mod-CiXjux2r.d.ts → mod-BcObK1Lz.d.ts} +2 -2
- package/dist/mod-C2tOeRkN.d.cts +1 -0
- package/dist/{mod-Cy6pkZSn.d.ts → mod-CDObsV1d.d.ts} +19 -1
- package/dist/{mod-BAuhKa9d.d.ts → mod-CIbqfZW0.d.ts} +1 -1
- package/dist/{mod-B7Pc0I7F.d.ts → mod-DgcYoyZK.d.ts} +2 -2
- package/dist/mod-Dt-G9ZOS.d.cts +102 -0
- package/dist/mod-FZd39qVq.d.cts +1 -0
- package/dist/mod-fjqfsrty.d.cts +266 -0
- package/dist/mod-jQ4OODsl.d.cts +113 -0
- package/dist/mod-mXx9V0q5.d.cts +80 -0
- package/dist/mod.cjs +152 -0
- package/dist/mod.d.cts +17 -0
- package/dist/mod.d.ts +10 -10
- package/dist/mod.js +20 -20
- package/dist/mq-B7R1Q-M5.d.cts +140 -0
- package/dist/nodeinfo/client.test.js +5 -5
- package/dist/nodeinfo/handler.test.js +16 -16
- package/dist/nodeinfo/mod.cjs +13 -0
- package/dist/nodeinfo/mod.d.cts +5 -0
- package/dist/nodeinfo/mod.js +6 -6
- package/dist/nodeinfo/semver.test.js +3 -3
- package/dist/nodeinfo/types.test.js +3 -3
- package/dist/nodeinfo-Co9lJrWl.cjs +4 -0
- package/dist/nodeinfo-DfycQ8Wf.js +4 -0
- package/dist/owner-6KSEp9eV.d.cts +67 -0
- package/dist/{owner-D38zBIMc.d.ts → owner-BbeUDvOu.d.ts} +2 -2
- package/dist/{owner-B836JKuZ.js → owner-C4sPn9c4.js} +2 -2
- package/dist/{proof-D63mA1Rv.js → proof-C3QoDkRC.js} +3 -3
- package/dist/proof-DT8hWqV6.cjs +673 -0
- package/dist/{proof-DLwnfKak.js → proof-iy7cOAt6.js} +9 -9
- package/dist/runtime/authdocloader.test.js +9 -9
- package/dist/runtime/docloader.test.js +4 -4
- package/dist/runtime/key.test.js +5 -5
- package/dist/runtime/langstr.test.js +3 -3
- package/dist/runtime/link.test.d.ts +3 -0
- package/dist/runtime/link.test.js +61 -0
- package/dist/runtime/mod.cjs +25 -0
- package/dist/runtime/mod.d.cts +6 -0
- package/dist/runtime/mod.d.ts +3 -3
- package/dist/runtime/mod.js +10 -10
- package/dist/runtime/multibase/multibase.test.js +3 -3
- package/dist/runtime/url.test.js +3 -3
- package/dist/runtime-C58AJWSv.cjs +4 -0
- package/dist/runtime-DPYEDf-o.js +4 -0
- package/dist/{send-CE9GFSCd.js → send-BOn6IbzV.js} +2 -2
- package/dist/sig/http.test.js +9 -9
- package/dist/sig/key.test.js +6 -6
- package/dist/sig/ld.test.js +7 -7
- package/dist/sig/mod.cjs +30 -0
- package/dist/sig/mod.d.cts +8 -0
- package/dist/sig/mod.d.ts +5 -5
- package/dist/sig/mod.js +10 -10
- package/dist/sig/owner.test.js +7 -7
- package/dist/sig/proof.test.js +7 -7
- package/dist/sig-ByHXzqUi.cjs +4 -0
- package/dist/sig-Cj3tk-ig.js +4 -0
- package/dist/testing/docloader.test.js +3 -3
- package/dist/testing/mod.d.ts +385 -110
- package/dist/testing/mod.js +3 -3
- package/dist/{testing-B2tgn0a4.js → testing-DaKcIaFF.js} +2 -2
- package/dist/{transformers-Dna8Fg7k.js → transformers-BFT6d7J5.js} +3 -3
- package/dist/transformers-CoBS-oFG.cjs +116 -0
- package/dist/{type-OboVsUha.js → type-D50ufokc.js} +7261 -2257
- package/dist/{types-BLr6AjjI.js → types-BCmRSiaD.js} +4 -4
- package/dist/types-wG2EuWYS.cjs +488 -0
- package/dist/vocab/actor.test.js +5 -5
- package/dist/vocab/lookup.test.js +255 -5
- package/dist/vocab/mod.cjs +87 -0
- package/dist/vocab/mod.d.cts +6 -0
- package/dist/vocab/mod.d.ts +3 -3
- package/dist/vocab/mod.js +7 -7
- package/dist/vocab/type.test.js +3 -3
- package/dist/vocab/vocab.test.js +433 -9
- package/dist/vocab-B_AjsPE2.cjs +291 -0
- package/dist/{vocab-BEEm2I6u.d.ts → vocab-CDHNj5zp.d.ts} +290 -0
- package/dist/vocab-Cfs0937i.d.cts +14919 -0
- package/dist/{vocab-Z7alheNv.js → vocab-CtBL6Aur.js} +26 -17
- package/dist/webfinger/handler.test.js +16 -16
- package/dist/webfinger/lookup.test.js +4 -4
- package/dist/webfinger/mod.cjs +9 -0
- package/dist/webfinger/mod.d.cts +4 -0
- package/dist/webfinger/mod.js +6 -6
- package/dist/webfinger-BjOEdFPs.cjs +4 -0
- package/dist/webfinger-De_bU0iE.js +4 -0
- package/dist/x/cfworkers.cjs +100 -0
- package/dist/x/cfworkers.d.cts +59 -0
- package/dist/x/cfworkers.js +3 -3
- package/dist/x/cfworkers.test.js +3 -3
- package/dist/x/hono.cjs +61 -0
- package/dist/x/hono.d.cts +54 -0
- package/dist/x/hono.d.ts +6 -6
- package/dist/x/hono.js +3 -3
- package/dist/x/sveltekit.cjs +69 -0
- package/dist/x/sveltekit.d.cts +46 -0
- package/dist/x/sveltekit.d.ts +6 -6
- package/dist/x/sveltekit.js +3 -3
- package/package.json +68 -13
- package/dist/compat-Bb5myD13.js +0 -4
- package/dist/key-_XZAOE9D.js +0 -10
- package/dist/middleware-Ccahu3ql.js +0 -26
- package/dist/middleware-fO804EqJ.js +0 -17
- package/dist/nodeinfo-CyEbLjHs.js +0 -4
- package/dist/runtime-BSkOVUWM.js +0 -4
- package/dist/sig-BXJO--F9.js +0 -4
- package/dist/webfinger-C3GIyXIg.js +0 -4
package/dist/mod.d.ts
CHANGED
@@ -3,17 +3,17 @@ import { URLPattern } from "urlpattern-polyfill";
|
|
3
3
|
import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "./kv-C7sopW2E.js";
|
4
4
|
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, DocumentLoaderFactoryOptions, FetchError, GetDocumentLoaderOptions, GetUserAgentOptions, KvCacheParameters, RemoteDocument, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-CxWcuWqQ.js";
|
5
5
|
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./client-DF8anIB5.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-
|
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-
|
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-CDHNj5zp.js";
|
7
|
+
import { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle } from "./actor-C1Euqngb.js";
|
8
|
+
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-wsGR6KkT.js";
|
9
|
+
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-BbeUDvOu.js";
|
10
|
+
import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./mod-CDObsV1d.js";
|
11
11
|
import { ResourceDescriptor, lookupWebFinger } from "./mod-DBzN0aCM.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,
|
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, IdempotencyKeyCallback, IdempotencyStrategy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-CXUibY4L.js";
|
13
13
|
import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "./mq-CRGm1e_F.js";
|
14
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-
|
14
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-BcObK1Lz.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-
|
19
|
-
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,
|
17
|
+
import { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki } from "./mod-CIbqfZW0.js";
|
18
|
+
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-DgcYoyZK.js";
|
19
|
+
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, IdempotencyKeyCallback, IdempotencyStrategy, 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, Rfc6570Expression, 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, WebFingerLinksDispatcher, 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
@@ -1,23 +1,23 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./transformers-
|
6
|
-
import "./compat-
|
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-
|
18
|
-
import "./nodeinfo-
|
19
|
-
import "./runtime-
|
20
|
-
import "./sig-
|
21
|
-
import "./webfinger-
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
|
5
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./transformers-BFT6d7J5.js";
|
6
|
+
import "./compat-nxUqe4Z-.js";
|
7
|
+
import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-BRrqMbX0.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-J-9oLs-V.js";
|
9
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-4mR2kSKQ.js";
|
10
|
+
import { lookupWebFinger } from "./lookup-Zzj9McvA.js";
|
11
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk } from "./key-D7A24D7c.js";
|
12
|
+
import { signRequest, verifyRequest } from "./http-B0Rp4UOp.js";
|
13
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-iy7cOAt6.js";
|
14
|
+
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-D1U8YY9t.js";
|
15
|
+
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./types-BCmRSiaD.js";
|
16
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-D4qQkXT9.js";
|
17
|
+
import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./vocab-CtBL6Aur.js";
|
18
|
+
import "./nodeinfo-DfycQ8Wf.js";
|
19
|
+
import "./runtime-DPYEDf-o.js";
|
20
|
+
import "./sig-Cj3tk-ig.js";
|
21
|
+
import "./webfinger-De_bU0iE.js";
|
22
22
|
|
23
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 };
|
@@ -0,0 +1,140 @@
|
|
1
|
+
//#region src/federation/mq.d.ts
|
2
|
+
/**
|
3
|
+
* Additional options for enqueuing a message in a queue.
|
4
|
+
*
|
5
|
+
* @since 0.5.0
|
6
|
+
*/
|
7
|
+
interface MessageQueueEnqueueOptions {
|
8
|
+
/**
|
9
|
+
* The delay before the message is enqueued. No delay by default.
|
10
|
+
*
|
11
|
+
* It must not be negative.
|
12
|
+
*/
|
13
|
+
delay?: Temporal.Duration;
|
14
|
+
}
|
15
|
+
/**
|
16
|
+
* Additional options for listening to a message queue.
|
17
|
+
*
|
18
|
+
* @since 1.0.0
|
19
|
+
*/
|
20
|
+
interface MessageQueueListenOptions {
|
21
|
+
/**
|
22
|
+
* The signal to abort listening to the message queue.
|
23
|
+
*/
|
24
|
+
signal?: AbortSignal;
|
25
|
+
}
|
26
|
+
/**
|
27
|
+
* An abstract interface for a message queue.
|
28
|
+
*
|
29
|
+
* @since 0.5.0
|
30
|
+
*/
|
31
|
+
interface MessageQueue {
|
32
|
+
/**
|
33
|
+
* Whether the message queue backend provides native retry mechanisms.
|
34
|
+
* When `true`, Fedify will skip its own retry logic and rely on the backend
|
35
|
+
* to handle retries. When `false` or omitted, Fedify will handle retries
|
36
|
+
* using its own retry policies.
|
37
|
+
*
|
38
|
+
* @default `false`
|
39
|
+
* @since 1.7.0
|
40
|
+
*/
|
41
|
+
readonly nativeRetrial?: boolean;
|
42
|
+
/**
|
43
|
+
* Enqueues a message in the queue.
|
44
|
+
* @param message The message to enqueue.
|
45
|
+
* @param options Additional options for enqueuing the message.
|
46
|
+
*/
|
47
|
+
enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
|
48
|
+
/**
|
49
|
+
* Enqueues multiple messages in the queue. This operation is optional,
|
50
|
+
* and may not be supported by all implementations. If not supported,
|
51
|
+
* Fedify will invoke {@link enqueue} for each message.
|
52
|
+
*
|
53
|
+
* @param messages The messages to enqueue.
|
54
|
+
* @param options Additional options for enqueuing the messages.
|
55
|
+
*/
|
56
|
+
enqueueMany?: (messages: any[], options?: MessageQueueEnqueueOptions) => Promise<void>;
|
57
|
+
/**
|
58
|
+
* Listens for messages in the queue.
|
59
|
+
* @param handler The handler for messages in the queue.
|
60
|
+
* @param options Additional options for listening to the message queue.
|
61
|
+
* @returns A promise that resolves when the listening is done. It never
|
62
|
+
* rejects, and is resolved when the signal is aborted. If no
|
63
|
+
* signal is provided, it never resolves.
|
64
|
+
*/
|
65
|
+
listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
|
66
|
+
}
|
67
|
+
/**
|
68
|
+
* Additional options for {@link InProcessMessageQueue}.
|
69
|
+
* @since 1.0.0
|
70
|
+
*/
|
71
|
+
interface InProcessMessageQueueOptions {
|
72
|
+
/**
|
73
|
+
* The interval to poll for messages in the queue. 5 seconds by default.
|
74
|
+
* @default `{ seconds: 5 }`
|
75
|
+
*/
|
76
|
+
pollInterval?: Temporal.Duration | Temporal.DurationLike;
|
77
|
+
}
|
78
|
+
/**
|
79
|
+
* A message queue that processes messages in the same process.
|
80
|
+
* Do not use this in production as it does neither persist messages nor
|
81
|
+
* distribute them across multiple processes.
|
82
|
+
*
|
83
|
+
* @since 0.5.0
|
84
|
+
*/
|
85
|
+
declare class InProcessMessageQueue implements MessageQueue {
|
86
|
+
#private;
|
87
|
+
/**
|
88
|
+
* In-process message queue does not provide native retry mechanisms.
|
89
|
+
* @since 1.7.0
|
90
|
+
*/
|
91
|
+
readonly nativeRetrial = false;
|
92
|
+
/**
|
93
|
+
* Constructs a new {@link InProcessMessageQueue} with the given options.
|
94
|
+
* @param options Additional options for the in-process message queue.
|
95
|
+
*/
|
96
|
+
constructor(options?: InProcessMessageQueueOptions);
|
97
|
+
enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
|
98
|
+
enqueueMany(messages: any[], options?: MessageQueueEnqueueOptions): Promise<void>;
|
99
|
+
listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
|
100
|
+
}
|
101
|
+
/**
|
102
|
+
* A message queue that processes messages in parallel. It takes another
|
103
|
+
* {@link MessageQueue}, and processes messages in parallel up to a certain
|
104
|
+
* number of workers.
|
105
|
+
*
|
106
|
+
* Actually, it's rather a decorator than a queue itself.
|
107
|
+
*
|
108
|
+
* Note that the workers do not run in truly parallel, in the sense that they
|
109
|
+
* are not running in separate threads or processes. They are running in the
|
110
|
+
* same process, but are scheduled to run in parallel. Hence, this is useful
|
111
|
+
* for I/O-bound tasks, but not for CPU-bound tasks, which is okay for Fedify's
|
112
|
+
* workloads.
|
113
|
+
*
|
114
|
+
* @since 1.0.0
|
115
|
+
*/
|
116
|
+
declare class ParallelMessageQueue implements MessageQueue {
|
117
|
+
#private;
|
118
|
+
readonly queue: MessageQueue;
|
119
|
+
readonly workers: number;
|
120
|
+
/**
|
121
|
+
* Inherits the native retry capability from the wrapped queue.
|
122
|
+
* @since 1.7.0
|
123
|
+
*/
|
124
|
+
readonly nativeRetrial?: boolean;
|
125
|
+
/**
|
126
|
+
* Constructs a new {@link ParallelMessageQueue} with the given queue and
|
127
|
+
* number of workers.
|
128
|
+
* @param queue The message queue to use under the hood. Note that
|
129
|
+
* {@link ParallelMessageQueue} cannot be nested.
|
130
|
+
* @param workers The number of workers to process messages in parallel.
|
131
|
+
* @throws {TypeError} If the given queue is an instance of
|
132
|
+
* {@link ParallelMessageQueue}.
|
133
|
+
*/
|
134
|
+
constructor(queue: MessageQueue, workers: number);
|
135
|
+
enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
|
136
|
+
enqueueMany(messages: any[], options?: MessageQueueEnqueueOptions): Promise<void>;
|
137
|
+
listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
|
138
|
+
}
|
139
|
+
//#endregion
|
140
|
+
export { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue };
|
@@ -3,20 +3,20 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import "../type-
|
6
|
+
import "../type-D50ufokc.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import "../assert-MZs1qjMx.js";
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
10
10
|
import "../semver-dArNLkR9.js";
|
11
|
-
import { getNodeInfo, parseInboundService, parseNodeInfo, parseOutboundService, parseProtocol, parseServices, parseSoftware, parseUsage } from "../client-
|
12
|
-
import "../lookup-
|
13
|
-
import { test } from "../testing-
|
11
|
+
import { getNodeInfo, parseInboundService, parseNodeInfo, parseOutboundService, parseProtocol, parseServices, parseSoftware, parseUsage } from "../client-nAHORZym.js";
|
12
|
+
import "../lookup-DNGo5BR6.js";
|
13
|
+
import { test } from "../testing-DaKcIaFF.js";
|
14
14
|
import "../std__assert-X-_kMxKM.js";
|
15
15
|
import "../assert_rejects-DiIiJbZn.js";
|
16
16
|
import "../assert_is_error-BPGph1Jx.js";
|
17
17
|
import "../assert_not_equals-f3m3epl3.js";
|
18
18
|
import "../assert_throws-BOO88avQ.js";
|
19
|
-
import { esm_default } from "../esm-
|
19
|
+
import { esm_default } from "../esm-CZDlG8Yt.js";
|
20
20
|
|
21
21
|
//#region src/nodeinfo/client.test.ts
|
22
22
|
test("getNodeInfo()", async (t) => {
|
@@ -3,30 +3,30 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import "../type-
|
6
|
+
import "../type-D50ufokc.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import "../assert-MZs1qjMx.js";
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
10
10
|
import { MemoryKvStore } from "../kv-CRZrzyXm.js";
|
11
|
-
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-
|
11
|
+
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-BWW4nCk1.js";
|
12
12
|
import { parseSemVer } from "../semver-dArNLkR9.js";
|
13
|
-
import "../client-
|
14
|
-
import "../lookup-
|
13
|
+
import "../client-nAHORZym.js";
|
14
|
+
import "../lookup-DNGo5BR6.js";
|
15
15
|
import "../types-BIgY6c-l.js";
|
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-
|
16
|
+
import "../actor-CNV1ck1S.js";
|
17
|
+
import "../key-DbX-_KvI.js";
|
18
|
+
import "../http-CyMjXkYA.js";
|
19
|
+
import "../authdocloader-DKEFUico.js";
|
20
|
+
import "../ld-e-G3iYdn.js";
|
21
|
+
import "../owner-C4sPn9c4.js";
|
22
|
+
import "../proof-C3QoDkRC.js";
|
23
|
+
import "../inbox-CAt-VuhL.js";
|
24
|
+
import "../builder-2yBgTZpU.js";
|
25
25
|
import "../collection-CSzG2j1P.js";
|
26
|
-
import "../keycache-
|
26
|
+
import "../keycache-DVVM5m9f.js";
|
27
27
|
import "../retry-D4GJ670a.js";
|
28
|
-
import "../send-
|
29
|
-
import { createRequestContext, test } from "../testing-
|
28
|
+
import "../send-BOn6IbzV.js";
|
29
|
+
import { createRequestContext, test } from "../testing-DaKcIaFF.js";
|
30
30
|
import "../std__assert-X-_kMxKM.js";
|
31
31
|
import "../assert_rejects-DiIiJbZn.js";
|
32
32
|
import "../assert_is_error-BPGph1Jx.js";
|
@@ -0,0 +1,13 @@
|
|
1
|
+
|
2
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
3
|
+
const { URLPattern } = require("urlpattern-polyfill");
|
4
|
+
|
5
|
+
require('../docloader-FAn755Ez.cjs');
|
6
|
+
const require_types = require('../types-wG2EuWYS.cjs');
|
7
|
+
require('../nodeinfo-Co9lJrWl.cjs');
|
8
|
+
|
9
|
+
exports.formatSemVer = require_types.formatSemVer;
|
10
|
+
exports.getNodeInfo = require_types.getNodeInfo;
|
11
|
+
exports.nodeInfoToJson = require_types.nodeInfoToJson;
|
12
|
+
exports.parseNodeInfo = require_types.parseNodeInfo;
|
13
|
+
exports.parseSemVer = require_types.parseSemVer;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import "../kv-63Cil1MD.cjs";
|
2
|
+
import "../docloader-D-MrRyHl.cjs";
|
3
|
+
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../client-DjT_tegg.cjs";
|
4
|
+
import "../mod-FZd39qVq.cjs";
|
5
|
+
export { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, SemVer, Services, Software, Usage, formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer };
|
package/dist/nodeinfo/mod.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
import "../docloader-
|
6
|
-
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../types-
|
7
|
-
import "../nodeinfo-
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
|
5
|
+
import "../docloader-BRrqMbX0.js";
|
6
|
+
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../types-BCmRSiaD.js";
|
7
|
+
import "../nodeinfo-DfycQ8Wf.js";
|
8
8
|
|
9
9
|
export { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer };
|
@@ -3,13 +3,13 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import "../type-
|
6
|
+
import "../type-D50ufokc.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import "../assert-MZs1qjMx.js";
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
10
10
|
import { formatSemVer, parseSemVer } from "../semver-dArNLkR9.js";
|
11
|
-
import "../lookup-
|
12
|
-
import { test } from "../testing-
|
11
|
+
import "../lookup-DNGo5BR6.js";
|
12
|
+
import { test } from "../testing-DaKcIaFF.js";
|
13
13
|
import "../std__assert-X-_kMxKM.js";
|
14
14
|
import "../assert_rejects-DiIiJbZn.js";
|
15
15
|
import "../assert_is_error-BPGph1Jx.js";
|
@@ -3,14 +3,14 @@
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
4
|
globalThis.addEventListener = () => {};
|
5
5
|
|
6
|
-
import "../type-
|
6
|
+
import "../type-D50ufokc.js";
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
8
8
|
import "../assert-MZs1qjMx.js";
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
10
10
|
import "../semver-dArNLkR9.js";
|
11
|
-
import "../lookup-
|
11
|
+
import "../lookup-DNGo5BR6.js";
|
12
12
|
import { nodeInfoToJson } from "../types-BIgY6c-l.js";
|
13
|
-
import { test } from "../testing-
|
13
|
+
import { test } from "../testing-DaKcIaFF.js";
|
14
14
|
import "../std__assert-X-_kMxKM.js";
|
15
15
|
import "../assert_rejects-DiIiJbZn.js";
|
16
16
|
import "../assert_is_error-BPGph1Jx.js";
|
@@ -0,0 +1,67 @@
|
|
1
|
+
import { DocumentLoader } from "./docloader-D-MrRyHl.cjs";
|
2
|
+
import { Activity, CryptographicKey } from "./vocab-Cfs0937i.cjs";
|
3
|
+
import { Actor } from "./actor-Ydzhc8dj.cjs";
|
4
|
+
import { TracerProvider } from "@opentelemetry/api";
|
5
|
+
|
6
|
+
//#region src/sig/owner.d.ts
|
7
|
+
/**
|
8
|
+
* Options for {@link doesActorOwnKey}.
|
9
|
+
* @since 0.8.0
|
10
|
+
*/
|
11
|
+
interface DoesActorOwnKeyOptions {
|
12
|
+
/**
|
13
|
+
* The document loader to use for fetching the actor.
|
14
|
+
*/
|
15
|
+
documentLoader?: DocumentLoader;
|
16
|
+
/**
|
17
|
+
* The context loader to use for JSON-LD context retrieval.
|
18
|
+
*/
|
19
|
+
contextLoader?: DocumentLoader;
|
20
|
+
/**
|
21
|
+
* The OpenTelemetry tracer provider to use for tracing. If omitted,
|
22
|
+
* the global tracer provider is used.
|
23
|
+
* @since 1.3.0
|
24
|
+
*/
|
25
|
+
tracerProvider?: TracerProvider;
|
26
|
+
}
|
27
|
+
/**
|
28
|
+
* Checks if the actor of the given activity owns the specified key.
|
29
|
+
* @param activity The activity to check.
|
30
|
+
* @param key The public key to check.
|
31
|
+
* @param options Options for checking the key ownership.
|
32
|
+
* @returns Whether the actor is the owner of the key.
|
33
|
+
*/
|
34
|
+
declare function doesActorOwnKey(activity: Activity, key: CryptographicKey, options: DoesActorOwnKeyOptions): Promise<boolean>;
|
35
|
+
/**
|
36
|
+
* Options for {@link getKeyOwner}.
|
37
|
+
* @since 0.8.0
|
38
|
+
*/
|
39
|
+
interface GetKeyOwnerOptions {
|
40
|
+
/**
|
41
|
+
* The document loader to use for fetching the key and its owner.
|
42
|
+
*/
|
43
|
+
documentLoader?: DocumentLoader;
|
44
|
+
/**
|
45
|
+
* The context loader to use for JSON-LD context retrieval.
|
46
|
+
*/
|
47
|
+
contextLoader?: DocumentLoader;
|
48
|
+
/**
|
49
|
+
* The OpenTelemetry tracer provider to use for tracing. If omitted,
|
50
|
+
* the global tracer provider is used.
|
51
|
+
* @since 1.3.0
|
52
|
+
*/
|
53
|
+
tracerProvider?: TracerProvider;
|
54
|
+
}
|
55
|
+
/**
|
56
|
+
* Gets the actor that owns the specified key. Returns `null` if the key has no
|
57
|
+
* known owner.
|
58
|
+
*
|
59
|
+
* @param keyId The ID of the key to check, or the key itself.
|
60
|
+
* @param options Options for getting the key owner.
|
61
|
+
* @returns The actor that owns the key, or `null` if the key has no known
|
62
|
+
* owner.
|
63
|
+
* @since 0.7.0
|
64
|
+
*/
|
65
|
+
declare function getKeyOwner(keyId: URL | CryptographicKey, options: GetKeyOwnerOptions): Promise<Actor | null>;
|
66
|
+
//#endregion
|
67
|
+
export { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner };
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
3
3
|
import { DocumentLoader } from "./docloader-CxWcuWqQ.js";
|
4
|
-
import { Activity, CryptographicKey } from "./vocab-
|
5
|
-
import { Actor } from "./actor-
|
4
|
+
import { Activity, CryptographicKey } from "./vocab-CDHNj5zp.js";
|
5
|
+
import { Actor } from "./actor-C1Euqngb.js";
|
6
6
|
import { TracerProvider } from "@opentelemetry/api";
|
7
7
|
|
8
8
|
//#region src/sig/owner.d.ts
|
@@ -3,8 +3,8 @@
|
|
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-D50ufokc.js";
|
7
|
+
import { isActor } from "./actor-CNV1ck1S.js";
|
8
8
|
import { trace } from "@opentelemetry/api";
|
9
9
|
|
10
10
|
//#region src/sig/owner.ts
|
@@ -3,8 +3,8 @@
|
|
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-D50ufokc.js";
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-DbX-_KvI.js";
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
10
10
|
import { encodeHex } from "byte-encodings/hex";
|
@@ -195,7 +195,7 @@ async function verifyProofInternal(jsonLd, proof, options) {
|
|
195
195
|
});
|
196
196
|
return null;
|
197
197
|
}
|
198
|
-
const verified = await crypto.subtle.verify("Ed25519", publicKey.publicKey, proof.proofValue, digest);
|
198
|
+
const verified = await crypto.subtle.verify("Ed25519", publicKey.publicKey, proof.proofValue.slice(), digest);
|
199
199
|
if (!verified) {
|
200
200
|
if (fetchedKey.cached) {
|
201
201
|
logger.debug("Failed to verify the proof with the cached key {keyId}; retrying with the freshly fetched key...", {
|