@fedify/fedify 2.4.0-dev.2141 → 2.4.0-dev.2155
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/{builder-BI7H61zO.mjs → builder-CxHALSwA.mjs} +56 -3
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{compound-proof-D0H4LLvQ.mjs → compound-proof-nhrXTRQO.mjs} +216 -4
- package/dist/{context-CrDDVrbF.d.cts → context-BMggDR-l.d.cts} +394 -5
- package/dist/{context-DfSVPcJ8.mjs → context-OrnjnuMq.mjs} +8 -1
- package/dist/{context-B2C8nuN3.d.ts → context-exYu7gDU.d.ts} +394 -5
- package/dist/{deno-BXI_BLNy.mjs → deno-YLLbRq06.mjs} +1 -1
- package/dist/{docloader-B5BIo7e9.mjs → docloader-vc-pSu9-.mjs} +2 -2
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/compound-fanout.test.mjs +3 -3
- package/dist/federation/handler-compound-proof.test.mjs +4 -4
- package/dist/federation/handler.test.mjs +6 -6
- package/dist/federation/hashlink-media.test.mjs +2 -2
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/metrics.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +8 -8
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.d.cts +3 -3
- package/dist/federation/mod.d.ts +3 -3
- package/dist/federation/mod.js +1 -1
- package/dist/federation/outgoing-proof.test.mjs +5 -5
- package/dist/federation/portable-actor.test.mjs +3 -3
- package/dist/federation/portable-chain.test.mjs +3 -3
- package/dist/federation/portable-collection.test.d.mts +2 -0
- package/dist/federation/portable-collection.test.mjs +768 -0
- package/dist/federation/portable-gateway-keys.test.mjs +4 -4
- package/dist/federation/portable-inbox.test.mjs +4 -4
- package/dist/federation/portable.test.mjs +4 -4
- package/dist/federation/send.test.mjs +3 -3
- package/dist/federation/tasks/enqueue.test.mjs +2 -2
- package/dist/federation/tasks/tasks.test.mjs +3 -3
- package/dist/federation/temporal.test.mjs +1 -1
- package/dist/federation/webfinger.test.mjs +2 -2
- package/dist/{federation-DqDOPjWo.cjs → federation-D9TufmIO.cjs} +684 -68
- package/dist/{http-CEx2SZjf.mjs → http-CXnNbRe_.mjs} +4 -4
- package/dist/{http-D4KW2GTi.js → http-Dk4O3WM0.js} +7 -2
- package/dist/{http-DSYQQn23.cjs → http-eqYXHRkz.cjs} +12 -1
- package/dist/{key-C0giKuki.mjs → key-BZ-Z4uez.mjs} +2 -2
- package/dist/{kv-cache-D_E-2K3i.js → kv-cache-3uKc0G76.js} +1 -1
- package/dist/{kv-cache-AWTrxTq3.mjs → kv-cache-DZr8HTel.mjs} +1 -1
- package/dist/{kv-cache-BcsvaCCL.cjs → kv-cache-DzClEalR.cjs} +1 -1
- package/dist/{ld-CWDReGMZ.mjs → ld-Djxsq6JR.mjs} +3 -3
- package/dist/{metrics-DxlVXwn5.mjs → metrics-CBHhbHgG.mjs} +1 -1
- package/dist/{middleware-1mv9QR16.js → middleware-BDUR99k3.js} +686 -70
- package/dist/{middleware-B7stx5gy.mjs → middleware-BahNnLfD.mjs} +1 -1
- package/dist/{middleware-CAWRGSwH.mjs → middleware-DDa8pCUa.mjs} +431 -80
- package/dist/{mod-C06GoL5Z.d.ts → mod-CnGtADvO.d.ts} +1 -1
- package/dist/{mod-B7SfEqIP.d.cts → mod-Decmur1U.d.cts} +1 -1
- package/dist/mod.cjs +4 -4
- package/dist/mod.d.cts +4 -4
- package/dist/mod.d.ts +4 -4
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/handler.test.mjs +2 -2
- package/dist/{owner-CgoCOTUQ.mjs → owner-OdWSE8am.mjs} +3 -3
- package/dist/{portable-collection-CG9P_i0E.js → portable-collection-BCy06GiS.js} +1 -1
- package/dist/{portable-collection-0_5DyXMt.mjs → portable-collection-DAV7Ho3m.mjs} +2 -2
- package/dist/{portable-collection-BD8fE3j3.cjs → portable-collection-wBWbuHOH.cjs} +1 -1
- package/dist/{portable-key-BXkgMpw1.mjs → portable-key-BL6K88p2.mjs} +1 -1
- package/dist/{proof-B5s-W6Sm.mjs → proof-vZ04IAjq.mjs} +10 -5
- package/dist/{send-BAJvkdNL.mjs → send-ylV8KCLx.mjs} +3 -3
- package/dist/sig/compound-proof-discovery.test.mjs +1 -1
- package/dist/sig/compound-proof-producer.test.mjs +1 -1
- package/dist/sig/compound-proof-verification.test.mjs +2 -2
- package/dist/sig/compound-proof.test.mjs +2 -2
- package/dist/sig/http.test.mjs +2 -2
- package/dist/sig/key.test.mjs +1 -1
- package/dist/sig/ld.test.mjs +2 -2
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/portable-collection.test.mjs +1 -1
- package/dist/sig/portable-key.test.mjs +5 -5
- package/dist/sig/proof.test.mjs +3 -3
- package/dist/{temporal-BkCPJ_uC.mjs → temporal-BTD4f_mZ.mjs} +1 -1
- package/dist/testing/kv.test.mjs +1 -1
- package/dist/testing/mod.d.mts +393 -4
- package/dist/testing/mod.mjs +2 -2
- package/dist/{testing-otQhu4aD.mjs → testing-CKaJhcA0.mjs} +1 -1
- package/dist/utils/docloader.test.mjs +2 -2
- package/dist/utils/kv-cache.test.mjs +1 -1
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +6 -6
|
@@ -490,6 +490,28 @@ type ObjectAuthorizePredicate<TContextData, TParam extends string> = (context: R
|
|
|
490
490
|
*/
|
|
491
491
|
type CustomCollectionDispatcher<TItem, TParam extends string, TContext extends Context<TContextData>, TContextData> = (context: TContext, values: Record<TParam, string>, cursor: string | null) => PageItems<TItem> | null | Promise<PageItems<TItem> | null>;
|
|
492
492
|
/**
|
|
493
|
+
* A callback that maps a custom collection to the identifier of the actor
|
|
494
|
+
* that owns it, so that the collection can be served as an [FEP-ef61]
|
|
495
|
+
* portable collection through the gateway endpoint, e.g.,
|
|
496
|
+
* `GET /.well-known/apgateway/did:key:z6Mk.../users/alice/bookmarks`.
|
|
497
|
+
*
|
|
498
|
+
* Fedify serves such a request only if the returned actor is a portable actor
|
|
499
|
+
* whose ID is under the requested DID. The owner has to come from
|
|
500
|
+
* the application's data, not from the request, since the DID in the request
|
|
501
|
+
* path is not evidence that this server hosts collections for it.
|
|
502
|
+
*
|
|
503
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
504
|
+
*
|
|
505
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
506
|
+
* @template TParam The parameter names of the requested URL.
|
|
507
|
+
* @param context The context.
|
|
508
|
+
* @param values The parameters of the requested URL.
|
|
509
|
+
* @returns The internal identifier of the actor that owns the collection, or
|
|
510
|
+
* `null` if the collection is not a portable collection.
|
|
511
|
+
* @since 2.4.0
|
|
512
|
+
*/
|
|
513
|
+
type PortableCollectionOwnerMapper<TContextData, TParam extends string> = (context: Context<TContextData>, values: Record<TParam, string>) => string | null | Promise<string | null>;
|
|
514
|
+
/**
|
|
493
515
|
* A callback that counts the number of items in a custom collection.
|
|
494
516
|
*
|
|
495
517
|
* @template TParams The parameter names of the requested URL.
|
|
@@ -2819,6 +2841,21 @@ interface CustomCollectionCallbackSetters<TParam extends string, TContext extend
|
|
|
2819
2841
|
* @since 0.7.0
|
|
2820
2842
|
*/
|
|
2821
2843
|
authorize(predicate: ObjectAuthorizePredicate<TContextData, string>): CustomCollectionCallbackSetters<TParam, TContext, TContextData>;
|
|
2844
|
+
/**
|
|
2845
|
+
* Maps the custom collection to the actor that owns it, so that it is also
|
|
2846
|
+
* served as an [FEP-ef61] portable collection through the gateway endpoint,
|
|
2847
|
+
* e.g., `GET /.well-known/apgateway/did:key:z6Mk.../users/alice/bookmarks`,
|
|
2848
|
+
* if the owner is a portable actor under the requested DID. Without it,
|
|
2849
|
+
* the custom collection is not served through the gateway endpoint.
|
|
2850
|
+
*
|
|
2851
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
2852
|
+
* @param mapper A callback that returns the identifier of the actor that
|
|
2853
|
+
* owns the collection, or `null` if the collection is not
|
|
2854
|
+
* portable.
|
|
2855
|
+
* @returns The setters object so that settings can be chained.
|
|
2856
|
+
* @since 2.4.0
|
|
2857
|
+
*/
|
|
2858
|
+
mapPortableOwner(mapper: PortableCollectionOwnerMapper<TContextData, TParam>): CustomCollectionCallbackSetters<TParam, TContext, TContextData>;
|
|
2822
2859
|
}
|
|
2823
2860
|
/**
|
|
2824
2861
|
* Represents an object with a type ID, which is either a constructor or an
|
|
@@ -3074,6 +3111,35 @@ interface Context<TContextData> {
|
|
|
3074
3111
|
*/
|
|
3075
3112
|
getOutboxUri(identifier: string): URL;
|
|
3076
3113
|
/**
|
|
3114
|
+
* Builds the [FEP-ef61] portable ID of an actor's outbox with the given
|
|
3115
|
+
* identifier under the given DID authority.
|
|
3116
|
+
*
|
|
3117
|
+
* The path is the same as the one {@link Context.getOutboxUri} builds, but
|
|
3118
|
+
* the result is an `ap+ef61:` URI whose authority is the DID, e.g.,
|
|
3119
|
+
* `ap+ef61://did:key:z6Mk.../users/alice/outbox`. If a portable actor has
|
|
3120
|
+
* it as its `outbox` and its ID is under the same DID, the collection is
|
|
3121
|
+
* served through the FEP-ef61 gateway endpoint, e.g.,
|
|
3122
|
+
* `/.well-known/apgateway/did:key:z6Mk.../users/alice/outbox`, by the same
|
|
3123
|
+
* collection dispatcher.
|
|
3124
|
+
*
|
|
3125
|
+
* The returned `URL` keeps the DID authority percent-encoded, because
|
|
3126
|
+
* the `URL` class cannot represent the canonical form. Use `formatIri()`
|
|
3127
|
+
* from `@fedify/vocab-runtime` to get the canonical string.
|
|
3128
|
+
*
|
|
3129
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
3130
|
+
*
|
|
3131
|
+
* @param identifier The actor's identifier.
|
|
3132
|
+
* @param authority The DID that controls the actor, e.g.,
|
|
3133
|
+
* `did:key:z6Mk...`. It must be a bare DID, without
|
|
3134
|
+
* a path, query, or fragment.
|
|
3135
|
+
* @returns The outbox's portable ID.
|
|
3136
|
+
* @throws {RouterError} If no outbox dispatcher is available.
|
|
3137
|
+
* @throws {TypeError} If the authority is not a DID, or it is a `did:key`
|
|
3138
|
+
* DID that is not encoded in base58-btc.
|
|
3139
|
+
* @since 2.4.0
|
|
3140
|
+
*/
|
|
3141
|
+
getPortableOutboxUri(identifier: string, authority: string): URL;
|
|
3142
|
+
/**
|
|
3077
3143
|
* Builds the URI of an actor's media upload endpoint with the given
|
|
3078
3144
|
* identifier. This is the endpoint advertised under `endpoints.uploadMedia`
|
|
3079
3145
|
* in the actor document.
|
|
@@ -3105,6 +3171,35 @@ interface Context<TContextData> {
|
|
|
3105
3171
|
*/
|
|
3106
3172
|
getFollowingUri(identifier: string): URL;
|
|
3107
3173
|
/**
|
|
3174
|
+
* Builds the [FEP-ef61] portable ID of an actor's following collection with the given
|
|
3175
|
+
* identifier under the given DID authority.
|
|
3176
|
+
*
|
|
3177
|
+
* The path is the same as the one {@link Context.getFollowingUri} builds, but
|
|
3178
|
+
* the result is an `ap+ef61:` URI whose authority is the DID, e.g.,
|
|
3179
|
+
* `ap+ef61://did:key:z6Mk.../users/alice/following`. If a portable actor has
|
|
3180
|
+
* it as its `following` and its ID is under the same DID, the collection is
|
|
3181
|
+
* served through the FEP-ef61 gateway endpoint, e.g.,
|
|
3182
|
+
* `/.well-known/apgateway/did:key:z6Mk.../users/alice/following`, by the same
|
|
3183
|
+
* collection dispatcher.
|
|
3184
|
+
*
|
|
3185
|
+
* The returned `URL` keeps the DID authority percent-encoded, because
|
|
3186
|
+
* the `URL` class cannot represent the canonical form. Use `formatIri()`
|
|
3187
|
+
* from `@fedify/vocab-runtime` to get the canonical string.
|
|
3188
|
+
*
|
|
3189
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
3190
|
+
*
|
|
3191
|
+
* @param identifier The actor's identifier.
|
|
3192
|
+
* @param authority The DID that controls the actor, e.g.,
|
|
3193
|
+
* `did:key:z6Mk...`. It must be a bare DID, without
|
|
3194
|
+
* a path, query, or fragment.
|
|
3195
|
+
* @returns The following collection's portable ID.
|
|
3196
|
+
* @throws {RouterError} If no following collection is available.
|
|
3197
|
+
* @throws {TypeError} If the authority is not a DID, or it is a `did:key`
|
|
3198
|
+
* DID that is not encoded in base58-btc.
|
|
3199
|
+
* @since 2.4.0
|
|
3200
|
+
*/
|
|
3201
|
+
getPortableFollowingUri(identifier: string, authority: string): URL;
|
|
3202
|
+
/**
|
|
3108
3203
|
* Builds the URI of an actor's followers collection with the given
|
|
3109
3204
|
* identifier.
|
|
3110
3205
|
* @param identifier The actor's identifier.
|
|
@@ -3113,6 +3208,35 @@ interface Context<TContextData> {
|
|
|
3113
3208
|
*/
|
|
3114
3209
|
getFollowersUri(identifier: string): URL;
|
|
3115
3210
|
/**
|
|
3211
|
+
* Builds the [FEP-ef61] portable ID of an actor's followers collection with the given
|
|
3212
|
+
* identifier under the given DID authority.
|
|
3213
|
+
*
|
|
3214
|
+
* The path is the same as the one {@link Context.getFollowersUri} builds, but
|
|
3215
|
+
* the result is an `ap+ef61:` URI whose authority is the DID, e.g.,
|
|
3216
|
+
* `ap+ef61://did:key:z6Mk.../users/alice/followers`. If a portable actor has
|
|
3217
|
+
* it as its `followers` and its ID is under the same DID, the collection is
|
|
3218
|
+
* served through the FEP-ef61 gateway endpoint, e.g.,
|
|
3219
|
+
* `/.well-known/apgateway/did:key:z6Mk.../users/alice/followers`, by the same
|
|
3220
|
+
* collection dispatcher.
|
|
3221
|
+
*
|
|
3222
|
+
* The returned `URL` keeps the DID authority percent-encoded, because
|
|
3223
|
+
* the `URL` class cannot represent the canonical form. Use `formatIri()`
|
|
3224
|
+
* from `@fedify/vocab-runtime` to get the canonical string.
|
|
3225
|
+
*
|
|
3226
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
3227
|
+
*
|
|
3228
|
+
* @param identifier The actor's identifier.
|
|
3229
|
+
* @param authority The DID that controls the actor, e.g.,
|
|
3230
|
+
* `did:key:z6Mk...`. It must be a bare DID, without
|
|
3231
|
+
* a path, query, or fragment.
|
|
3232
|
+
* @returns The followers collection's portable ID.
|
|
3233
|
+
* @throws {RouterError} If no followers collection is available.
|
|
3234
|
+
* @throws {TypeError} If the authority is not a DID, or it is a `did:key`
|
|
3235
|
+
* DID that is not encoded in base58-btc.
|
|
3236
|
+
* @since 2.4.0
|
|
3237
|
+
*/
|
|
3238
|
+
getPortableFollowersUri(identifier: string, authority: string): URL;
|
|
3239
|
+
/**
|
|
3116
3240
|
* Builds the URI of an actor's liked collection with the given identifier.
|
|
3117
3241
|
* @param identifier The actor's identifier.
|
|
3118
3242
|
* @returns The actor's liked collection URI.
|
|
@@ -3121,6 +3245,35 @@ interface Context<TContextData> {
|
|
|
3121
3245
|
*/
|
|
3122
3246
|
getLikedUri(identifier: string): URL;
|
|
3123
3247
|
/**
|
|
3248
|
+
* Builds the [FEP-ef61] portable ID of an actor's liked collection with the given
|
|
3249
|
+
* identifier under the given DID authority.
|
|
3250
|
+
*
|
|
3251
|
+
* The path is the same as the one {@link Context.getLikedUri} builds, but
|
|
3252
|
+
* the result is an `ap+ef61:` URI whose authority is the DID, e.g.,
|
|
3253
|
+
* `ap+ef61://did:key:z6Mk.../users/alice/liked`. If a portable actor has
|
|
3254
|
+
* it as its `liked` and its ID is under the same DID, the collection is
|
|
3255
|
+
* served through the FEP-ef61 gateway endpoint, e.g.,
|
|
3256
|
+
* `/.well-known/apgateway/did:key:z6Mk.../users/alice/liked`, by the same
|
|
3257
|
+
* collection dispatcher.
|
|
3258
|
+
*
|
|
3259
|
+
* The returned `URL` keeps the DID authority percent-encoded, because
|
|
3260
|
+
* the `URL` class cannot represent the canonical form. Use `formatIri()`
|
|
3261
|
+
* from `@fedify/vocab-runtime` to get the canonical string.
|
|
3262
|
+
*
|
|
3263
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
3264
|
+
*
|
|
3265
|
+
* @param identifier The actor's identifier.
|
|
3266
|
+
* @param authority The DID that controls the actor, e.g.,
|
|
3267
|
+
* `did:key:z6Mk...`. It must be a bare DID, without
|
|
3268
|
+
* a path, query, or fragment.
|
|
3269
|
+
* @returns The liked collection's portable ID.
|
|
3270
|
+
* @throws {RouterError} If no liked collection is available.
|
|
3271
|
+
* @throws {TypeError} If the authority is not a DID, or it is a `did:key`
|
|
3272
|
+
* DID that is not encoded in base58-btc.
|
|
3273
|
+
* @since 2.4.0
|
|
3274
|
+
*/
|
|
3275
|
+
getPortableLikedUri(identifier: string, authority: string): URL;
|
|
3276
|
+
/**
|
|
3124
3277
|
* Builds the URI of an actor's featured collection with the given identifier.
|
|
3125
3278
|
* @param identifier The actor's identifier.
|
|
3126
3279
|
* @returns The actor's featured collection URI.
|
|
@@ -3129,6 +3282,35 @@ interface Context<TContextData> {
|
|
|
3129
3282
|
*/
|
|
3130
3283
|
getFeaturedUri(identifier: string): URL;
|
|
3131
3284
|
/**
|
|
3285
|
+
* Builds the [FEP-ef61] portable ID of an actor's featured collection with the given
|
|
3286
|
+
* identifier under the given DID authority.
|
|
3287
|
+
*
|
|
3288
|
+
* The path is the same as the one {@link Context.getFeaturedUri} builds, but
|
|
3289
|
+
* the result is an `ap+ef61:` URI whose authority is the DID, e.g.,
|
|
3290
|
+
* `ap+ef61://did:key:z6Mk.../users/alice/featured`. If a portable actor has
|
|
3291
|
+
* it as its `featured` and its ID is under the same DID, the collection is
|
|
3292
|
+
* served through the FEP-ef61 gateway endpoint, e.g.,
|
|
3293
|
+
* `/.well-known/apgateway/did:key:z6Mk.../users/alice/featured`, by the same
|
|
3294
|
+
* collection dispatcher.
|
|
3295
|
+
*
|
|
3296
|
+
* The returned `URL` keeps the DID authority percent-encoded, because
|
|
3297
|
+
* the `URL` class cannot represent the canonical form. Use `formatIri()`
|
|
3298
|
+
* from `@fedify/vocab-runtime` to get the canonical string.
|
|
3299
|
+
*
|
|
3300
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
3301
|
+
*
|
|
3302
|
+
* @param identifier The actor's identifier.
|
|
3303
|
+
* @param authority The DID that controls the actor, e.g.,
|
|
3304
|
+
* `did:key:z6Mk...`. It must be a bare DID, without
|
|
3305
|
+
* a path, query, or fragment.
|
|
3306
|
+
* @returns The featured collection's portable ID.
|
|
3307
|
+
* @throws {RouterError} If no featured collection is available.
|
|
3308
|
+
* @throws {TypeError} If the authority is not a DID, or it is a `did:key`
|
|
3309
|
+
* DID that is not encoded in base58-btc.
|
|
3310
|
+
* @since 2.4.0
|
|
3311
|
+
*/
|
|
3312
|
+
getPortableFeaturedUri(identifier: string, authority: string): URL;
|
|
3313
|
+
/**
|
|
3132
3314
|
* Builds the URI of an actor's featured tags collection with the given
|
|
3133
3315
|
* identifier.
|
|
3134
3316
|
* @param identifier The actor's identifier.
|
|
@@ -3138,6 +3320,35 @@ interface Context<TContextData> {
|
|
|
3138
3320
|
*/
|
|
3139
3321
|
getFeaturedTagsUri(identifier: string): URL;
|
|
3140
3322
|
/**
|
|
3323
|
+
* Builds the [FEP-ef61] portable ID of an actor's featured tags collection with the given
|
|
3324
|
+
* identifier under the given DID authority.
|
|
3325
|
+
*
|
|
3326
|
+
* The path is the same as the one {@link Context.getFeaturedTagsUri} builds, but
|
|
3327
|
+
* the result is an `ap+ef61:` URI whose authority is the DID, e.g.,
|
|
3328
|
+
* `ap+ef61://did:key:z6Mk.../users/alice/tags`. If a portable actor has
|
|
3329
|
+
* it as its `featuredTags` and its ID is under the same DID, the collection is
|
|
3330
|
+
* served through the FEP-ef61 gateway endpoint, e.g.,
|
|
3331
|
+
* `/.well-known/apgateway/did:key:z6Mk.../users/alice/tags`, by the same
|
|
3332
|
+
* collection dispatcher.
|
|
3333
|
+
*
|
|
3334
|
+
* The returned `URL` keeps the DID authority percent-encoded, because
|
|
3335
|
+
* the `URL` class cannot represent the canonical form. Use `formatIri()`
|
|
3336
|
+
* from `@fedify/vocab-runtime` to get the canonical string.
|
|
3337
|
+
*
|
|
3338
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
3339
|
+
*
|
|
3340
|
+
* @param identifier The actor's identifier.
|
|
3341
|
+
* @param authority The DID that controls the actor, e.g.,
|
|
3342
|
+
* `did:key:z6Mk...`. It must be a bare DID, without
|
|
3343
|
+
* a path, query, or fragment.
|
|
3344
|
+
* @returns The featured tags collection's portable ID.
|
|
3345
|
+
* @throws {RouterError} If no featured tags collection is available.
|
|
3346
|
+
* @throws {TypeError} If the authority is not a DID, or it is a `did:key`
|
|
3347
|
+
* DID that is not encoded in base58-btc.
|
|
3348
|
+
* @since 2.4.0
|
|
3349
|
+
*/
|
|
3350
|
+
getPortableFeaturedTagsUri(identifier: string, authority: string): URL;
|
|
3351
|
+
/**
|
|
3141
3352
|
* Determines the type of the URI and extracts the associated data.
|
|
3142
3353
|
* @param uri The URI to parse.
|
|
3143
3354
|
* @returns The result of parsing the URI. If `null` is given or
|
|
@@ -3396,6 +3607,38 @@ interface Context<TContextData> {
|
|
|
3396
3607
|
* @since 1.8.0
|
|
3397
3608
|
*/
|
|
3398
3609
|
getCollectionUri<TParam extends Record<string, string>>(name: string | symbol, values: TParam): URL;
|
|
3610
|
+
/**
|
|
3611
|
+
* Builds the [FEP-ef61] portable ID of a custom collection with the given
|
|
3612
|
+
* name and values under the given DID authority.
|
|
3613
|
+
*
|
|
3614
|
+
* The path is the same as the one {@link Context.getCollectionUri} builds,
|
|
3615
|
+
* but the result is an `ap+ef61:` URI whose authority is the DID, e.g.,
|
|
3616
|
+
* `ap+ef61://did:key:z6Mk.../users/alice/bookmarks`. If the collection
|
|
3617
|
+
* dispatcher maps the collection to a portable actor under the same DID
|
|
3618
|
+
* with `CustomCollectionCallbackSetters.mapPortableOwner()`, the
|
|
3619
|
+
* collection is served through the FEP-ef61 gateway endpoint, e.g.,
|
|
3620
|
+
* `/.well-known/apgateway/did:key:z6Mk.../users/alice/bookmarks`.
|
|
3621
|
+
*
|
|
3622
|
+
* The returned `URL` keeps the DID authority percent-encoded, because
|
|
3623
|
+
* the `URL` class cannot represent the canonical form. Use `formatIri()`
|
|
3624
|
+
* from `@fedify/vocab-runtime` to get the canonical string.
|
|
3625
|
+
*
|
|
3626
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
3627
|
+
*
|
|
3628
|
+
* @param name The name of the collection, which can be a string or a symbol.
|
|
3629
|
+
* @param values The values of the URI parameters.
|
|
3630
|
+
* @param authority The DID that controls the collection, e.g.,
|
|
3631
|
+
* `did:key:z6Mk...`. It must be a bare DID, without
|
|
3632
|
+
* a path, query, or fragment.
|
|
3633
|
+
* @returns The collection's portable ID.
|
|
3634
|
+
* @throws {RouterError} If no collection dispatcher is available for
|
|
3635
|
+
* the name.
|
|
3636
|
+
* @throws {TypeError} If values are invalid, or the authority is not a DID
|
|
3637
|
+
* or is a `did:key` DID that is not encoded in
|
|
3638
|
+
* base58-btc.
|
|
3639
|
+
* @since 2.4.0
|
|
3640
|
+
*/
|
|
3641
|
+
getPortableCollectionUri<TParam extends Record<string, string>>(name: string | symbol, values: TParam, authority: string): URL;
|
|
3399
3642
|
}
|
|
3400
3643
|
/**
|
|
3401
3644
|
* Information about an [FEP-ef61] portable object requested through
|
|
@@ -3412,7 +3655,7 @@ interface PortableRequest {
|
|
|
3412
3655
|
*/
|
|
3413
3656
|
readonly authority: string;
|
|
3414
3657
|
/**
|
|
3415
|
-
* The ID of the requested portable object, e.g.,
|
|
3658
|
+
* The ID of the requested portable object or collection, e.g.,
|
|
3416
3659
|
* `ap+ef61://did:key:z6Mk.../notes/123`, without a query. Like other
|
|
3417
3660
|
* portable IDs, the `URL` keeps the DID authority percent-encoded; use
|
|
3418
3661
|
* `formatIri()` from `@fedify/vocab-runtime` to get the canonical string.
|
|
@@ -3466,12 +3709,14 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3466
3709
|
* Information about the [FEP-ef61] portable object requested through
|
|
3467
3710
|
* the gateway endpoint, e.g.,
|
|
3468
3711
|
* `GET /.well-known/apgateway/did:key:z6Mk.../notes/123`, which is served
|
|
3469
|
-
* by an object dispatcher
|
|
3470
|
-
* ordinary requests.
|
|
3712
|
+
* by an object dispatcher, the actor dispatcher, or a collection
|
|
3713
|
+
* dispatcher. It is `undefined` for ordinary requests.
|
|
3471
3714
|
*
|
|
3472
3715
|
* The authority comes from the request path, so it is not evidence that
|
|
3473
3716
|
* this server hosts objects for the DID. An object dispatcher or the actor
|
|
3474
|
-
* dispatcher has to check that by itself.
|
|
3717
|
+
* dispatcher has to check that by itself. A portable collection is served
|
|
3718
|
+
* only if its owner, which the actor dispatcher looks up without this
|
|
3719
|
+
* property, is a portable actor under the DID.
|
|
3475
3720
|
*
|
|
3476
3721
|
* It describes the incoming request, so it stays the same in contexts
|
|
3477
3722
|
* derived from this one, e.g., by {@link RequestContext.getObject}.
|
|
@@ -3554,6 +3799,150 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
3554
3799
|
*/
|
|
3555
3800
|
getPortableInboxUri(identifier: string, authority?: string): URL;
|
|
3556
3801
|
/**
|
|
3802
|
+
* Builds the [FEP-ef61] portable ID of an actor's outbox with the given
|
|
3803
|
+
* identifier. It works the same as {@link Context.getPortableOutboxUri}, except that
|
|
3804
|
+
* the authority can be omitted while handling a portable gateway request.
|
|
3805
|
+
* In that case, the DID in {@link RequestContext.portableRequest} is used.
|
|
3806
|
+
*
|
|
3807
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
3808
|
+
*
|
|
3809
|
+
* @param identifier The actor's identifier.
|
|
3810
|
+
* @param authority The DID that controls the actor, e.g.,
|
|
3811
|
+
* `did:key:z6Mk...`. Defaults to the DID of the requested
|
|
3812
|
+
* portable object or collection.
|
|
3813
|
+
* @returns The outbox's portable ID.
|
|
3814
|
+
* @throws {RouterError} If no outbox dispatcher is available.
|
|
3815
|
+
* @throws {TypeError} If the authority is not a DID, it is a `did:key` DID
|
|
3816
|
+
* that is not encoded in base58-btc, or the authority
|
|
3817
|
+
* is omitted outside a portable gateway request.
|
|
3818
|
+
* @since 2.4.0
|
|
3819
|
+
*/
|
|
3820
|
+
getPortableOutboxUri(identifier: string, authority?: string): URL;
|
|
3821
|
+
/**
|
|
3822
|
+
* Builds the [FEP-ef61] portable ID of an actor's following collection with the given
|
|
3823
|
+
* identifier. It works the same as {@link Context.getPortableFollowingUri}, except that
|
|
3824
|
+
* the authority can be omitted while handling a portable gateway request.
|
|
3825
|
+
* In that case, the DID in {@link RequestContext.portableRequest} is used.
|
|
3826
|
+
*
|
|
3827
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
3828
|
+
*
|
|
3829
|
+
* @param identifier The actor's identifier.
|
|
3830
|
+
* @param authority The DID that controls the actor, e.g.,
|
|
3831
|
+
* `did:key:z6Mk...`. Defaults to the DID of the requested
|
|
3832
|
+
* portable object or collection.
|
|
3833
|
+
* @returns The following collection's portable ID.
|
|
3834
|
+
* @throws {RouterError} If no following collection is available.
|
|
3835
|
+
* @throws {TypeError} If the authority is not a DID, it is a `did:key` DID
|
|
3836
|
+
* that is not encoded in base58-btc, or the authority
|
|
3837
|
+
* is omitted outside a portable gateway request.
|
|
3838
|
+
* @since 2.4.0
|
|
3839
|
+
*/
|
|
3840
|
+
getPortableFollowingUri(identifier: string, authority?: string): URL;
|
|
3841
|
+
/**
|
|
3842
|
+
* Builds the [FEP-ef61] portable ID of an actor's followers collection with the given
|
|
3843
|
+
* identifier. It works the same as {@link Context.getPortableFollowersUri}, except that
|
|
3844
|
+
* the authority can be omitted while handling a portable gateway request.
|
|
3845
|
+
* In that case, the DID in {@link RequestContext.portableRequest} is used.
|
|
3846
|
+
*
|
|
3847
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
3848
|
+
*
|
|
3849
|
+
* @param identifier The actor's identifier.
|
|
3850
|
+
* @param authority The DID that controls the actor, e.g.,
|
|
3851
|
+
* `did:key:z6Mk...`. Defaults to the DID of the requested
|
|
3852
|
+
* portable object or collection.
|
|
3853
|
+
* @returns The followers collection's portable ID.
|
|
3854
|
+
* @throws {RouterError} If no followers collection is available.
|
|
3855
|
+
* @throws {TypeError} If the authority is not a DID, it is a `did:key` DID
|
|
3856
|
+
* that is not encoded in base58-btc, or the authority
|
|
3857
|
+
* is omitted outside a portable gateway request.
|
|
3858
|
+
* @since 2.4.0
|
|
3859
|
+
*/
|
|
3860
|
+
getPortableFollowersUri(identifier: string, authority?: string): URL;
|
|
3861
|
+
/**
|
|
3862
|
+
* Builds the [FEP-ef61] portable ID of an actor's liked collection with the given
|
|
3863
|
+
* identifier. It works the same as {@link Context.getPortableLikedUri}, except that
|
|
3864
|
+
* the authority can be omitted while handling a portable gateway request.
|
|
3865
|
+
* In that case, the DID in {@link RequestContext.portableRequest} is used.
|
|
3866
|
+
*
|
|
3867
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
3868
|
+
*
|
|
3869
|
+
* @param identifier The actor's identifier.
|
|
3870
|
+
* @param authority The DID that controls the actor, e.g.,
|
|
3871
|
+
* `did:key:z6Mk...`. Defaults to the DID of the requested
|
|
3872
|
+
* portable object or collection.
|
|
3873
|
+
* @returns The liked collection's portable ID.
|
|
3874
|
+
* @throws {RouterError} If no liked collection is available.
|
|
3875
|
+
* @throws {TypeError} If the authority is not a DID, it is a `did:key` DID
|
|
3876
|
+
* that is not encoded in base58-btc, or the authority
|
|
3877
|
+
* is omitted outside a portable gateway request.
|
|
3878
|
+
* @since 2.4.0
|
|
3879
|
+
*/
|
|
3880
|
+
getPortableLikedUri(identifier: string, authority?: string): URL;
|
|
3881
|
+
/**
|
|
3882
|
+
* Builds the [FEP-ef61] portable ID of an actor's featured collection with the given
|
|
3883
|
+
* identifier. It works the same as {@link Context.getPortableFeaturedUri}, except that
|
|
3884
|
+
* the authority can be omitted while handling a portable gateway request.
|
|
3885
|
+
* In that case, the DID in {@link RequestContext.portableRequest} is used.
|
|
3886
|
+
*
|
|
3887
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
3888
|
+
*
|
|
3889
|
+
* @param identifier The actor's identifier.
|
|
3890
|
+
* @param authority The DID that controls the actor, e.g.,
|
|
3891
|
+
* `did:key:z6Mk...`. Defaults to the DID of the requested
|
|
3892
|
+
* portable object or collection.
|
|
3893
|
+
* @returns The featured collection's portable ID.
|
|
3894
|
+
* @throws {RouterError} If no featured collection is available.
|
|
3895
|
+
* @throws {TypeError} If the authority is not a DID, it is a `did:key` DID
|
|
3896
|
+
* that is not encoded in base58-btc, or the authority
|
|
3897
|
+
* is omitted outside a portable gateway request.
|
|
3898
|
+
* @since 2.4.0
|
|
3899
|
+
*/
|
|
3900
|
+
getPortableFeaturedUri(identifier: string, authority?: string): URL;
|
|
3901
|
+
/**
|
|
3902
|
+
* Builds the [FEP-ef61] portable ID of an actor's featured tags collection with the given
|
|
3903
|
+
* identifier. It works the same as {@link Context.getPortableFeaturedTagsUri}, except that
|
|
3904
|
+
* the authority can be omitted while handling a portable gateway request.
|
|
3905
|
+
* In that case, the DID in {@link RequestContext.portableRequest} is used.
|
|
3906
|
+
*
|
|
3907
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
3908
|
+
*
|
|
3909
|
+
* @param identifier The actor's identifier.
|
|
3910
|
+
* @param authority The DID that controls the actor, e.g.,
|
|
3911
|
+
* `did:key:z6Mk...`. Defaults to the DID of the requested
|
|
3912
|
+
* portable object or collection.
|
|
3913
|
+
* @returns The featured tags collection's portable ID.
|
|
3914
|
+
* @throws {RouterError} If no featured tags collection is available.
|
|
3915
|
+
* @throws {TypeError} If the authority is not a DID, it is a `did:key` DID
|
|
3916
|
+
* that is not encoded in base58-btc, or the authority
|
|
3917
|
+
* is omitted outside a portable gateway request.
|
|
3918
|
+
* @since 2.4.0
|
|
3919
|
+
*/
|
|
3920
|
+
getPortableFeaturedTagsUri(identifier: string, authority?: string): URL;
|
|
3921
|
+
/**
|
|
3922
|
+
* Builds the [FEP-ef61] portable ID of a custom collection with the given
|
|
3923
|
+
* name and values. It works the same as
|
|
3924
|
+
* {@link Context.getPortableCollectionUri}, except that the authority can
|
|
3925
|
+
* be omitted while handling a portable gateway request. In that case,
|
|
3926
|
+
* the DID in {@link RequestContext.portableRequest} is used.
|
|
3927
|
+
*
|
|
3928
|
+
* [FEP-ef61]: https://w3id.org/fep/ef61
|
|
3929
|
+
*
|
|
3930
|
+
* @param name The name of the collection, which can be a string or a symbol.
|
|
3931
|
+
* @param values The values of the URI parameters.
|
|
3932
|
+
* @param authority The DID that controls the collection, e.g.,
|
|
3933
|
+
* `did:key:z6Mk...`. Defaults to the DID of the requested
|
|
3934
|
+
* portable object or collection.
|
|
3935
|
+
* @returns The collection's portable ID.
|
|
3936
|
+
* @throws {RouterError} If no collection dispatcher is available for
|
|
3937
|
+
* the name.
|
|
3938
|
+
* @throws {TypeError} If values are invalid, the authority is not a DID,
|
|
3939
|
+
* it is a `did:key` DID that is not encoded in
|
|
3940
|
+
* base58-btc, or the authority is omitted outside
|
|
3941
|
+
* a portable gateway request.
|
|
3942
|
+
* @since 2.4.0
|
|
3943
|
+
*/
|
|
3944
|
+
getPortableCollectionUri<TParam extends Record<string, string>>(name: string | symbol, values: TParam, authority?: string): URL;
|
|
3945
|
+
/**
|
|
3557
3946
|
* Creates a new context with the same properties as this one,
|
|
3558
3947
|
* but with the given data.
|
|
3559
3948
|
* @param data The new data to associate with the context.
|
|
@@ -4077,4 +4466,4 @@ interface ActorKeyPair extends CryptoKeyPair {
|
|
|
4077
4466
|
readonly multikey: Multikey;
|
|
4078
4467
|
}
|
|
4079
4468
|
//#endregion
|
|
4080
|
-
export { InProcessMessageQueue as $, MediaUploaderSetters as A, HashlinkMediaRequest as At, createFederationBuilder as B, OutboxPermanentFailureHandler as Bt, FederationFetchOptions as C, CollectionCounter as Ct, IdempotencyStrategy as D, CustomCollectionCursor as Dt, IdempotencyKeyCallback as E, CustomCollectionCounter as Et, FederationKvPrefixes as F, ObjectAuthorizePredicate as Ft, TaskRegistry as G,
|
|
4469
|
+
export { InProcessMessageQueue as $, MediaUploaderSetters as A, HashlinkMediaRequest as At, createFederationBuilder as B, OutboxPermanentFailureHandler as Bt, FederationFetchOptions as C, CollectionCounter as Ct, IdempotencyStrategy as D, CustomCollectionCursor as Dt, IdempotencyKeyCallback as E, CustomCollectionCounter as Et, FederationKvPrefixes as F, ObjectAuthorizePredicate as Ft, TaskRegistry as G, UnverifiedActivityReason as Gt, TaskDefinitionOptions as H, PortableCollectionOwnerMapper as Ht, FederationOrigin as I, ObjectDispatcher as It, RetryPolicy as J, SenderKeyPair as Jt, CreateExponentialBackoffPolicyOptions as K, WebFingerLinksDispatcher as Kt, FederationQueueOptions as L, OutboxErrorHandler as Lt, OutboxListenerSetters as M, InboxListener as Mt, PortableInboxForwardingOptions as N, MediaUploaderCallback as Nt, InboxChallengePolicy as O, CustomCollectionDispatcher as Ot, Rfc6570Expression as P, NodeInfoDispatcher as Pt, respondWithObjectIfAcceptable as Q, ActivityTransformer as Qt, createFederation as R, OutboxListener as Rt, FederationBuilder as S, AuthorizePredicate as St, FederationStartQueueOptions as T, CollectionDispatcher as Tt, TaskEnqueueOptions as U, SharedInboxKeyDispatcher as Ut, TaskDefinition as V, PortableActorIdMapper as Vt, TaskHandler as W, UnverifiedActivityHandler as Wt, RespondWithObjectOptions as X, buildCollectionSynchronizationHeader as Xt, createExponentialBackoffPolicy as Y, PageItems as Yt, respondWithObject as Z, digest as Zt, ConstructorWithTypeId as _, parseCircuitBreakerKvState as _t, GetObjectOptions as a, ParallelMessageQueue as at, Federation as b, ActorHandleMapper as bt, OutboxContext as c, CircuitBreakerBeforeSendDecision as ct, RequestContext as d, CircuitBreakerKvState as dt, InProcessMessageQueueOptions as et, RouteActivityOptions as f, CircuitBreakerOptions as ft, CollectionCallbackSetters as g, normalizeCircuitBreakerOptions as gt, ActorCallbackSetters as h, NormalizedCircuitBreakerOptions as ht, GetActorOptions as i, MessageQueueListenOptions as it, ObjectCallbackSetters as j, InboxErrorHandler as jt, InboxListenerSetters as k, HashlinkMediaDispatcher as kt, ParseUriResult as l, CircuitBreakerCreateOptions as lt, SendActivityOptionsForCollection as m, CircuitBreakerStateChange as mt, Context as n, MessageQueueDepth as nt, GetSignedKeyOptions as o, CircuitBreaker as ot, SendActivityOptions as p, CircuitBreakerState as pt, RetryContext as q, SendActivityError as qt, ForwardActivityOptions as r, MessageQueueEnqueueOptions as rt, InboxContext as s, CircuitBreakerActivityDrop as st, ActorKeyPair as t, MessageQueue as tt, PortableRequest as u, CircuitBreakerFailurePolicy as ut, CustomCollectionCallbackSetters as v, ActorAliasMapper as vt, FederationOptions as w, CollectionCursor as wt, FederationBenchmarkOptions as x, ActorKeyPairsDispatcher as xt, Federatable as y, ActorDispatcher as yt, Message as z, OutboxListenerErrorHandler as zt };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { c as validateCryptoKey } from "./key-
|
|
5
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { c as validateCryptoKey } from "./key-BZ-Z4uez.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-CXnNbRe_.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { curry } from "es-toolkit";
|
|
8
8
|
import { UrlError, createActivityPubRequest, getRemoteDocument, logRequest, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
@@ -6,7 +6,7 @@ import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
|
6
6
|
import { t as assertExists } from "../assert_exists-cffSpJ7X.mjs";
|
|
7
7
|
import { t as assertThrows } from "../assert_throws-BYITOvPO.mjs";
|
|
8
8
|
import "../std__assert-DvMDRPes.mjs";
|
|
9
|
-
import { r as createFederationBuilder } from "../builder-
|
|
9
|
+
import { r as createFederationBuilder } from "../builder-CxHALSwA.mjs";
|
|
10
10
|
import { DisallowedOperatorError, DisallowedVarSpecModifierError, DuplicateRouteVariableError, RouteTemplateOptionsNotMatchedError, RouterError } from "@fedify/uri-template";
|
|
11
11
|
import { Activity, Note, Person } from "@fedify/vocab";
|
|
12
12
|
import { test } from "@fedify/fixture";
|
|
@@ -6,11 +6,11 @@ import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
8
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
9
|
-
import { n as exportJwk } from "../key-
|
|
9
|
+
import { n as exportJwk } from "../key-BZ-Z4uez.mjs";
|
|
10
10
|
import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-4IJqPYos.mjs";
|
|
11
|
-
import {
|
|
11
|
+
import { a as signObject, d as verifyProof } from "../proof-vZ04IAjq.mjs";
|
|
12
12
|
import { i as rsaPrivateKey2, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
13
|
-
import { n as FederationImpl } from "../middleware-
|
|
13
|
+
import { n as FederationImpl } from "../middleware-DDa8pCUa.mjs";
|
|
14
14
|
import { Create, DataIntegrityProof, Note } from "@fedify/vocab";
|
|
15
15
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
16
16
|
import { exportDidKey, parseIri } from "@fedify/vocab-runtime";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { r as createRequestContext, t as createInboxContext } from "../context-
|
|
4
|
+
import { r as createRequestContext, t as createInboxContext } from "../context-OrnjnuMq.mjs";
|
|
5
5
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
7
7
|
import "../std__assert-DvMDRPes.mjs";
|
|
8
|
-
import { a as compactJsonLd, m as verifyCompactJsonLd, p as signJsonLd } from "../ld-
|
|
9
|
-
import { l as signRequest } from "../http-
|
|
8
|
+
import { a as compactJsonLd, m as verifyCompactJsonLd, p as signJsonLd } from "../ld-Djxsq6JR.mjs";
|
|
9
|
+
import { l as signRequest } from "../http-CXnNbRe_.mjs";
|
|
10
10
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, n as ed25519PrivateKey, r as ed25519PublicKey, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
11
|
-
import { f as handleInbox, o as createFederation } from "../middleware-
|
|
11
|
+
import { f as handleInbox, o as createFederation } from "../middleware-DDa8pCUa.mjs";
|
|
12
12
|
import { t as ActivityListenerSet } from "../activity-listener-C-BSbKI7.mjs";
|
|
13
13
|
import { t as map_local_create_note_default } from "../map-local-create-note-B0SeXJms.mjs";
|
|
14
14
|
import { Create, CryptographicKey, Multikey, Person, Update } from "@fedify/vocab";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as createOutboxContext, r as createRequestContext, t as createInboxContext } from "../context-
|
|
4
|
+
import { n as createOutboxContext, r as createRequestContext, t as createInboxContext } from "../context-OrnjnuMq.mjs";
|
|
5
5
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
6
6
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
7
7
|
import { t as assertGreaterOrEqual } from "../assert_greater_or_equal-BlafOF4-.mjs";
|
|
@@ -10,12 +10,12 @@ import "../std__assert-DvMDRPes.mjs";
|
|
|
10
10
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
11
11
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
12
12
|
import { r as parseAcceptSignature } from "../accept-CPVqki78.mjs";
|
|
13
|
-
import { o as generateCryptoKeyPair } from "../key-
|
|
14
|
-
import { a as compactJsonLd, p as signJsonLd } from "../ld-
|
|
15
|
-
import {
|
|
16
|
-
import { l as signRequest } from "../http-
|
|
13
|
+
import { o as generateCryptoKeyPair } from "../key-BZ-Z4uez.mjs";
|
|
14
|
+
import { a as compactJsonLd, p as signJsonLd } from "../ld-Djxsq6JR.mjs";
|
|
15
|
+
import { a as signObject } from "../proof-vZ04IAjq.mjs";
|
|
16
|
+
import { l as signRequest } from "../http-CXnNbRe_.mjs";
|
|
17
17
|
import { a as rsaPrivateKey3, c as rsaPublicKey3, s as rsaPublicKey2 } from "../keys-DIJNHW-Y.mjs";
|
|
18
|
-
import { d as handleCustomCollection, f as handleInbox, g as respondWithObjectIfAcceptable, h as respondWithObject, l as handleActor, m as handleOutbox, o as createFederation, p as handleObject, u as handleCollection } from "../middleware-
|
|
18
|
+
import { d as handleCustomCollection, f as handleInbox, g as respondWithObjectIfAcceptable, h as respondWithObject, l as handleActor, m as handleOutbox, o as createFederation, p as handleObject, u as handleCollection } from "../middleware-DDa8pCUa.mjs";
|
|
19
19
|
import { t as ActivityListenerSet } from "../activity-listener-C-BSbKI7.mjs";
|
|
20
20
|
import { Activity, Create, CryptographicKey, Multikey, Note, Person, Tombstone } from "@fedify/vocab";
|
|
21
21
|
import { createTestMeterProvider, createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -10,8 +10,8 @@ import "../std__assert-DvMDRPes.mjs";
|
|
|
10
10
|
import { t as assertStrictEquals } from "../assert_strict_equals-CYvBmkpC.mjs";
|
|
11
11
|
import { t as assert } from "../assert-D1Eafmd_.mjs";
|
|
12
12
|
import { r as ed25519PublicKey } from "../keys-DIJNHW-Y.mjs";
|
|
13
|
-
import { o as createFederation, x as parseHashlinkGatewayRequest } from "../middleware-
|
|
14
|
-
import { r as createFederationBuilder } from "../builder-
|
|
13
|
+
import { o as createFederation, x as parseHashlinkGatewayRequest } from "../middleware-DDa8pCUa.mjs";
|
|
14
|
+
import { r as createFederationBuilder } from "../builder-CxHALSwA.mjs";
|
|
15
15
|
import { n as RouterError } from "../router-u5O5KCQr.mjs";
|
|
16
16
|
import { Note } from "@fedify/vocab";
|
|
17
17
|
import { createTestMeterProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
|
@@ -4,9 +4,9 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as MemoryKvStore } from "../kv-DCHkaJ9-.mjs";
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
6
6
|
import "../std__assert-DvMDRPes.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { a as signObject } from "../proof-vZ04IAjq.mjs";
|
|
8
8
|
import { n as ed25519PrivateKey, r as ed25519PublicKey, t as ed25519Multikey } from "../keys-DIJNHW-Y.mjs";
|
|
9
|
-
import { o as createFederation } from "../middleware-
|
|
9
|
+
import { o as createFederation } from "../middleware-DDa8pCUa.mjs";
|
|
10
10
|
import { Create, Follow, Person } from "@fedify/vocab";
|
|
11
11
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
12
12
|
//#region src/federation/idempotency.test.ts
|
|
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
|
|
|
4
4
|
import { t as assertEquals } from "../assert_equals-Z6IcEbWU.mjs";
|
|
5
5
|
import "../std__assert-DvMDRPes.mjs";
|
|
6
6
|
import { t as assertRejects } from "../assert_rejects-CTptdYck.mjs";
|
|
7
|
-
import { _ as recordKeyLookup, a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, m as recordDocumentFetch, p as recordDocumentCache, r as getFederationMetrics, t as classifyFetchError, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "../metrics-
|
|
7
|
+
import { _ as recordKeyLookup, a as instrumentDocumentLoader, b as recordWebFingerHandle, c as recordCircuitBreakerStateChange, d as recordCollectionRequest, f as recordCollectionTotalItems, g as recordInboxActivity, h as recordFanoutRecipients, i as getRemoteHost, l as recordCollectionDispatchDuration, m as recordDocumentFetch, p as recordDocumentCache, r as getFederationMetrics, t as classifyFetchError, u as recordCollectionPageItems, v as recordOutboxActivity, x as registerQueueDepthGauge, y as recordOutboxEnqueue } from "../metrics-CBHhbHgG.mjs";
|
|
8
8
|
import { createTestMeterProvider, test } from "@fedify/fixture";
|
|
9
9
|
import { FetchError } from "@fedify/vocab-runtime";
|
|
10
10
|
import { DataPointType, MeterProvider, MetricReader } from "@opentelemetry/sdk-metrics";
|