@fedify/fedify 1.7.13 → 1.7.15
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-CPpvuBKU.d.ts → actor.d.ts} +3 -3
- package/dist/{actor-BVilnhZ3.js → actor.js} +6 -6
- package/dist/{assert-LOEeCUK5.js → assert.js} +2 -2
- package/dist/{assert_equals-B44MxcIj.js → assert_equals.js} +16 -16
- package/dist/{assert_instance_of-XtuFevV_.js → assert_instance_of.js} +2 -2
- package/dist/{assert_is_error-BTlryvT0.js → assert_is_error.js} +2 -2
- package/dist/{assert_not_equals-C685gKx6.js → assert_not_equals.js} +3 -6
- package/dist/{assert_rejects-DWQ4jaf9.js → assert_rejects.js} +3 -3
- package/dist/{assert_throws-YetpVSc-.js → assert_throws.js} +3 -3
- package/dist/{authdocloader-DqCINL6u.js → authdocloader.js} +8 -8
- package/dist/{builder-CKUAOfcL.js → builder.js} +7 -7
- package/dist/{chunk-Cx8LTkjm.js → chunk.js} +22 -15
- package/dist/{client-DvtwXO7t.d.ts → client.d.ts} +2 -2
- package/dist/{client-C5xUY491.js → client.js} +3 -3
- package/dist/{collection-Dfb0TPno.js → collection.js} +2 -3
- package/dist/compat/mod.d.ts +79 -12
- package/dist/compat/mod.js +1 -2
- package/dist/compat/transformers.test.js +34 -38
- package/dist/{context-OBWjptjU.d.ts → context.d.ts} +11 -11
- package/dist/{context-aglzx1Ww.js → context.js} +5 -5
- package/dist/{docloader-Q42SMRIB.d.ts → docloader.d.ts} +2 -2
- package/dist/{docloader-Qfs9nPiy.js → docloader.js} +32 -152
- package/dist/{docloader-09nVWLAZ.js → docloader2.js} +1 -1
- package/dist/{esm-DO9PrujO.js → esm.js} +36 -22
- package/dist/federation/builder.test.js +20 -26
- package/dist/federation/collection.test.js +11 -16
- package/dist/federation/handler.test.js +41 -48
- package/dist/federation/inbox.test.js +11 -11
- package/dist/federation/keycache.test.js +12 -11
- package/dist/federation/kv.test.js +8 -10
- package/dist/federation/middleware.test.js +105 -134
- package/dist/federation/mod.d.ts +4 -13
- package/dist/federation/mod.js +206 -12
- package/dist/federation/mq.test.js +12 -17
- package/dist/federation/retry.test.js +5 -4
- package/dist/federation/router.test.js +9 -10
- package/dist/federation/send.test.js +23 -24
- package/dist/{http-DMTrO3Ye.d.ts → http.d.ts} +3 -3
- package/dist/{http-CjDwMreH.js → http.js} +25 -31
- package/dist/{inbox-ApPO50Ma.js → inbox.js} +5 -5
- package/dist/key.js +16 -0
- package/dist/{key-BPUM0v_S.js → key2.js} +5 -5
- package/dist/{keycache-B7Urghlu.js → keycache.js} +2 -2
- package/dist/{keys-DGJec4-R.js → keys.js} +2 -2
- package/dist/{kv-DRaeSXco.d.ts → kv.d.ts} +1 -1
- package/dist/{kv-BMY6Qf_A.js → kv.js} +1 -1
- package/dist/{langstr-DbWheeIS.js → langstr.js} +1 -1
- package/dist/{ld-DJTavNY3.js → ld.js} +9 -12
- package/dist/{lookup-Bf-K85bV.d.ts → lookup.d.ts} +2 -2
- package/dist/{lookup-CkOdKyYR.js → lookup.js} +4 -4
- package/dist/{lookup-CnkkF4Rf.js → lookup2.js} +6 -6
- package/dist/{middleware-BxHcZC4p.js → middleware.js} +35 -39
- package/dist/middleware2.js +32 -0
- package/dist/mod.d.ts +17 -17
- package/dist/mod.js +17 -17
- package/dist/{mod-CDzlVCUF.d.ts → mod2.d.ts} +3 -3
- package/dist/{mod-CCL2cvnI.d.ts → mod3.d.ts} +4 -4
- package/dist/{mq-DYKDDJmp.d.ts → mq.d.ts} +1 -1
- package/dist/{multibase-CnLHszip.js → multibase.js} +1 -1
- package/dist/nodeinfo/client.test.js +19 -28
- package/dist/nodeinfo/handler.test.js +37 -44
- package/dist/nodeinfo/mod.d.ts +2 -5
- package/dist/nodeinfo/mod.js +2 -3
- package/dist/nodeinfo/semver.test.js +13 -21
- package/dist/nodeinfo/types.test.js +9 -11
- package/dist/{owner-D0cOz8R5.d.ts → owner.d.ts} +4 -4
- package/dist/{owner-qKULzrkx.js → owner.js} +4 -4
- package/dist/{proof-d5P09-xk.js → proof.js} +11 -13
- package/dist/{retry-BiIhZWgD.js → retry.js} +1 -1
- package/dist/{router-D_aVZZUc.js → router.js} +1 -1
- package/dist/runtime/authdocloader.test.js +22 -26
- package/dist/runtime/docloader.test.js +56 -56
- package/dist/runtime/key.test.js +31 -53
- package/dist/runtime/langstr.test.js +8 -10
- package/dist/runtime/mod.d.ts +103 -6
- package/dist/runtime/mod.js +6 -7
- package/dist/runtime/multibase/multibase.test.js +12 -18
- package/dist/runtime/url.test.js +7 -6
- package/dist/{semver-BNrOOAs9.js → semver.js} +7 -17
- package/dist/{send-BnMY3Qxa.js → send.js} +4 -4
- package/dist/sig/http.test.js +104 -168
- package/dist/sig/key.test.js +17 -20
- package/dist/sig/ld.test.js +28 -35
- package/dist/sig/mod.d.ts +3 -7
- package/dist/sig/mod.js +6 -7
- package/dist/sig/owner.test.js +24 -30
- package/dist/sig/proof.test.js +24 -29
- package/dist/{std__assert-o_r9vqm1.js → std__assert.js} +7 -13
- package/dist/testing/docloader.test.js +9 -12
- package/dist/testing/mod.js +2 -1
- package/dist/{testing-DLyvtiiW.js → testing.js} +2 -2
- package/dist/{transformers-ghwJuzGY.js → transformers.js} +1 -1
- package/dist/{type-CFuiGLz9.js → type.js} +1 -1
- package/dist/{types-CJHS5pXl.js → types.js} +2 -2
- package/dist/{url-C2xuoQD1.js → url.js} +1 -1
- package/dist/vocab/actor.test.js +76 -128
- package/dist/vocab/lookup.test.js +19 -23
- package/dist/vocab/mod.d.ts +3 -5
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +10 -10
- package/dist/vocab/vocab.test.js +90 -109
- package/dist/{vocab-CzEfWQk2.d.ts → vocab.d.ts} +2 -2
- package/dist/{vocab-S7fEn6XO.js → vocab.js} +318 -454
- package/dist/webfinger/handler.test.js +40 -48
- package/dist/webfinger/lookup.test.js +12 -15
- package/dist/webfinger/mod.d.ts +1 -4
- package/dist/webfinger/mod.js +2 -3
- package/dist/x/cfworkers.d.ts +2 -2
- package/dist/x/cfworkers.test.js +7 -9
- package/dist/x/hono.d.ts +2 -11
- package/dist/x/sveltekit.d.ts +2 -11
- package/package.json +1 -1
- package/dist/actor-CsmPeeHG.js +0 -34925
- package/dist/authdocloader-9g6RkEcR.js +0 -53
- package/dist/compat-Bb5myD13.js +0 -4
- package/dist/docloader-CchlnLWb.js +0 -4598
- package/dist/federation-B0aljx0V.js +0 -203
- package/dist/http-CP3h1SLi.js +0 -796
- package/dist/key--l6NVKdl.js +0 -257
- package/dist/key-1Fv7reaM.js +0 -16
- package/dist/key-DD37RpoD.js +0 -10
- package/dist/lookup-CN-LpF5e.js +0 -127
- package/dist/middleware-BQHe0X6Y.js +0 -17
- package/dist/middleware-C3TZ3P-v.js +0 -33
- package/dist/middleware-CEpilAEY.js +0 -3524
- package/dist/mod-1pDWKvUL.d.ts +0 -2
- package/dist/mod-DFncUgcE.d.ts +0 -82
- package/dist/mod-GIh5OYxW.d.ts +0 -2
- package/dist/mod-g0xFzAP9.d.ts +0 -2
- package/dist/mod-qFMzZ3iF.d.ts +0 -104
- package/dist/nodeinfo-CyEbLjHs.js +0 -4
- package/dist/proof-BfeWBNrY.js +0 -582
- package/dist/runtime-BSkOVUWM.js +0 -4
- package/dist/sig-BXJO--F9.js +0 -4
- package/dist/types-BZUzjGS0.js +0 -455
- package/dist/vocab-C_pE4SvE.js +0 -168
- package/dist/webfinger-C3GIyXIg.js +0 -4
- /package/dist/{denokv-CvROlGYX.js → denokv.js} +0 -0
package/dist/mod-1pDWKvUL.d.ts
DELETED
package/dist/mod-DFncUgcE.d.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
2
|
-
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { Activity } from "./vocab-CzEfWQk2.js";
|
|
4
|
-
import { ActivityTransformer, Context } from "./context-OBWjptjU.js";
|
|
5
|
-
|
|
6
|
-
//#region compat/transformers.d.ts
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* An activity transformer that assigns a new random ID to an activity if it
|
|
10
|
-
* does not already have one. This is useful for ensuring that activities
|
|
11
|
-
* have an ID before they are sent to other servers.
|
|
12
|
-
*
|
|
13
|
-
* The generated ID is an origin URI with a fragment which contains an activity
|
|
14
|
-
* type name with a random UUID:
|
|
15
|
-
*
|
|
16
|
-
* ```
|
|
17
|
-
* https://example.com/#Follow/12345678-1234-5678-1234-567812345678
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* @typeParam TContextData The type of the context data.
|
|
21
|
-
* @param activity The activity to assign an ID to.
|
|
22
|
-
* @param context The context of the activity.
|
|
23
|
-
* @return The activity with an ID assigned.
|
|
24
|
-
* @since 1.4.0
|
|
25
|
-
*/
|
|
26
|
-
declare function autoIdAssigner<TContextData>(activity: Activity, context: Context<TContextData>): Activity;
|
|
27
|
-
/**
|
|
28
|
-
* An activity transformer that dehydrates the actor property of an activity
|
|
29
|
-
* so that it only contains the actor's URI. For example, suppose we have an
|
|
30
|
-
* activity like this:
|
|
31
|
-
*
|
|
32
|
-
* ```typescript
|
|
33
|
-
* import { Follow, Person } from "@fedify/fedify/vocab";
|
|
34
|
-
* const input = new Follow({
|
|
35
|
-
* id: new URL("http://example.com/activities/1"),
|
|
36
|
-
* actor: new Person({
|
|
37
|
-
* id: new URL("http://example.com/actors/1"),
|
|
38
|
-
* name: "Alice",
|
|
39
|
-
* preferredUsername: "alice",
|
|
40
|
-
* }),
|
|
41
|
-
* object: new Person({
|
|
42
|
-
* id: new URL("http://example.com/actors/2"),
|
|
43
|
-
* name: "Bob",
|
|
44
|
-
* preferredUsername: "bob",
|
|
45
|
-
* }),
|
|
46
|
-
* });
|
|
47
|
-
* ```
|
|
48
|
-
*
|
|
49
|
-
* The result of applying this transformer would be:
|
|
50
|
-
*
|
|
51
|
-
* ```typescript
|
|
52
|
-
* import { Follow, Person } from "@fedify/fedify/vocab";
|
|
53
|
-
* const output = new Follow({
|
|
54
|
-
* id: new URL("http://example.com/activities/1"),
|
|
55
|
-
* actor: new URL("http://example.com/actors/1"),
|
|
56
|
-
* object: new Person({
|
|
57
|
-
* id: new URL("http://example.com/actors/2"),
|
|
58
|
-
* name: "Bob",
|
|
59
|
-
* preferredUsername: "bob",
|
|
60
|
-
* }),
|
|
61
|
-
* });
|
|
62
|
-
* ```
|
|
63
|
-
*
|
|
64
|
-
* As some ActivityPub implementations like Threads fail to deal with inlined
|
|
65
|
-
* actor objects, this transformer can be used to work around this issue.
|
|
66
|
-
* @typeParam TContextData The type of the context data.
|
|
67
|
-
* @param activity The activity to dehydrate the actor property of.
|
|
68
|
-
* @param context The context of the activity.
|
|
69
|
-
* @returns The dehydrated activity.
|
|
70
|
-
* @since 1.4.0
|
|
71
|
-
*/
|
|
72
|
-
declare function actorDehydrator<TContextData>(activity: Activity, _context: Context<TContextData>): Activity;
|
|
73
|
-
/**
|
|
74
|
-
* Gets the default activity transformers that are applied to all outgoing
|
|
75
|
-
* activities.
|
|
76
|
-
* @typeParam TContextData The type of the context data.
|
|
77
|
-
* @returns The default activity transformers.
|
|
78
|
-
* @since 1.4.0
|
|
79
|
-
*/
|
|
80
|
-
declare function getDefaultActivityTransformers<TContextData>(): readonly ActivityTransformer<TContextData>[];
|
|
81
|
-
//#endregion
|
|
82
|
-
export { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers };
|
package/dist/mod-GIh5OYxW.d.ts
DELETED
package/dist/mod-g0xFzAP9.d.ts
DELETED
package/dist/mod-qFMzZ3iF.d.ts
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { Temporal } from "@js-temporal/polyfill";
|
|
2
|
-
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { DocumentLoader, DocumentLoaderFactoryOptions } from "./docloader-Q42SMRIB.js";
|
|
4
|
-
import { HttpMessageSignaturesSpecDeterminer } from "./http-DMTrO3Ye.js";
|
|
5
|
-
import { TracerProvider } from "@opentelemetry/api";
|
|
6
|
-
|
|
7
|
-
//#region runtime/authdocloader.d.ts
|
|
8
|
-
/**
|
|
9
|
-
* Options for {@link getAuthenticatedDocumentLoader}.
|
|
10
|
-
* @see {@link getAuthenticatedDocumentLoader}
|
|
11
|
-
* @since 1.3.0
|
|
12
|
-
*/
|
|
13
|
-
interface GetAuthenticatedDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
|
|
14
|
-
/**
|
|
15
|
-
* An optional spec determiner for HTTP Message Signatures.
|
|
16
|
-
* It determines the spec to use for signing requests.
|
|
17
|
-
* It is used for double-knocking
|
|
18
|
-
* (see <https://swicg.github.io/activitypub-http-signature/#how-to-upgrade-supported-versions>).
|
|
19
|
-
* @since 1.6.0
|
|
20
|
-
*/
|
|
21
|
-
specDeterminer?: HttpMessageSignaturesSpecDeterminer;
|
|
22
|
-
/**
|
|
23
|
-
* The OpenTelemetry tracer provider. If omitted, the global tracer provider
|
|
24
|
-
* is used.
|
|
25
|
-
* @since 1.6.0
|
|
26
|
-
*/
|
|
27
|
-
tracerProvider?: TracerProvider;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Gets an authenticated {@link DocumentLoader} for the given identity.
|
|
31
|
-
* Note that an authenticated document loader intentionally does not cache
|
|
32
|
-
* the fetched documents.
|
|
33
|
-
* @param identity The identity to get the document loader for.
|
|
34
|
-
* The actor's key pair.
|
|
35
|
-
* @param options The options for the document loader.
|
|
36
|
-
* @returns The authenticated document loader.
|
|
37
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
|
38
|
-
* @since 0.4.0
|
|
39
|
-
*/
|
|
40
|
-
declare function getAuthenticatedDocumentLoader(identity: {
|
|
41
|
-
keyId: URL;
|
|
42
|
-
privateKey: CryptoKey;
|
|
43
|
-
}, {
|
|
44
|
-
allowPrivateAddress,
|
|
45
|
-
userAgent,
|
|
46
|
-
specDeterminer,
|
|
47
|
-
tracerProvider
|
|
48
|
-
}?: GetAuthenticatedDocumentLoaderOptions): DocumentLoader;
|
|
49
|
-
//#endregion
|
|
50
|
-
//#region runtime/key.d.ts
|
|
51
|
-
/**
|
|
52
|
-
* Imports a PEM-SPKI formatted public key.
|
|
53
|
-
* @param pem The PEM-SPKI formatted public key.
|
|
54
|
-
* @returns The imported public key.
|
|
55
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
|
56
|
-
* @since 0.5.0
|
|
57
|
-
*/
|
|
58
|
-
declare function importSpki(pem: string): Promise<CryptoKey>;
|
|
59
|
-
/**
|
|
60
|
-
* Exports a public key in PEM-SPKI format.
|
|
61
|
-
* @param key The public key to export.
|
|
62
|
-
* @returns The exported public key in PEM-SPKI format.
|
|
63
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
|
64
|
-
* @since 0.5.0
|
|
65
|
-
*/
|
|
66
|
-
declare function exportSpki(key: CryptoKey): Promise<string>;
|
|
67
|
-
/**
|
|
68
|
-
* Imports a PEM-PKCS#1 formatted public key.
|
|
69
|
-
* @param pem The PEM-PKCS#1 formatted public key.
|
|
70
|
-
* @returns The imported public key.
|
|
71
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
|
72
|
-
* @since 1.5.0
|
|
73
|
-
*/
|
|
74
|
-
declare function importPkcs1(pem: string): Promise<CryptoKey>;
|
|
75
|
-
/**
|
|
76
|
-
* Imports a PEM formatted public key (SPKI or PKCS#1).
|
|
77
|
-
* @param pem The PEM formatted public key to import (SPKI or PKCS#1).
|
|
78
|
-
* @returns The imported public key.
|
|
79
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
|
80
|
-
* @since 1.5.0
|
|
81
|
-
*/
|
|
82
|
-
declare function importPem(pem: string): Promise<CryptoKey>;
|
|
83
|
-
/**
|
|
84
|
-
* Imports a [Multibase]-encoded public key.
|
|
85
|
-
*
|
|
86
|
-
* [Multibase]: https://www.w3.org/TR/vc-data-integrity/#multibase-0
|
|
87
|
-
* @param key The Multibase-encoded public key.
|
|
88
|
-
* @returns The imported public key.
|
|
89
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
|
90
|
-
* @since 0.10.0
|
|
91
|
-
*/
|
|
92
|
-
declare function importMultibaseKey(key: string): Promise<CryptoKey>;
|
|
93
|
-
/**
|
|
94
|
-
* Exports a public key in [Multibase] format.
|
|
95
|
-
*
|
|
96
|
-
* [Multibase]: https://www.w3.org/TR/vc-data-integrity/#multibase-0
|
|
97
|
-
* @param key The public key to export.
|
|
98
|
-
* @returns The exported public key in Multibase format.
|
|
99
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
|
100
|
-
* @since 0.10.0
|
|
101
|
-
*/
|
|
102
|
-
declare function exportMultibaseKey(key: CryptoKey): Promise<string>;
|
|
103
|
-
//#endregion
|
|
104
|
-
export { GetAuthenticatedDocumentLoaderOptions, exportMultibaseKey, exportSpki, getAuthenticatedDocumentLoader, importMultibaseKey, importPem, importPkcs1, importSpki };
|