@fedify/fedify 2.4.0-dev.2149 → 2.4.0-dev.2157

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.
Files changed (101) hide show
  1. package/dist/{builder-W2fIPRjv.mjs → builder-CLaS4-yA.mjs} +56 -3
  2. package/dist/{client-DpnpgjyX.mjs → client-CEnNz8O7.mjs} +7 -3
  3. package/dist/compat/mod.d.cts +1 -1
  4. package/dist/compat/mod.d.ts +1 -1
  5. package/dist/compat/transformers.test.mjs +1 -1
  6. package/dist/{compound-proof-B1QH25S6.mjs → compound-proof-D7K94KPz.mjs} +216 -4
  7. package/dist/{context-DfSVPcJ8.mjs → context-B2rlkkyJ.mjs} +9 -2
  8. package/dist/{context-CrDDVrbF.d.cts → context-BMggDR-l.d.cts} +394 -5
  9. package/dist/{context-B2C8nuN3.d.ts → context-exYu7gDU.d.ts} +394 -5
  10. package/dist/{deno-yXpYZm4K.mjs → deno-D1gcWWqB.mjs} +1 -1
  11. package/dist/{dist-BQvArojP.mjs → dist-DJQM4u7i.mjs} +2 -1
  12. package/dist/docloader-BMqr3hji.mjs +79 -0
  13. package/dist/federation/builder.test.mjs +1 -1
  14. package/dist/federation/compound-fanout.test.mjs +3 -3
  15. package/dist/federation/handler-compound-proof.test.mjs +4 -4
  16. package/dist/federation/handler.test.mjs +6 -6
  17. package/dist/federation/hashlink-media.test.mjs +2 -2
  18. package/dist/federation/idempotency.test.mjs +2 -2
  19. package/dist/federation/metrics.test.mjs +1 -1
  20. package/dist/federation/middleware.test.mjs +187 -10
  21. package/dist/federation/mod.cjs +1 -1
  22. package/dist/federation/mod.d.cts +3 -3
  23. package/dist/federation/mod.d.ts +3 -3
  24. package/dist/federation/mod.js +1 -1
  25. package/dist/federation/mq.test.mjs +98 -69
  26. package/dist/federation/outgoing-proof.test.mjs +5 -5
  27. package/dist/federation/portable-actor.test.mjs +3 -3
  28. package/dist/federation/portable-chain.test.mjs +3 -3
  29. package/dist/federation/portable-collection.test.d.mts +2 -0
  30. package/dist/federation/portable-collection.test.mjs +768 -0
  31. package/dist/federation/portable-gateway-keys.test.mjs +4 -4
  32. package/dist/federation/portable-inbox.test.mjs +4 -4
  33. package/dist/federation/portable.test.mjs +4 -4
  34. package/dist/federation/send.test.mjs +84 -3
  35. package/dist/federation/tasks/enqueue.test.mjs +3 -3
  36. package/dist/federation/tasks/tasks.test.mjs +4 -4
  37. package/dist/federation/temporal.test.mjs +1 -1
  38. package/dist/federation/webfinger.test.mjs +2 -2
  39. package/dist/{federation-D4j-ZXUN.cjs → federation-2e8XrN7q.cjs} +700 -70
  40. package/dist/{http-C_jobbLz.cjs → http-BObQoB0j.cjs} +18 -3
  41. package/dist/{http-BoH-e8sR.mjs → http-CGcLv8rh.mjs} +9 -5
  42. package/dist/{http-CBRurnlR.js → http-Dgtt45-K.js} +13 -4
  43. package/dist/{key-BtO7WCfP.mjs → key-CPM4r6tP.mjs} +2 -2
  44. package/dist/{kv-cache-E0es0w4R.js → kv-cache-BweyIZTb.js} +35 -9
  45. package/dist/{kv-cache-BxUqVENn.cjs → kv-cache-D2fnB8qu.cjs} +34 -8
  46. package/dist/{kv-cache-CMuTXrkC.mjs → kv-cache-bdPqTR1k.mjs} +1 -1
  47. package/dist/{ld-YYBfDbe_.mjs → ld-lU_ZqzsQ.mjs} +4 -4
  48. package/dist/{metrics-DMqdDud_.mjs → metrics-B41pRPfd.mjs} +1 -1
  49. package/dist/{middleware-D6uiL1Tw.js → middleware-BYWyYjmX.js} +702 -72
  50. package/dist/{middleware-C97UJpkA.mjs → middleware-TrCVULgs.mjs} +1 -1
  51. package/dist/{middleware-CBGR92fz.mjs → middleware-xdukzV3x.mjs} +432 -81
  52. package/dist/{mod-C06GoL5Z.d.ts → mod-CnGtADvO.d.ts} +1 -1
  53. package/dist/{mod-CZetqT5h.d.ts → mod-DaiBrWDW.d.ts} +2 -0
  54. package/dist/{mod-B7SfEqIP.d.cts → mod-Decmur1U.d.cts} +1 -1
  55. package/dist/{mod-D4g9ffEn.d.cts → mod-Mt4aO3DX.d.cts} +2 -0
  56. package/dist/mod.cjs +5 -5
  57. package/dist/mod.d.cts +5 -5
  58. package/dist/mod.d.ts +5 -5
  59. package/dist/mod.js +5 -5
  60. package/dist/nodeinfo/client.test.mjs +49 -1
  61. package/dist/nodeinfo/handler.test.mjs +2 -2
  62. package/dist/nodeinfo/mod.cjs +1 -1
  63. package/dist/nodeinfo/mod.js +1 -1
  64. package/dist/{owner-Cn6CFYBy.mjs → owner-D63yPo_i.mjs} +3 -3
  65. package/dist/{portable-collection-CWgXwOdR.cjs → portable-collection-B8ojoQ50.cjs} +1 -1
  66. package/dist/{portable-collection-CyhFWEB-.js → portable-collection-C3xEzYri.js} +1 -1
  67. package/dist/{portable-collection-B3swTTja.mjs → portable-collection-_lZg-osX.mjs} +2 -2
  68. package/dist/{portable-key-HM5Siym0.mjs → portable-key-D8uWZF7b.mjs} +1 -1
  69. package/dist/{proof-DWkXfZIU.mjs → proof-C2YwD8a_.mjs} +10 -5
  70. package/dist/{send-BQDT_8bc.mjs → send-D9SGhxTB.mjs} +18 -4
  71. package/dist/sig/compound-proof-discovery.test.mjs +1 -1
  72. package/dist/sig/compound-proof-producer.test.mjs +1 -1
  73. package/dist/sig/compound-proof-verification.test.mjs +2 -2
  74. package/dist/sig/compound-proof.test.mjs +2 -2
  75. package/dist/sig/http.test.mjs +42 -2
  76. package/dist/sig/key.test.mjs +1 -1
  77. package/dist/sig/ld.test.mjs +5 -2
  78. package/dist/sig/mod.cjs +2 -2
  79. package/dist/sig/mod.js +2 -2
  80. package/dist/sig/owner.test.mjs +1 -1
  81. package/dist/sig/portable-collection.test.mjs +2 -2
  82. package/dist/sig/portable-key.test.mjs +6 -6
  83. package/dist/sig/proof.test.mjs +3 -3
  84. package/dist/{tasks-dbCShlCb.mjs → tasks-IG3pHfvZ.mjs} +1 -1
  85. package/dist/{temporal-CFI__wjQ.mjs → temporal-q6FSekcN.mjs} +1 -1
  86. package/dist/testing/context.test.mjs +1 -1
  87. package/dist/testing/kv.test.mjs +3 -3
  88. package/dist/testing/mod.d.mts +393 -4
  89. package/dist/testing/mod.mjs +4 -4
  90. package/dist/{testing-otQhu4aD.mjs → testing-C1itIjqW.mjs} +3 -3
  91. package/dist/{types-C_cNlNVK.js → types-_S2_MeLF.js} +7 -3
  92. package/dist/{types-Be2zbyeG.cjs → types-poIao40f.cjs} +7 -3
  93. package/dist/utils/docloader.test.mjs +297 -2
  94. package/dist/utils/kv-cache.test.mjs +1 -1
  95. package/dist/utils/mod.cjs +1 -1
  96. package/dist/utils/mod.d.cts +1 -1
  97. package/dist/utils/mod.d.ts +1 -1
  98. package/dist/utils/mod.js +1 -1
  99. package/dist/vocab/cjs.test.mjs +1 -1
  100. package/package.json +7 -7
  101. package/dist/docloader-C4h6PL7m.mjs +0 -53
@@ -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 or the actor dispatcher. It is `undefined` for
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, WebFingerLinksDispatcher as Gt, TaskDefinitionOptions as H, SharedInboxKeyDispatcher as Ht, FederationOrigin as I, ObjectDispatcher as It, RetryPolicy as J, PageItems as Jt, CreateExponentialBackoffPolicyOptions as K, SendActivityError 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, createFederation as R, OutboxListener as Rt, FederationBuilder as S, AuthorizePredicate as St, FederationStartQueueOptions as T, CollectionDispatcher as Tt, TaskEnqueueOptions as U, UnverifiedActivityHandler as Ut, TaskDefinition as V, PortableActorIdMapper as Vt, TaskHandler as W, UnverifiedActivityReason as Wt, RespondWithObjectOptions as X, digest as Xt, createExponentialBackoffPolicy as Y, buildCollectionSynchronizationHeader as Yt, respondWithObject as Z, ActivityTransformer 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, SenderKeyPair 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 };
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 };
@@ -3,6 +3,6 @@ import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
  //#region deno.json
5
5
  var name = "@fedify/fedify";
6
- var version = "2.4.0-dev.2149+e2302034";
6
+ var version = "2.4.0-dev.2157+b76e5888";
7
7
  //#endregion
8
8
  export { version as n, name as t };
@@ -6,6 +6,7 @@ import { configure, getConsoleSink, getLogger, reset } from "@logtape/logtape";
6
6
  import "@opentelemetry/sdk-trace-base";
7
7
  import "@opentelemetry/core";
8
8
  //#region ../fixture/dist/mod.js
9
+ const fixtureFetch = globalThis.fetch.bind(globalThis);
9
10
  const logger = getLogger(["fixture", "docloader"]);
10
11
  /**
11
12
  * A mock of the document loader. This does not make any actual HTTP requests
@@ -20,7 +21,7 @@ async function mockDocumentLoader(resource, _options) {
20
21
  if ("navigator" in globalThis && navigator.userAgent === "Cloudflare-Workers") {
21
22
  const testUrl = new URL(url);
22
23
  testUrl.hostname += ".test";
23
- const resp = await fetch(testUrl);
24
+ const resp = await fixtureFetch(testUrl);
24
25
  if (resp.ok) {
25
26
  const document = await resp.json();
26
27
  logger.debug("Successfully fetched fixture {resource}: {status} {statusText}\n{body}", {
@@ -0,0 +1,79 @@
1
+ import "temporal-polyfill";
2
+ import "urlpattern-polyfill";
3
+ globalThis.addEventListener = () => {};
4
+ import { c as validateCryptoKey } from "./key-CPM4r6tP.mjs";
5
+ import { n as doubleKnock } from "./http-CGcLv8rh.mjs";
6
+ import { getLogger } from "@logtape/logtape";
7
+ import { curry } from "es-toolkit";
8
+ import { FetchError, UrlError, createActivityPubRequest, getRemoteDocument, logRequest, validatePublicUrl } from "@fedify/vocab-runtime";
9
+ //#region src/utils/docloader.ts
10
+ const logger = getLogger([
11
+ "fedify",
12
+ "utils",
13
+ "docloader"
14
+ ]);
15
+ const DEFAULT_MAX_REDIRECTION = 20;
16
+ /**
17
+ * Gets an authenticated {@link DocumentLoader} for the given identity.
18
+ * Note that an authenticated document loader intentionally does not cache
19
+ * the fetched documents.
20
+ * At most 20 HTTP redirects and alternate document links are followed in total
21
+ * per call. Revisiting a URL within that chain throws a {@link FetchError}.
22
+ * @param identity The identity to get the document loader for.
23
+ * The actor's key pair.
24
+ * @param options The options for the document loader.
25
+ * @returns The authenticated document loader.
26
+ * @throws {TypeError} If the key is invalid or unsupported.
27
+ * @since 0.4.0
28
+ */
29
+ function getAuthenticatedDocumentLoader(identity, { allowPrivateAddress, maxRedirection, userAgent, specDeterminer, tracerProvider } = {}) {
30
+ validateCryptoKey(identity.privateKey);
31
+ async function load(url, options, redirected = 0, visited = /* @__PURE__ */ new Set()) {
32
+ options?.signal?.throwIfAborted();
33
+ let currentUrl = new URL(url).href;
34
+ await validateUrl(currentUrl, options);
35
+ visited.add(currentUrl);
36
+ const originalRequest = createActivityPubRequest(currentUrl, { userAgent });
37
+ function follow(nextUrl) {
38
+ options?.signal?.throwIfAborted();
39
+ if (redirected >= DEFAULT_MAX_REDIRECTION) throw new FetchError(currentUrl, `Too many redirections (${redirected + 1})`);
40
+ if (visited.has(nextUrl)) throw new FetchError(currentUrl, `Redirect loop detected: ${nextUrl}`);
41
+ redirected++;
42
+ }
43
+ const response = await doubleKnock(originalRequest, identity, {
44
+ maxRedirection,
45
+ specDeterminer,
46
+ log: curry(logRequest)(logger),
47
+ tracerProvider,
48
+ signal: options?.signal,
49
+ validateRedirect: async (nextUrl) => {
50
+ follow(nextUrl);
51
+ await validateUrl(nextUrl, options);
52
+ visited.add(nextUrl);
53
+ currentUrl = nextUrl;
54
+ }
55
+ });
56
+ return getRemoteDocument(currentUrl, response, (alternateUrl) => {
57
+ follow(alternateUrl);
58
+ return load(alternateUrl, options, redirected, visited);
59
+ }, options);
60
+ }
61
+ async function validateUrl(url, options) {
62
+ if (!allowPrivateAddress) try {
63
+ await validatePublicUrl(url);
64
+ } catch (error) {
65
+ if (error instanceof UrlError) if (error.reason === "dns") logger.debug("DNS lookup failed for {url}", {
66
+ url,
67
+ error
68
+ });
69
+ else logger[options?.suppressError ? "warn" : "error"]("Disallowed private URL: {url}", {
70
+ url,
71
+ error
72
+ });
73
+ throw error;
74
+ }
75
+ }
76
+ return (url, options) => load(url, options);
77
+ }
78
+ //#endregion
79
+ export { getAuthenticatedDocumentLoader as t };
@@ -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-W2fIPRjv.mjs";
9
+ import { r as createFederationBuilder } from "../builder-CLaS4-yA.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-BtO7WCfP.mjs";
9
+ import { n as exportJwk } from "../key-CPM4r6tP.mjs";
10
10
  import { r as normalizeOutgoingActivityJsonLd } from "../outgoing-jsonld-4IJqPYos.mjs";
11
- import { i as signObject, u as verifyProof } from "../proof-DWkXfZIU.mjs";
11
+ import { a as signObject, d as verifyProof } from "../proof-C2YwD8a_.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-CBGR92fz.mjs";
13
+ import { n as FederationImpl } from "../middleware-xdukzV3x.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-DfSVPcJ8.mjs";
4
+ import { r as createRequestContext, t as createInboxContext } from "../context-B2rlkkyJ.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-YYBfDbe_.mjs";
9
- import { l as signRequest } from "../http-BoH-e8sR.mjs";
8
+ import { a as compactJsonLd, m as verifyCompactJsonLd, p as signJsonLd } from "../ld-lU_ZqzsQ.mjs";
9
+ import { l as signRequest } from "../http-CGcLv8rh.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-CBGR92fz.mjs";
11
+ import { f as handleInbox, o as createFederation } from "../middleware-xdukzV3x.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";