@fedify/fedify 1.6.1-dev.869 → 1.6.1-dev.873
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/{vocab/actor.js → actor-DhyIYEBl.js} +5 -4
- package/dist/{vocab/actor.d.ts → actor-lFlm8FYo.d.ts} +2 -2
- package/dist/actor-trV1ExpS.js +36173 -0
- package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert.js → assert-Dv75vaGI.js} +2 -1
- package/dist/assert_equals-ClvzlhZu.js +1020 -0
- package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_instance_of.js → assert_instance_of--9UCVKsi.js} +2 -1
- package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_is_error.js → assert_is_error-D162gXcM.js} +2 -2
- package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_not_equals.js → assert_not_equals-Cyf5m9Ke.js} +2 -2
- package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_rejects.js → assert_rejects-FOHCtlD2.js} +23 -3
- package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_throws.js → assert_throws-CRfQJvVx.js} +3 -2
- package/dist/authdocloader-4i4HAp9R.js +51 -0
- package/dist/{runtime/authdocloader.js → authdocloader-BXgFJugo.js} +5 -4
- package/dist/{federation/builder.js → builder-Bh56oIkr.js} +6 -5
- package/dist/{_virtual/rolldown_runtime.js → chunk-HsBuZ-b2.js} +1 -0
- package/dist/{nodeinfo/client.js → client-BoT1mhNh.js} +3 -2
- package/dist/client-Dw1pCSIt.d.ts +299 -0
- package/dist/{federation/collection.js → collection-QaGK9TVn.js} +1 -0
- package/dist/compat/mod.d.ts +12 -2
- package/dist/compat/mod.js +2 -1
- package/dist/compat/transformers.test.d.ts +2 -1
- package/dist/compat/transformers.test.js +32 -8
- package/dist/{testing/context.js → context-B2499YhO.js} +5 -4
- package/dist/context-CzJXjNR8.d.ts +2034 -0
- package/dist/{x/denokv.js → denokv-iB_ggPGm.js} +3 -1
- package/dist/{testing/docloader.js → docloader-09nVWLAZ.js} +1 -0
- package/dist/{runtime/contexts.js → docloader-CMlE_DQr.js} +420 -1
- package/dist/{runtime/docloader.d.ts → docloader-DTRsVZPo.d.ts} +1 -1
- package/dist/docloader-lJiW6zUk.js +4594 -0
- package/dist/esm-BxIKwi-M.js +1221 -0
- package/dist/federation/builder.test.d.ts +2 -1
- package/dist/federation/builder.test.js +21 -7
- package/dist/federation/collection.test.d.ts +2 -1
- package/dist/federation/collection.test.js +11 -3
- package/dist/federation/handler.test.d.ts +2 -1
- package/dist/federation/handler.test.js +40 -12
- package/dist/federation/inbox.test.d.ts +2 -1
- package/dist/federation/inbox.test.js +12 -5
- package/dist/federation/keycache.test.d.ts +2 -1
- package/dist/federation/keycache.test.js +12 -7
- package/dist/federation/kv.test.d.ts +2 -1
- package/dist/federation/kv.test.js +11 -3
- package/dist/federation/middleware.test.d.ts +2 -1
- package/dist/federation/middleware.test.js +107 -26
- package/dist/federation/mod.d.ts +13 -13
- package/dist/federation/mod.js +12 -8
- package/dist/federation/mq.test.d.ts +2 -1
- package/dist/federation/mq.test.js +153 -6
- package/dist/federation/retry.test.d.ts +2 -1
- package/dist/federation/retry.test.js +5 -5
- package/dist/federation/router.test.d.ts +2 -1
- package/dist/federation/router.test.js +11 -6
- package/dist/federation/send.test.d.ts +2 -1
- package/dist/federation/send.test.js +25 -13
- package/dist/{federation/mq.js → federation-Bmj7soSg.js} +47 -1
- package/dist/{node_modules/.pnpm/@jsr_hongminhee__deno-mock-fetch@0.3.2/node_modules/@jsr/hongminhee__deno-mock-fetch/router.js → hongminhee__deno-mock-fetch-DJKLj_H-.js} +96 -1
- package/dist/http-BImJcLfv.d.ts +258 -0
- package/dist/{sig/http.js → http-CFQSpmJT.js} +5 -4
- package/dist/http-DtHTiemN.js +720 -0
- package/dist/{federation/inbox.js → inbox-DkHjiHqX.js} +4 -3
- package/dist/key-B5Eb05gk.js +16 -0
- package/dist/key-BYBj-UD-.js +10 -0
- package/dist/key-CkoTQfVN.js +262 -0
- package/dist/{sig/key.js → key-a7_2L5_Z.js} +2 -4
- package/dist/{federation/keycache.js → keycache-D8j8RFWf.js} +2 -1
- package/dist/{testing/keys.js → keys-DxEMe-K1.js} +2 -2
- package/dist/{federation/kv.js → kv-DohFOP2C.js} +1 -0
- package/dist/{runtime/langstr.js → langstr-DbWheeIS.js} +1 -0
- package/dist/{sig/ld.js → ld-I1s-XiQ5.js} +6 -6
- package/dist/{vocab/lookup.js → lookup--9t_F8FE.js} +5 -5
- package/dist/lookup-BDLFt_tc.js +131 -0
- package/dist/{webfinger/lookup.js → lookup-BUFWWv5q.js} +1 -3
- package/dist/{webfinger/jrd.d.ts → lookup-DAfStZtI.d.ts} +41 -1
- package/dist/middleware-BPXHlM9G.js +17 -0
- package/dist/middleware-ByU_X6O9.js +33 -0
- package/dist/middleware-CNVKIPYL.js +3525 -0
- package/dist/{federation/middleware.js → middleware-ewowwb4s.js} +957 -105
- package/dist/mod-1pDWKvUL.d.ts +2 -0
- package/dist/{runtime/key.d.ts → mod-BxwG4X3V.d.ts} +52 -7
- package/dist/{compat/transformers.d.ts → mod-CeLnlsqE.d.ts} +3 -4
- package/dist/{vocab/lookup.d.ts → mod-DysVoXOu.d.ts} +98 -3
- package/dist/mod-GIh5OYxW.d.ts +2 -0
- package/dist/{sig/ld.d.ts → mod-XT0mRthe.d.ts} +126 -4
- package/dist/mod-g0xFzAP9.d.ts +2 -0
- package/dist/mod.d.ts +18 -34
- package/dist/mod.js +17 -27
- package/dist/multibase-DeCHcK8L.js +316 -0
- package/dist/nodeinfo/client.test.d.ts +2 -1
- package/dist/nodeinfo/client.test.js +15 -4
- package/dist/nodeinfo/handler.test.d.ts +2 -1
- package/dist/nodeinfo/handler.test.js +39 -7
- package/dist/nodeinfo/mod.d.ts +4 -3
- package/dist/nodeinfo/mod.js +3 -3
- package/dist/nodeinfo/semver.test.d.ts +2 -1
- package/dist/nodeinfo/semver.test.js +11 -4
- package/dist/nodeinfo/types.test.d.ts +2 -1
- package/dist/nodeinfo/types.test.js +12 -4
- package/dist/{sig/owner.js → owner-2Gouxs6Y.js} +4 -4
- package/dist/{sig/owner.d.ts → owner-BjpObx-L.d.ts} +4 -6
- package/dist/proof-BcNfBguh.js +595 -0
- package/dist/{sig/proof.js → proof-CJ291J94.js} +5 -4
- package/dist/{federation/retry.js → retry-BiIhZWgD.js} +1 -0
- package/dist/{federation/router.js → router-D_aVZZUc.js} +1 -0
- package/dist/runtime/authdocloader.test.d.ts +2 -1
- package/dist/runtime/authdocloader.test.js +24 -9
- package/dist/runtime/docloader.test.d.ts +2 -1
- package/dist/runtime/docloader.test.js +15 -11
- package/dist/runtime/key.test.d.ts +2 -1
- package/dist/runtime/key.test.js +19 -4
- package/dist/runtime/langstr.test.d.ts +2 -1
- package/dist/runtime/langstr.test.js +11 -3
- package/dist/runtime/mod.d.ts +5 -4
- package/dist/runtime/mod.js +7 -4
- package/dist/runtime/multibase/multibase.test.d.ts +2 -1
- package/dist/runtime/multibase/multibase.test.js +11 -5
- package/dist/runtime/url.test.d.ts +2 -1
- package/dist/runtime/url.test.js +7 -6
- package/dist/{nodeinfo/semver.js → semver-CbbIgUsa.js} +1 -0
- package/dist/{federation/send.js → send-BFMnzlj7.js} +3 -2
- package/dist/sig/http.test.d.ts +2 -1
- package/dist/sig/http.test.js +23 -12
- package/dist/sig/key.test.d.ts +2 -1
- package/dist/sig/key.test.js +21 -8
- package/dist/sig/ld.test.d.ts +2 -1
- package/dist/sig/ld.test.js +19 -11
- package/dist/sig/mod.d.ts +7 -5
- package/dist/sig/mod.js +7 -5
- package/dist/sig/owner.test.d.ts +2 -1
- package/dist/sig/owner.test.js +23 -9
- package/dist/sig/proof.test.d.ts +2 -1
- package/dist/sig/proof.test.js +22 -10
- package/dist/std__assert-CaBUULmX.js +151 -0
- package/dist/testing/docloader.test.d.ts +2 -1
- package/dist/testing/docloader.test.js +11 -3
- package/dist/testing/mod.d.ts +1 -0
- package/dist/testing/mod.js +2 -136
- package/dist/testing-jcGLO9Lp.js +143 -0
- package/dist/{compat/transformers.js → transformers-jxj-4o2K.js} +1 -1
- package/dist/{vocab/type.js → type-D2s5lmbZ.js} +1 -0
- package/dist/{nodeinfo/types.js → types-CqoqWDkp.js} +2 -1
- package/dist/types-Cx0IUMu0.js +457 -0
- package/dist/{runtime/url.js → url-kTAI6_KP.js} +1 -0
- package/dist/vocab/actor.test.d.ts +2 -1
- package/dist/vocab/actor.test.js +5853 -14
- package/dist/vocab/lookup.test.d.ts +2 -1
- package/dist/vocab/lookup.test.js +20 -7
- package/dist/vocab/mod.d.ts +5 -5
- package/dist/vocab/mod.js +4 -5
- package/dist/vocab/type.test.d.ts +2 -1
- package/dist/vocab/type.test.js +9 -4
- package/dist/vocab/vocab.test.d.ts +2 -1
- package/dist/vocab/vocab.test.js +2440 -15
- package/dist/{vocab/vocab.d.ts → vocab-CLWdoo7y.d.ts} +21 -9
- package/dist/{vocab/vocab.js → vocab-Dwop3xOF.js} +331 -182
- package/dist/vocab-uQObf7P6.js +172 -0
- package/dist/webfinger/handler.test.d.ts +2 -1
- package/dist/webfinger/handler.test.js +39 -7
- package/dist/webfinger/lookup.test.d.ts +2 -1
- package/dist/webfinger/lookup.test.js +14 -4
- package/dist/webfinger/mod.d.ts +4 -2
- package/dist/webfinger/mod.js +3 -1
- package/dist/x/cfworkers.d.ts +49 -0
- package/dist/x/cfworkers.js +73 -0
- package/dist/x/cfworkers.test.d.ts +3 -0
- package/dist/x/cfworkers.test.js +153 -0
- package/dist/x/hono.d.ts +11 -2
- package/dist/x/sveltekit.d.ts +11 -2
- package/package.json +6 -1
- package/dist/codegen/fs.js +0 -23
- package/dist/codegen/schema.js +0 -88
- package/dist/codegen/type.js +0 -392
- package/dist/compat/types.d.ts +0 -18
- package/dist/deno.js +0 -137
- package/dist/federation/builder.d.ts +0 -19
- package/dist/federation/callback.d.ts +0 -211
- package/dist/federation/collection.d.ts +0 -36
- package/dist/federation/context.d.ts +0 -757
- package/dist/federation/federation.d.ts +0 -689
- package/dist/federation/handler.d.ts +0 -44
- package/dist/federation/handler.js +0 -543
- package/dist/federation/middleware.d.ts +0 -101
- package/dist/federation/negotiation.js +0 -63
- package/dist/federation/retry.d.ts +0 -71
- package/dist/federation/router.d.ts +0 -92
- package/dist/federation/send.d.ts +0 -29
- package/dist/node_modules/.pnpm/@jsr_hongminhee__deno-mock-fetch@0.3.2/node_modules/@jsr/hongminhee__deno-mock-fetch/mod.js +0 -101
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_equals.js +0 -49
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_exists.js +0 -32
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_false.js +0 -26
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_greater.js +0 -34
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_greater_or_equal.js +0 -34
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_strict_equals.js +0 -53
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_string_includes.js +0 -32
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assertion_error.js +0 -33
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/equal.js +0 -79
- package/dist/node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/mod.js +0 -19
- package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/assertion_state.js +0 -177
- package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/build_message.js +0 -101
- package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/diff.js +0 -274
- package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/diff_str.js +0 -148
- package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/format.js +0 -37
- package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/mod.js +0 -10
- package/dist/node_modules/.pnpm/@jsr_std__internal@1.0.7/node_modules/@jsr/std__internal/styles.js +0 -172
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/assert_path.js +0 -11
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/constants.js +0 -10
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/dirname.js +0 -14
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/from_file_url.js +0 -13
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/normalize.js +0 -14
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/normalize_string.js +0 -60
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_common/strip_trailing_separators.js +0 -15
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/_os.js +0 -9
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/extname.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/format.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/from_file_url.js +0 -34
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/glob_to_regexp.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/is_absolute.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/join.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/join_globs.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/mod.js +0 -5
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/normalize.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/normalize_glob.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/parse.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/_util.js +0 -13
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/dirname.js +0 -54
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/from_file_url.js +0 -27
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/join.js +0 -47
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/posix/normalize.js +0 -59
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/relative.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/resolve.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/to_file_url.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/to_namespaced_path.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/windows/from_file_url.js +0 -31
- package/dist/node_modules/.pnpm/@jsr_std__url@1.0.0-rc.3/node_modules/@jsr/std__url/_strip.js +0 -17
- package/dist/node_modules/.pnpm/@jsr_std__url@1.0.0-rc.3/node_modules/@jsr/std__url/dirname.js +0 -38
- package/dist/node_modules/.pnpm/@jsr_std__url@1.0.0-rc.3/node_modules/@jsr/std__url/join.js +0 -36
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_chars.js +0 -47
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_dumper_state.js +0 -4
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_loader_state.js +0 -884
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_schema.js +0 -120
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/binary.js +0 -92
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/bool.js +0 -41
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/float.js +0 -58
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/int.js +0 -118
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/map.js +0 -18
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/merge.js +0 -14
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/nil.js +0 -23
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/omap.js +0 -31
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/pairs.js +0 -22
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/regexp.js +0 -29
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/seq.js +0 -14
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/set.js +0 -17
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/str.js +0 -14
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/timestamp.js +0 -57
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_type/undefined.js +0 -24
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/_utils.js +0 -17
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/mod.js +0 -5
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/parse.js +0 -54
- package/dist/node_modules/.pnpm/@jsr_std__yaml@1.0.6/node_modules/@jsr/std__yaml/stringify.js +0 -4
- package/dist/node_modules/.pnpm/dequal@2.0.3/node_modules/dequal/dist/index.js +0 -68
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/AlwaysShrinkableArbitrary.js +0 -30
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/ArrayArbitrary.js +0 -203
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/ArrayInt64Arbitrary.js +0 -122
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/BigIntArbitrary.js +0 -63
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/ConstantArbitrary.js +0 -58
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/FrequencyArbitrary.js +0 -136
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/IntegerArbitrary.js +0 -64
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/LazyArbitrary.js +0 -29
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/StringUnitArbitrary.js +0 -45
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/TupleArbitrary.js +0 -74
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/WithShrinkFromOtherArbitrary.js +0 -40
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/AnyArbitraryBuilder.js +0 -97
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/BoxedArbitraryBuilder.js +0 -13
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/CharacterArbitraryBuilder.js +0 -17
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/RestrictedIntegerArbitraryBuilder.js +0 -23
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.js +0 -32
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/data/GraphemeRanges.js +0 -990
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/ArrayInt64.js +0 -98
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/BiasNumericRange.js +0 -53
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/BuildSlicedGenerator.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/CustomEqualSet.js +0 -27
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/DepthContext.js +0 -24
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/DoubleHelpers.js +0 -96
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/DoubleOnlyHelpers.js +0 -25
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/FloatHelpers.js +0 -57
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/FloatOnlyHelpers.js +0 -26
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/FloatingOnlyHelpers.js +0 -26
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/GraphemeRangesHelpers.js +0 -58
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/MaxLengthFromMinLength.js +0 -72
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/NoUndefinedAsContext.js +0 -16
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/QualifiedObjectConstraints.js +0 -58
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/SameValueSet.js +0 -41
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/SameValueZeroSet.js +0 -33
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/ShrinkBigInt.js +0 -37
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/ShrinkInteger.js +0 -41
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/SlicesForStringBuilder.js +0 -74
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/StrictlyEqualSet.js +0 -38
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/helpers/TokenizeString.js +0 -47
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/implementations/NoopSlicedGenerator.js +0 -21
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/implementations/SlicedBasedGenerator.js +0 -53
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/ArrayToMap.js +0 -16
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/ArrayToSet.js +0 -16
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/CodePointsToString.js +0 -17
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/IndexToCharString.js +0 -20
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/IndexToMappedConstant.js +0 -69
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/IndexToPrintableIndex.js +0 -18
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/KeyValuePairsToObject.js +0 -42
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/PatternsToString.js +0 -32
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/TimeToDate.js +0 -30
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/_internals/mappers/UnboxedToBoxed.js +0 -22
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/anything.js +0 -14
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/array.js +0 -22
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/bigInt.js +0 -38
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/boolean.js +0 -24
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/constant.js +0 -13
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/constantFrom.js +0 -14
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/date.js +0 -30
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/dictionary.js +0 -27
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/double.js +0 -54
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/float.js +0 -60
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/float32Array.js +0 -22
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/float64Array.js +0 -22
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/fullUnicode.js +0 -24
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/fullUnicodeString.js +0 -20
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/int16Array.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/int32Array.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/int8Array.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/integer.js +0 -26
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/letrec.js +0 -28
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/mapToConstant.js +0 -26
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/maxSafeInteger.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/nat.js +0 -17
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/noBias.js +0 -11
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/oneof.js +0 -31
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/sparseArray.js +0 -68
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/string.js +0 -32
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/tuple.js +0 -13
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uint16Array.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uint32Array.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uint8Array.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uint8ClampedArray.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/arbitrary/uniqueArray.js +0 -47
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/arbitrary/definition/Arbitrary.js +0 -184
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/arbitrary/definition/Value.js +0 -31
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/precondition/PreconditionFailure.js +0 -19
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/IRawProperty.js +0 -12
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/IgnoreEqualValuesProperty.js +0 -52
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/Property.generic.js +0 -77
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/Property.js +0 -22
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/SkipAfterProperty.js +0 -61
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/TimeoutProperty.js +0 -52
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/property/UnbiasedProperty.js +0 -29
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/DecorateProperty.js +0 -26
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/Runner.js +0 -61
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/RunnerIterator.js +0 -47
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/SourceValuesIterator.js +0 -35
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/Tosser.js +0 -33
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/configuration/GlobalParameters.js +0 -12
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/configuration/QualifiedParameters.js +0 -121
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/configuration/VerbosityLevel.js +0 -14
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/reporter/ExecutionStatus.js +0 -14
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/reporter/RunExecution.js +0 -116
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/utils/PathWalker.js +0 -24
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/runner/utils/RunDetailsFormatter.js +0 -135
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/check/symbols.js +0 -15
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/random/generator/Random.js +0 -48
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/stream/LazyIterableIterator.js +0 -24
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/stream/Stream.js +0 -84
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/stream/StreamHelpers.js +0 -50
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/utils/apply.js +0 -28
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/utils/globals.js +0 -309
- package/dist/node_modules/.pnpm/fast-check@3.23.2/node_modules/fast-check/lib/esm/utils/stringify.js +0 -217
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/CallHistory.js +0 -94
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/FetchMock.js +0 -143
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/IsSubsetOf.js +0 -103
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/Matchers.js +0 -195
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/RequestUtils.js +0 -83
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/Route.js +0 -137
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/Router.js +0 -181
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/StatusTextMap.js +0 -73
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/TypeDescriptor.js +0 -97
- package/dist/node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/index.js +0 -11
- package/dist/node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js +0 -87
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UniformArrayIntDistribution.js +0 -20
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UniformBigIntDistribution.js +0 -20
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UniformIntDistribution.js +0 -20
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformArrayIntDistribution.js +0 -20
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformBigIntDistribution.js +0 -32
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/UnsafeUniformIntDistribution.js +0 -43
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/internals/ArrayInt.js +0 -139
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformArrayIntDistributionInternal.js +0 -26
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/distribution/internals/UnsafeUniformIntDistributionInternal.js +0 -14
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/LinearCongruential.js +0 -53
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/MersenneTwister.js +0 -114
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/RandomGenerator.js +0 -26
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/XorShift.js +0 -83
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/generator/XoroShiro.js +0 -83
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/pure-rand-default.js +0 -44
- package/dist/node_modules/.pnpm/pure-rand@6.1.0/node_modules/pure-rand/lib/esm/pure-rand.js +0 -22
- package/dist/node_modules/.pnpm/regexparam@3.0.0/node_modules/regexparam/dist/index.js +0 -37
- package/dist/nodeinfo/client.d.ts +0 -96
- package/dist/nodeinfo/handler.js +0 -46
- package/dist/nodeinfo/semver.d.ts +0 -78
- package/dist/nodeinfo/types.d.ts +0 -140
- package/dist/runtime/authdocloader.d.ts +0 -56
- package/dist/runtime/docloader.js +0 -291
- package/dist/runtime/key.js +0 -156
- package/dist/runtime/langstr.d.ts +0 -24
- package/dist/runtime/multibase/base.js +0 -32
- package/dist/runtime/multibase/constants.js +0 -172
- package/dist/runtime/multibase/index.js +0 -57
- package/dist/runtime/multibase/rfc4648.js +0 -61
- package/dist/runtime/multibase/util.js +0 -21
- package/dist/sig/http.d.ts +0 -143
- package/dist/sig/key.d.ts +0 -125
- package/dist/sig/proof.d.ts +0 -134
- package/dist/testing/fixtures/example.com/person.js +0 -29
- package/dist/testing/fixtures/example.com/person2.js +0 -48
- package/dist/vocab/constants.d.ts +0 -24
- package/dist/vocab/constants.js +0 -17
- package/dist/vocab/type.d.ts +0 -107
- package/dist/webfinger/handler.js +0 -140
- package/dist/webfinger/lookup.d.ts +0 -47
- /package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_object_match.js → compat-Bb5myD13.js} +0 -0
- /package/dist/{testing/fixtures → fixtures}/activitypub.academy/users/brauca_darradiul.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/announce.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/collection.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/create.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/cross-origin-actor.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/hong-gildong.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/invite.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/key.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/key2.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/object.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/orderedcollectionpage.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/paged/a.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/paged/b.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/paged-collection.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/person.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/person2.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/test.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/users/handle.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/example.com/wrong-type.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/remote.domain/users/bob.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/server.example/users/alice.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/w3id.org/identity/v1.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/w3id.org/security/data-integrity/v1.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/w3id.org/security/multikey/v1.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/w3id.org/security/v1.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/wizard.casa/users/hongminhee.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/www.w3.org/ns/activitystreams.json +0 -0
- /package/dist/{testing/fixtures → fixtures}/www.w3.org/ns/did/v1.json +0 -0
- /package/dist/{federation/kv.d.ts → kv-BmsWxOQ2.d.ts} +0 -0
- /package/dist/{federation/mq.d.ts → mq-Bue016Tz.d.ts} +0 -0
- /package/dist/{node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/basename.js → nodeinfo-CyEbLjHs.js} +0 -0
- /package/dist/{node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/common.js → runtime-BSkOVUWM.js} +0 -0
- /package/dist/{node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/constants.js → sig-BXJO--F9.js} +0 -0
- /package/dist/{codegen → vocab}/schema.yaml +0 -0
- /package/dist/{node_modules/.pnpm/@jsr_std__path@1.0.9/node_modules/@jsr/std__path/dirname.js → webfinger-C3GIyXIg.js} +0 -0
@@ -1,6 +1,7 @@
|
|
1
1
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
globalThis.addEventListener = () => {};
|
4
5
|
|
5
6
|
//#region x/denokv.ts
|
6
7
|
/**
|
@@ -38,4 +39,5 @@ var DenoKvMessageQueue = class {
|
|
38
39
|
}
|
39
40
|
};
|
40
41
|
|
41
|
-
//#endregion
|
42
|
+
//#endregion
|
43
|
+
export { DenoKvMessageQueue };
|
@@ -1,7 +1,147 @@
|
|
1
1
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
globalThis.addEventListener = () => {};
|
4
5
|
|
6
|
+
import { UrlError, validatePublicUrl } from "./url-kTAI6_KP.js";
|
7
|
+
import { getLogger } from "@logtape/logtape";
|
8
|
+
import { HTTPHeaderLink } from "@hugoalh/http-header-link";
|
9
|
+
import process from "node:process";
|
10
|
+
|
11
|
+
//#region deno.json
|
12
|
+
var name = "@fedify/fedify";
|
13
|
+
var version = "1.6.1-dev.873+5c8bbca8";
|
14
|
+
var license = "MIT";
|
15
|
+
var exports = {
|
16
|
+
".": "./mod.ts",
|
17
|
+
"./compat": "./compat/mod.ts",
|
18
|
+
"./federation": "./federation/mod.ts",
|
19
|
+
"./nodeinfo": "./nodeinfo/mod.ts",
|
20
|
+
"./runtime": "./runtime/mod.ts",
|
21
|
+
"./sig": "./sig/mod.ts",
|
22
|
+
"./vocab": "./vocab/mod.ts",
|
23
|
+
"./webfinger": "./webfinger/mod.ts",
|
24
|
+
"./x/cfworkers": "./x/cfworkers.ts",
|
25
|
+
"./x/denokv": "./x/denokv.ts",
|
26
|
+
"./x/fresh": "./x/fresh.ts",
|
27
|
+
"./x/hono": "./x/hono.ts",
|
28
|
+
"./x/sveltekit": "./x/sveltekit.ts"
|
29
|
+
};
|
30
|
+
var imports = {
|
31
|
+
"@cfworker/json-schema": "npm:@cfworker/json-schema@^4.1.1",
|
32
|
+
"@cloudflare/workers-types": "npm:@cloudflare/workers-types@^4.20250529.0",
|
33
|
+
"@es-toolkit/es-toolkit": "jsr:@es-toolkit/es-toolkit@^1.38.0",
|
34
|
+
"@hongminhee/deno-mock-fetch": "jsr:@hongminhee/deno-mock-fetch@^0.3.2",
|
35
|
+
"@hugoalh/http-header-link": "jsr:@hugoalh/http-header-link@^1.0.2",
|
36
|
+
"@multiformats/base-x": "npm:@multiformats/base-x@^4.0.1",
|
37
|
+
"@opentelemetry/api": "npm:@opentelemetry/api@^1.9.0",
|
38
|
+
"@opentelemetry/semantic-conventions": "npm:@opentelemetry/semantic-conventions@^1.27.0",
|
39
|
+
"@phensley/language-tag": "npm:@phensley/language-tag@^1.9.0",
|
40
|
+
"@std/assert": "jsr:@std/assert@^0.226.0",
|
41
|
+
"@std/testing": "jsr:@std/testing@^0.224.0",
|
42
|
+
"@std/url": "jsr:@std/url@^0.225.1",
|
43
|
+
"@std/yaml": "jsr:@std/yaml@^0.224.3",
|
44
|
+
"asn1js": "npm:asn1js@^3.0.5",
|
45
|
+
"byte-encodings": "npm:byte-encodings@^1.0.11",
|
46
|
+
"fast-check": "npm:fast-check@^3.22.0",
|
47
|
+
"fetch-mock": "npm:fetch-mock@^12.5.2",
|
48
|
+
"json-canon": "npm:json-canon@^1.0.1",
|
49
|
+
"jsonld": "npm:jsonld@^8.3.2",
|
50
|
+
"multicodec": "npm:multicodec@^3.2.1",
|
51
|
+
"pkijs": "npm:pkijs@^3.2.4",
|
52
|
+
"structured-field-values": "npm:structured-field-values@^2.0.4",
|
53
|
+
"tsdown": "npm:tsdown@^0.12.2",
|
54
|
+
"uri-template-router": "npm:uri-template-router@^0.0.17",
|
55
|
+
"url-template": "npm:url-template@^3.1.1"
|
56
|
+
};
|
57
|
+
var include = ["vocab/vocab.ts"];
|
58
|
+
var exclude = [
|
59
|
+
"apidoc/",
|
60
|
+
"cfworkers/dist/",
|
61
|
+
"cfworkers/fixtures/",
|
62
|
+
"cfworkers/imports.ts",
|
63
|
+
"cfworkers/README.md",
|
64
|
+
"cfworkers/server.ts",
|
65
|
+
"cfworkers/server.js",
|
66
|
+
"cfworkers/server.js.map",
|
67
|
+
"codegen/schema.yaml",
|
68
|
+
"dist/",
|
69
|
+
"node_modules/",
|
70
|
+
"npm/",
|
71
|
+
"pnpm-lock.yaml",
|
72
|
+
"vocab/*.yaml",
|
73
|
+
"!vocab/vocab.ts"
|
74
|
+
];
|
75
|
+
var tasks = {
|
76
|
+
"codegen": "deno run --allow-read --allow-write --check codegen/main.ts vocab/ ../runtime/ > vocab/vocab.ts && deno fmt vocab/vocab.ts && deno cache vocab/vocab.ts && deno check vocab/vocab.ts",
|
77
|
+
"check-version": "deno run --allow-read=package.json scripts/check_version.ts && deno run ../cli/scripts/check_version.ts",
|
78
|
+
"sync-version": "deno run --allow-read=package.json --allow-write=package.json scripts/sync_version.ts && deno run --allow-read=../cli/deno.json --allow-write=../cli/deno.json ../cli/scripts/sync_version.ts",
|
79
|
+
"cache": {
|
80
|
+
"command": "deno cache mod.ts",
|
81
|
+
"dependencies": ["check-version", "codegen"]
|
82
|
+
},
|
83
|
+
"check": {
|
84
|
+
"command": "deno fmt --check && deno lint && deno check */*.ts",
|
85
|
+
"dependencies": ["codegen"]
|
86
|
+
},
|
87
|
+
"test": {
|
88
|
+
"command": "deno test --check --doc --allow-read --allow-write --allow-env --unstable-kv --trace-leaks --parallel",
|
89
|
+
"dependencies": ["codegen"]
|
90
|
+
},
|
91
|
+
"coverage": "deno task test --clean --coverage && deno coverage --html coverage",
|
92
|
+
"bench": {
|
93
|
+
"command": "deno bench --allow-read --allow-write --allow-net --allow-env --allow-run --unstable-kv",
|
94
|
+
"dependencies": ["codegen"]
|
95
|
+
},
|
96
|
+
"apidoc": {
|
97
|
+
"command": "deno doc --html --name=Fedify --output=apidoc/ mod.ts",
|
98
|
+
"dependencies": ["codegen"]
|
99
|
+
},
|
100
|
+
"publish": {
|
101
|
+
"command": "deno publish",
|
102
|
+
"dependencies": ["check-version", "codegen"]
|
103
|
+
},
|
104
|
+
"pnpm:install": "pnpm install",
|
105
|
+
"pnpm:build": {
|
106
|
+
"command": "pnpm exec tsdown",
|
107
|
+
"dependencies": ["codegen", "pnpm:install"]
|
108
|
+
},
|
109
|
+
"npm": {
|
110
|
+
"command": "pnpm pack",
|
111
|
+
"dependencies": ["sync-version", "pnpm:install"]
|
112
|
+
},
|
113
|
+
"test:node": {
|
114
|
+
"command": "cd dist/ && node --test",
|
115
|
+
"dependencies": ["pnpm:build"]
|
116
|
+
},
|
117
|
+
"test:bun": {
|
118
|
+
"command": "cd dist/ && bun test --timeout 60000",
|
119
|
+
"dependencies": ["pnpm:build"]
|
120
|
+
},
|
121
|
+
"test:cfworkers": {
|
122
|
+
"command": "pnpm exec wrangler deploy --dry-run --outdir cfworkers && node --import=tsx cfworkers/client.ts",
|
123
|
+
"dependencies": ["pnpm:build"]
|
124
|
+
},
|
125
|
+
"test-all": { "dependencies": [
|
126
|
+
"check",
|
127
|
+
"test",
|
128
|
+
"test:node",
|
129
|
+
"test:bun",
|
130
|
+
"test:cfworkers"
|
131
|
+
] }
|
132
|
+
};
|
133
|
+
var deno_default = {
|
134
|
+
name,
|
135
|
+
version,
|
136
|
+
license,
|
137
|
+
exports,
|
138
|
+
imports,
|
139
|
+
include,
|
140
|
+
exclude,
|
141
|
+
tasks
|
142
|
+
};
|
143
|
+
|
144
|
+
//#endregion
|
5
145
|
//#region runtime/contexts.ts
|
6
146
|
const preloadedContexts = {
|
7
147
|
"https://www.w3.org/ns/activitystreams": { "@context": {
|
@@ -4113,4 +4253,283 @@ const preloadedContexts = {
|
|
4113
4253
|
var contexts_default = preloadedContexts;
|
4114
4254
|
|
4115
4255
|
//#endregion
|
4116
|
-
|
4256
|
+
//#region runtime/docloader.ts
|
4257
|
+
const logger = getLogger([
|
4258
|
+
"fedify",
|
4259
|
+
"runtime",
|
4260
|
+
"docloader"
|
4261
|
+
]);
|
4262
|
+
/**
|
4263
|
+
* Error thrown when fetching a JSON-LD document failed.
|
4264
|
+
*/
|
4265
|
+
var FetchError = class extends Error {
|
4266
|
+
/**
|
4267
|
+
* The URL that failed to fetch.
|
4268
|
+
*/
|
4269
|
+
url;
|
4270
|
+
/**
|
4271
|
+
* Constructs a new `FetchError`.
|
4272
|
+
*
|
4273
|
+
* @param url The URL that failed to fetch.
|
4274
|
+
* @param message Error message.
|
4275
|
+
*/
|
4276
|
+
constructor(url, message) {
|
4277
|
+
super(message == null ? url.toString() : `${url}: ${message}`);
|
4278
|
+
this.name = "FetchError";
|
4279
|
+
this.url = typeof url === "string" ? new URL(url) : url;
|
4280
|
+
}
|
4281
|
+
};
|
4282
|
+
/**
|
4283
|
+
* Creates a request for the given URL.
|
4284
|
+
* @param url The URL to create the request for.
|
4285
|
+
* @param options The options for the request.
|
4286
|
+
* @returns The created request.
|
4287
|
+
* @internal
|
4288
|
+
*/
|
4289
|
+
function createRequest(url, options = {}) {
|
4290
|
+
return new Request(url, {
|
4291
|
+
headers: {
|
4292
|
+
Accept: "application/activity+json, application/ld+json",
|
4293
|
+
"User-Agent": typeof options.userAgent === "string" ? options.userAgent : getUserAgent(options.userAgent)
|
4294
|
+
},
|
4295
|
+
redirect: "manual"
|
4296
|
+
});
|
4297
|
+
}
|
4298
|
+
/**
|
4299
|
+
* Logs the request.
|
4300
|
+
* @param request The request to log.
|
4301
|
+
* @internal
|
4302
|
+
*/
|
4303
|
+
function logRequest(request) {
|
4304
|
+
logger.debug("Fetching document: {method} {url} {headers}", {
|
4305
|
+
method: request.method,
|
4306
|
+
url: request.url,
|
4307
|
+
headers: Object.fromEntries(request.headers.entries())
|
4308
|
+
});
|
4309
|
+
}
|
4310
|
+
/**
|
4311
|
+
* Gets a {@link RemoteDocument} from the given response.
|
4312
|
+
* @param url The URL of the document to load.
|
4313
|
+
* @param response The response to get the document from.
|
4314
|
+
* @param fetch The function to fetch the document.
|
4315
|
+
* @returns The loaded remote document.
|
4316
|
+
* @throws {FetchError} If the response is not OK.
|
4317
|
+
* @internal
|
4318
|
+
*/
|
4319
|
+
async function getRemoteDocument(url, response, fetch$1) {
|
4320
|
+
const documentUrl = response.url === "" ? url : response.url;
|
4321
|
+
const docUrl = new URL(documentUrl);
|
4322
|
+
if (!response.ok) {
|
4323
|
+
logger.error("Failed to fetch document: {status} {url} {headers}", {
|
4324
|
+
status: response.status,
|
4325
|
+
url: documentUrl,
|
4326
|
+
headers: Object.fromEntries(response.headers.entries())
|
4327
|
+
});
|
4328
|
+
throw new FetchError(documentUrl, `HTTP ${response.status}: ${documentUrl}`);
|
4329
|
+
}
|
4330
|
+
const contentType = response.headers.get("Content-Type");
|
4331
|
+
const jsonLd = contentType == null || contentType === "application/activity+json" || contentType.startsWith("application/activity+json;") || contentType === "application/ld+json" || contentType.startsWith("application/ld+json;");
|
4332
|
+
const linkHeader = response.headers.get("Link");
|
4333
|
+
let contextUrl = null;
|
4334
|
+
if (linkHeader != null) {
|
4335
|
+
let link;
|
4336
|
+
try {
|
4337
|
+
link = new HTTPHeaderLink(linkHeader);
|
4338
|
+
} catch (e) {
|
4339
|
+
if (e instanceof SyntaxError) link = new HTTPHeaderLink();
|
4340
|
+
else throw e;
|
4341
|
+
}
|
4342
|
+
if (jsonLd) {
|
4343
|
+
const entries = link.getByRel("http://www.w3.org/ns/json-ld#context");
|
4344
|
+
for (const [uri, params] of entries) if ("type" in params && params.type === "application/ld+json") {
|
4345
|
+
contextUrl = uri;
|
4346
|
+
break;
|
4347
|
+
}
|
4348
|
+
} else {
|
4349
|
+
const entries = link.getByRel("alternate");
|
4350
|
+
for (const [uri, params] of entries) {
|
4351
|
+
const altUri = new URL(uri, docUrl);
|
4352
|
+
if ("type" in params && (params.type === "application/activity+json" || params.type === "application/ld+json" || params.type.startsWith("application/ld+json;")) && altUri.href !== docUrl.href) {
|
4353
|
+
logger.debug("Found alternate document: {alternateUrl} from {url}", {
|
4354
|
+
alternateUrl: altUri.href,
|
4355
|
+
url: documentUrl
|
4356
|
+
});
|
4357
|
+
return await fetch$1(altUri.href);
|
4358
|
+
}
|
4359
|
+
}
|
4360
|
+
}
|
4361
|
+
}
|
4362
|
+
let document;
|
4363
|
+
if (!jsonLd && (contentType === "text/html" || contentType?.startsWith("text/html;") || contentType === "application/xhtml+xml" || contentType?.startsWith("application/xhtml+xml;"))) {
|
4364
|
+
const p = /<(a|link)((\s+[a-z][a-z:_-]*=("[^"]*"|'[^']*'|[^\s>]+))+)\/?>/gi;
|
4365
|
+
const p2 = /\s+([a-z][a-z:_-]*)=("([^"]*)"|'([^']*)'|([^\s>]+))/gi;
|
4366
|
+
const html = await response.text();
|
4367
|
+
let m;
|
4368
|
+
const rawAttribs = [];
|
4369
|
+
while ((m = p.exec(html)) !== null) rawAttribs.push(m[2]);
|
4370
|
+
for (const rawAttrs of rawAttribs) {
|
4371
|
+
let m2;
|
4372
|
+
const attribs = {};
|
4373
|
+
while ((m2 = p2.exec(rawAttrs)) !== null) {
|
4374
|
+
const key = m2[1].toLowerCase();
|
4375
|
+
const value = m2[3] ?? m2[4] ?? m2[5] ?? "";
|
4376
|
+
attribs[key] = value;
|
4377
|
+
}
|
4378
|
+
if (attribs.rel === "alternate" && "type" in attribs && (attribs.type === "application/activity+json" || attribs.type === "application/ld+json" || attribs.type.startsWith("application/ld+json;")) && "href" in attribs && new URL(attribs.href, docUrl).href !== docUrl.href) {
|
4379
|
+
logger.debug("Found alternate document: {alternateUrl} from {url}", {
|
4380
|
+
alternateUrl: attribs.href,
|
4381
|
+
url: documentUrl
|
4382
|
+
});
|
4383
|
+
return await fetch$1(new URL(attribs.href, docUrl).href);
|
4384
|
+
}
|
4385
|
+
}
|
4386
|
+
document = JSON.parse(html);
|
4387
|
+
} else document = await response.json();
|
4388
|
+
logger.debug("Fetched document: {status} {url} {headers}", {
|
4389
|
+
status: response.status,
|
4390
|
+
url: documentUrl,
|
4391
|
+
headers: Object.fromEntries(response.headers.entries())
|
4392
|
+
});
|
4393
|
+
return {
|
4394
|
+
contextUrl,
|
4395
|
+
document,
|
4396
|
+
documentUrl
|
4397
|
+
};
|
4398
|
+
}
|
4399
|
+
/**
|
4400
|
+
* Creates a JSON-LD document loader that utilizes the browser's `fetch` API.
|
4401
|
+
*
|
4402
|
+
* The created loader preloads the below frequently used contexts by default
|
4403
|
+
* (unless `options.ignorePreloadedContexts` is set to `true`):
|
4404
|
+
*
|
4405
|
+
* - <https://www.w3.org/ns/activitystreams>
|
4406
|
+
* - <https://w3id.org/security/v1>
|
4407
|
+
* - <https://w3id.org/security/data-integrity/v1>
|
4408
|
+
* - <https://www.w3.org/ns/did/v1>
|
4409
|
+
* - <https://w3id.org/security/multikey/v1>
|
4410
|
+
* - <https://purl.archive.org/socialweb/webfinger>
|
4411
|
+
* - <http://schema.org/>
|
4412
|
+
* @param options Options for the document loader.
|
4413
|
+
* @returns The document loader.
|
4414
|
+
* @since 1.3.0
|
4415
|
+
*/
|
4416
|
+
function getDocumentLoader({ allowPrivateAddress, skipPreloadedContexts, userAgent } = {}) {
|
4417
|
+
async function load(url) {
|
4418
|
+
if (!skipPreloadedContexts && url in contexts_default) {
|
4419
|
+
logger.debug("Using preloaded context: {url}.", { url });
|
4420
|
+
return {
|
4421
|
+
contextUrl: null,
|
4422
|
+
document: contexts_default[url],
|
4423
|
+
documentUrl: url
|
4424
|
+
};
|
4425
|
+
}
|
4426
|
+
if (!allowPrivateAddress) try {
|
4427
|
+
await validatePublicUrl(url);
|
4428
|
+
} catch (error) {
|
4429
|
+
if (error instanceof UrlError) logger.error("Disallowed private URL: {url}", {
|
4430
|
+
url,
|
4431
|
+
error
|
4432
|
+
});
|
4433
|
+
throw error;
|
4434
|
+
}
|
4435
|
+
const request = createRequest(url, { userAgent });
|
4436
|
+
logRequest(request);
|
4437
|
+
const response = await fetch(request, { redirect: "manual" });
|
4438
|
+
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) return load(response.headers.get("Location"));
|
4439
|
+
return getRemoteDocument(url, response, load);
|
4440
|
+
}
|
4441
|
+
return load;
|
4442
|
+
}
|
4443
|
+
const _fetchDocumentLoader = getDocumentLoader();
|
4444
|
+
const _fetchDocumentLoader_allowPrivateAddress = getDocumentLoader({ allowPrivateAddress: true });
|
4445
|
+
/**
|
4446
|
+
* A JSON-LD document loader that utilizes the browser's `fetch` API.
|
4447
|
+
*
|
4448
|
+
* This loader preloads the below frequently used contexts:
|
4449
|
+
*
|
4450
|
+
* - <https://www.w3.org/ns/activitystreams>
|
4451
|
+
* - <https://w3id.org/security/v1>
|
4452
|
+
* - <https://w3id.org/security/data-integrity/v1>
|
4453
|
+
* - <https://www.w3.org/ns/did/v1>
|
4454
|
+
* - <https://w3id.org/security/multikey/v1>
|
4455
|
+
* - <https://purl.archive.org/socialweb/webfinger>
|
4456
|
+
* - <http://schema.org/>
|
4457
|
+
* @param url The URL of the document to load.
|
4458
|
+
* @param allowPrivateAddress Whether to allow fetching private network
|
4459
|
+
* addresses. Turned off by default.
|
4460
|
+
* @returns The remote document.
|
4461
|
+
* @deprecated Use {@link getDocumentLoader} instead.
|
4462
|
+
*/
|
4463
|
+
function fetchDocumentLoader(url, allowPrivateAddress = false) {
|
4464
|
+
logger.warn("fetchDocumentLoader() function is deprecated. Use getDocumentLoader() function instead.");
|
4465
|
+
return (allowPrivateAddress ? _fetchDocumentLoader_allowPrivateAddress : _fetchDocumentLoader)(url);
|
4466
|
+
}
|
4467
|
+
/**
|
4468
|
+
* Decorates a {@link DocumentLoader} with a cache backed by a {@link Deno.Kv}.
|
4469
|
+
* @param parameters The parameters for the cache.
|
4470
|
+
* @returns The decorated document loader which is cache-enabled.
|
4471
|
+
*/
|
4472
|
+
function kvCache({ loader, kv, prefix, rules }) {
|
4473
|
+
const keyPrefix = prefix ?? ["_fedify", "remoteDocument"];
|
4474
|
+
rules ??= [[new URLPattern({}), Temporal.Duration.from({ minutes: 5 })]];
|
4475
|
+
for (const [p, duration] of rules) if (Temporal.Duration.compare(duration, { days: 30 }) > 0) throw new TypeError("The maximum cache duration is 30 days: " + (p instanceof URLPattern ? `${p.protocol}://${p.username}:${p.password}@${p.hostname}:${p.port}/${p.pathname}?${p.search}#${p.hash}` : p.toString()));
|
4476
|
+
function matchRule(url) {
|
4477
|
+
for (const [pattern, duration] of rules) {
|
4478
|
+
if (typeof pattern === "string") {
|
4479
|
+
if (url === pattern) return duration;
|
4480
|
+
continue;
|
4481
|
+
}
|
4482
|
+
if (pattern instanceof URL) {
|
4483
|
+
if (pattern.href == url) return duration;
|
4484
|
+
continue;
|
4485
|
+
}
|
4486
|
+
if (pattern.test(url)) return duration;
|
4487
|
+
}
|
4488
|
+
return null;
|
4489
|
+
}
|
4490
|
+
return async (url) => {
|
4491
|
+
const match = matchRule(url);
|
4492
|
+
if (match == null) return await loader(url);
|
4493
|
+
const key = [...keyPrefix, url];
|
4494
|
+
let cache = void 0;
|
4495
|
+
try {
|
4496
|
+
cache = await kv.get(key);
|
4497
|
+
} catch (error) {
|
4498
|
+
if (error instanceof Error) logger.warn("Failed to get the document of {url} from the KV cache: {error}", {
|
4499
|
+
url,
|
4500
|
+
error
|
4501
|
+
});
|
4502
|
+
}
|
4503
|
+
if (cache == null) {
|
4504
|
+
const remoteDoc = await loader(url);
|
4505
|
+
try {
|
4506
|
+
await kv.set(key, remoteDoc, { ttl: match });
|
4507
|
+
} catch (error) {
|
4508
|
+
logger.warn("Failed to save the document of {url} to the KV cache: {error}", {
|
4509
|
+
url,
|
4510
|
+
error
|
4511
|
+
});
|
4512
|
+
}
|
4513
|
+
return remoteDoc;
|
4514
|
+
}
|
4515
|
+
return cache;
|
4516
|
+
};
|
4517
|
+
}
|
4518
|
+
/**
|
4519
|
+
* Gets the user agent string for the given application and URL.
|
4520
|
+
* @param options The options for making the user agent string.
|
4521
|
+
* @returns The user agent string.
|
4522
|
+
* @since 1.3.0
|
4523
|
+
*/
|
4524
|
+
function getUserAgent({ software, url } = {}) {
|
4525
|
+
const fedify = `Fedify/${deno_default.version}`;
|
4526
|
+
const runtime = globalThis.Deno?.version?.deno != null ? `Deno/${Deno.version.deno}` : globalThis.process?.versions?.bun != null ? `Bun/${process.versions.bun}` : "navigator" in globalThis && navigator.userAgent === "Cloudflare-Workers" ? navigator.userAgent : globalThis.process?.versions?.node != null ? `Node.js/${process.versions.node}` : null;
|
4527
|
+
const userAgent = software == null ? [fedify] : [software, fedify];
|
4528
|
+
if (runtime != null) userAgent.push(runtime);
|
4529
|
+
if (url != null) userAgent.push(`+${url.toString()}`);
|
4530
|
+
const first = userAgent.shift();
|
4531
|
+
return `${first} (${userAgent.join("; ")})`;
|
4532
|
+
}
|
4533
|
+
|
4534
|
+
//#endregion
|
4535
|
+
export { FetchError, contexts_default, createRequest, deno_default, fetchDocumentLoader, getDocumentLoader, getRemoteDocument, getUserAgent, kvCache, logRequest };
|