@fedify/fedify 1.6.1-dev.869 → 1.6.1-dev.871
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actor-CM3gfkH6.js +36173 -0
- package/dist/{vocab/actor.js → actor-D7NMuy45.js} +5 -4
- package/dist/{vocab/actor.d.ts → actor-lFlm8FYo.d.ts} +2 -2
- 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/{runtime/authdocloader.js → authdocloader-BKZDAq91.js} +5 -4
- package/dist/authdocloader-OfYZlI31.js +51 -0
- package/dist/{federation/builder.js → builder-DSTiU6ue.js} +6 -5
- package/dist/{_virtual/rolldown_runtime.js → chunk-HsBuZ-b2.js} +1 -0
- package/dist/client-Dw1pCSIt.d.ts +299 -0
- package/dist/{nodeinfo/client.js → client-RN5A1Qgw.js} +3 -2
- 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/context-CzJXjNR8.d.ts +2034 -0
- package/dist/{testing/context.js → context-DZKXS0DV.js} +5 -4
- 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-BcMxZ9JH.js} +420 -1
- package/dist/docloader-DDFam5Xn.js +4594 -0
- package/dist/{runtime/docloader.d.ts → docloader-DTRsVZPo.d.ts} +1 -1
- 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/{sig/http.js → http-BFvv3ZId.js} +5 -4
- package/dist/http-BImJcLfv.d.ts +258 -0
- package/dist/http-v1TqJ9Qa.js +720 -0
- package/dist/{federation/inbox.js → inbox-XV_W1qfB.js} +4 -3
- package/dist/key-BNM-ickE.js +16 -0
- package/dist/key-CVIQ7iUB.js +262 -0
- package/dist/{sig/key.js → key-DIk4Rloj.js} +2 -4
- package/dist/key-DiVhk5ik.js +10 -0
- package/dist/{federation/keycache.js → keycache-uTxsh7dt.js} +2 -1
- package/dist/{testing/keys.js → keys-D7lJqunm.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-bOhcKpmk.js} +6 -6
- package/dist/{webfinger/lookup.js → lookup-B5KVF6HM.js} +1 -3
- package/dist/lookup-D3xTID-6.js +131 -0
- package/dist/{webfinger/jrd.d.ts → lookup-DAfStZtI.d.ts} +41 -1
- package/dist/{vocab/lookup.js → lookup-D_v0FFGL.js} +5 -5
- package/dist/middleware-BFedQWFA.js +33 -0
- package/dist/middleware-BiYIqI0b.js +3525 -0
- package/dist/{federation/middleware.js → middleware-CPAfRtS5.js} +957 -105
- package/dist/middleware-pAGwVkRf.js +17 -0
- 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.d.ts → owner-BjpObx-L.d.ts} +4 -6
- package/dist/{sig/owner.js → owner-tYPzPLFs.js} +4 -4
- package/dist/proof-D0cf4R25.js +595 -0
- package/dist/{sig/proof.js → proof-DIsZ1VTb.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-CFBOnY61.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-D4p7qK8A.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-BSNlVPPE.js +172 -0
- package/dist/{vocab/vocab.js → vocab-BxrrllKY.js} +331 -182
- package/dist/{vocab/vocab.d.ts → vocab-CLWdoo7y.d.ts} +21 -9
- 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
package/dist/nodeinfo/types.d.ts
DELETED
@@ -1,140 +0,0 @@
|
|
1
|
-
import { Temporal } from "@js-temporal/polyfill";
|
2
|
-
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { SemVer } from "./semver.js";
|
4
|
-
|
5
|
-
//#region nodeinfo/types.d.ts
|
6
|
-
/**
|
7
|
-
* The type of the result of parsing JSON.
|
8
|
-
*/
|
9
|
-
/**
|
10
|
-
* The type of the result of parsing JSON.
|
11
|
-
*/
|
12
|
-
type JsonValue = {
|
13
|
-
[key: string]: JsonValue | undefined;
|
14
|
-
} | JsonValue[] | string | number | boolean | null;
|
15
|
-
/**
|
16
|
-
* A NodeInfo object as defined in the NodeInfo 2.1 schema.
|
17
|
-
*/
|
18
|
-
interface NodeInfo {
|
19
|
-
/**
|
20
|
-
* Metadata about server software in use.
|
21
|
-
*/
|
22
|
-
software: Software;
|
23
|
-
/**
|
24
|
-
* The protocols supported on this server. At least one protocol must be
|
25
|
-
* supported.
|
26
|
-
*/
|
27
|
-
protocols: Protocol[];
|
28
|
-
/**
|
29
|
-
* The third party sites this server can connect to via their application API.
|
30
|
-
*/
|
31
|
-
services?: Services;
|
32
|
-
/**
|
33
|
-
* Whether this server allows open self-registration. Defaults to `false`.
|
34
|
-
*/
|
35
|
-
openRegistrations?: boolean;
|
36
|
-
/**
|
37
|
-
* Usage statistics for this server.
|
38
|
-
*/
|
39
|
-
usage: Usage;
|
40
|
-
/**
|
41
|
-
* Free form key value pairs for software specific values.
|
42
|
-
* Clients should not rely on any specific key present.
|
43
|
-
*/
|
44
|
-
metadata?: Record<string, JsonValue>;
|
45
|
-
}
|
46
|
-
/**
|
47
|
-
* Metadata about server software in use.
|
48
|
-
*/
|
49
|
-
interface Software {
|
50
|
-
/**
|
51
|
-
* The canonical name of this server software. This must comply with
|
52
|
-
* pattern `/^[a-z0-9-]+$/`.
|
53
|
-
*/
|
54
|
-
name: string;
|
55
|
-
/**
|
56
|
-
* The version of this server software.
|
57
|
-
* @see {@link parseSemVer}
|
58
|
-
*/
|
59
|
-
version: SemVer;
|
60
|
-
/**
|
61
|
-
* The URL of the source code repository of this server software.
|
62
|
-
*/
|
63
|
-
repository?: URL;
|
64
|
-
/**
|
65
|
-
* The URL of the homepage of this server software.
|
66
|
-
*/
|
67
|
-
homepage?: URL;
|
68
|
-
}
|
69
|
-
/**
|
70
|
-
* The protocols supported on this server.
|
71
|
-
*/
|
72
|
-
type Protocol = "activitypub" | "buddycloud" | "dfrn" | "diaspora" | "libertree" | "ostatus" | "pumpio" | "tent" | "xmpp" | "zot";
|
73
|
-
/**
|
74
|
-
* The third party sites this server can connect to via their application API.
|
75
|
-
*/
|
76
|
-
interface Services {
|
77
|
-
/**
|
78
|
-
* The third party sites this server can retrieve messages from for combined
|
79
|
-
* display with regular traffic.
|
80
|
-
*/
|
81
|
-
inbound?: InboundService[];
|
82
|
-
/**
|
83
|
-
* The third party sites this server can publish messages to on the behalf
|
84
|
-
* of a user.
|
85
|
-
*/
|
86
|
-
outbound?: OutboundService[];
|
87
|
-
}
|
88
|
-
/**
|
89
|
-
* The third party sites this server can retrieve messages from for combined
|
90
|
-
* display with regular traffic.
|
91
|
-
*/
|
92
|
-
type InboundService = "atom1.0" | "gnusocial" | "imap" | "pnut" | "pop3" | "pumpio" | "rss2.0" | "twitter";
|
93
|
-
/**
|
94
|
-
* The third party sites this server can publish messages to on the behalf
|
95
|
-
* of a user.
|
96
|
-
*/
|
97
|
-
type OutboundService = "atom1.0" | "blogger" | "buddycloud" | "diaspora" | "dreamwidth" | "drupal" | "facebook" | "friendica" | "gnusocial" | "google" | "insanejournal" | "libertree" | "linkedin" | "livejournal" | "mediagoblin" | "myspace" | "pinterest" | "pnut" | "posterous" | "pumpio" | "redmatrix" | "rss2.0" | "smtp" | "tent" | "tumblr" | "twitter" | "wordpress" | "xmpp";
|
98
|
-
/**
|
99
|
-
* Usage statistics for this server.
|
100
|
-
*/
|
101
|
-
interface Usage {
|
102
|
-
/**
|
103
|
-
* Statistics about the users of this server.
|
104
|
-
*/
|
105
|
-
users: {
|
106
|
-
/**
|
107
|
-
* The total amount of on this server registered users. This number
|
108
|
-
* has to be an integer greater than or equal to zero.
|
109
|
-
*/
|
110
|
-
total?: number;
|
111
|
-
/**
|
112
|
-
* The amount of users that signed in at least once in the last 180 days.
|
113
|
-
* This number has to be an integer greater than or equal to zero.
|
114
|
-
*/
|
115
|
-
activeHalfyear?: number;
|
116
|
-
/**
|
117
|
-
* The amount of users that signed in at least once in the last 30 days.
|
118
|
-
* This number has to be an integer greater than or equal to zero.
|
119
|
-
*/
|
120
|
-
activeMonth?: number;
|
121
|
-
};
|
122
|
-
/**
|
123
|
-
* The amount of posts that were made by users that are registered on this
|
124
|
-
* server. This number has to be an integer greater than or equal to zero.
|
125
|
-
*/
|
126
|
-
localPosts: number;
|
127
|
-
/**
|
128
|
-
* The amount of comments that were made by users that are registered on this
|
129
|
-
* server. This number has to be an integer greater than or equal to zero.
|
130
|
-
*/
|
131
|
-
localComments: number;
|
132
|
-
}
|
133
|
-
/**
|
134
|
-
* Converts a {@link NodeInfo} object to a JSON value.
|
135
|
-
* @param nodeInfo The {@link NodeInfo} object to convert.
|
136
|
-
* @returns The JSON value that complies with the NodeInfo schema.
|
137
|
-
* @throws {TypeError} If the {@link NodeInfo} object is invalid.
|
138
|
-
*/
|
139
|
-
declare function nodeInfoToJson(nodeInfo: NodeInfo): JsonValue; //#endregion
|
140
|
-
export { InboundService, JsonValue, NodeInfo, OutboundService, Protocol, Services, Software, Usage, nodeInfoToJson as nodeInfoToJson$1 };
|
@@ -1,56 +0,0 @@
|
|
1
|
-
import { Temporal } from "@js-temporal/polyfill";
|
2
|
-
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { DocumentLoader, DocumentLoaderFactoryOptions } from "./docloader.js";
|
4
|
-
import { HttpMessageSignaturesSpecDeterminer } from "../sig/http.js";
|
5
|
-
import { TracerProvider } from "@opentelemetry/api";
|
6
|
-
|
7
|
-
//#region runtime/authdocloader.d.ts
|
8
|
-
/**
|
9
|
-
* Options for {@link getAuthenticatedDocumentLoader}.
|
10
|
-
* @see {@link getAuthenticatedDocumentLoader}
|
11
|
-
* @since 1.3.0
|
12
|
-
*/
|
13
|
-
/**
|
14
|
-
* Options for {@link getAuthenticatedDocumentLoader}.
|
15
|
-
* @see {@link getAuthenticatedDocumentLoader}
|
16
|
-
* @since 1.3.0
|
17
|
-
*/
|
18
|
-
interface GetAuthenticatedDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
|
19
|
-
/**
|
20
|
-
* An optional spec determiner for HTTP Message Signatures.
|
21
|
-
* It determines the spec to use for signing requests.
|
22
|
-
* It is used for double-knocking
|
23
|
-
* (see <https://swicg.github.io/activitypub-http-signature/#how-to-upgrade-supported-versions>).
|
24
|
-
* @since 1.6.0
|
25
|
-
*/
|
26
|
-
specDeterminer?: HttpMessageSignaturesSpecDeterminer;
|
27
|
-
/**
|
28
|
-
* The OpenTelemetry tracer provider. If omitted, the global tracer provider
|
29
|
-
* is used.
|
30
|
-
* @since 1.6.0
|
31
|
-
*/
|
32
|
-
tracerProvider?: TracerProvider;
|
33
|
-
}
|
34
|
-
/**
|
35
|
-
* Gets an authenticated {@link DocumentLoader} for the given identity.
|
36
|
-
* Note that an authenticated document loader intentionally does not cache
|
37
|
-
* the fetched documents.
|
38
|
-
* @param identity The identity to get the document loader for.
|
39
|
-
* The actor's key pair.
|
40
|
-
* @param options The options for the document loader.
|
41
|
-
* @returns The authenticated document loader.
|
42
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
43
|
-
* @since 0.4.0
|
44
|
-
*/
|
45
|
-
declare function getAuthenticatedDocumentLoader(identity: {
|
46
|
-
keyId: URL;
|
47
|
-
privateKey: CryptoKey;
|
48
|
-
}, {
|
49
|
-
allowPrivateAddress,
|
50
|
-
userAgent,
|
51
|
-
specDeterminer,
|
52
|
-
tracerProvider
|
53
|
-
}?: GetAuthenticatedDocumentLoaderOptions): DocumentLoader;
|
54
|
-
|
55
|
-
//#endregion
|
56
|
-
export { GetAuthenticatedDocumentLoaderOptions, getAuthenticatedDocumentLoader as getAuthenticatedDocumentLoader$1 };
|
@@ -1,291 +0,0 @@
|
|
1
|
-
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
3
|
-
import { URLPattern } from "urlpattern-polyfill";
|
4
|
-
|
5
|
-
import { deno_default } from "../deno.js";
|
6
|
-
import { contexts_default } from "./contexts.js";
|
7
|
-
import { UrlError, validatePublicUrl } from "./url.js";
|
8
|
-
import { getLogger } from "@logtape/logtape";
|
9
|
-
import { HTTPHeaderLink } from "@hugoalh/http-header-link";
|
10
|
-
import process from "node:process";
|
11
|
-
|
12
|
-
//#region runtime/docloader.ts
|
13
|
-
const logger = getLogger([
|
14
|
-
"fedify",
|
15
|
-
"runtime",
|
16
|
-
"docloader"
|
17
|
-
]);
|
18
|
-
/**
|
19
|
-
* Error thrown when fetching a JSON-LD document failed.
|
20
|
-
*/
|
21
|
-
var FetchError = class extends Error {
|
22
|
-
/**
|
23
|
-
* The URL that failed to fetch.
|
24
|
-
*/
|
25
|
-
url;
|
26
|
-
/**
|
27
|
-
* Constructs a new `FetchError`.
|
28
|
-
*
|
29
|
-
* @param url The URL that failed to fetch.
|
30
|
-
* @param message Error message.
|
31
|
-
*/
|
32
|
-
constructor(url, message) {
|
33
|
-
super(message == null ? url.toString() : `${url}: ${message}`);
|
34
|
-
this.name = "FetchError";
|
35
|
-
this.url = typeof url === "string" ? new URL(url) : url;
|
36
|
-
}
|
37
|
-
};
|
38
|
-
/**
|
39
|
-
* Creates a request for the given URL.
|
40
|
-
* @param url The URL to create the request for.
|
41
|
-
* @param options The options for the request.
|
42
|
-
* @returns The created request.
|
43
|
-
* @internal
|
44
|
-
*/
|
45
|
-
function createRequest(url, options = {}) {
|
46
|
-
return new Request(url, {
|
47
|
-
headers: {
|
48
|
-
Accept: "application/activity+json, application/ld+json",
|
49
|
-
"User-Agent": typeof options.userAgent === "string" ? options.userAgent : getUserAgent(options.userAgent)
|
50
|
-
},
|
51
|
-
redirect: "manual"
|
52
|
-
});
|
53
|
-
}
|
54
|
-
/**
|
55
|
-
* Logs the request.
|
56
|
-
* @param request The request to log.
|
57
|
-
* @internal
|
58
|
-
*/
|
59
|
-
function logRequest(request) {
|
60
|
-
logger.debug("Fetching document: {method} {url} {headers}", {
|
61
|
-
method: request.method,
|
62
|
-
url: request.url,
|
63
|
-
headers: Object.fromEntries(request.headers.entries())
|
64
|
-
});
|
65
|
-
}
|
66
|
-
/**
|
67
|
-
* Gets a {@link RemoteDocument} from the given response.
|
68
|
-
* @param url The URL of the document to load.
|
69
|
-
* @param response The response to get the document from.
|
70
|
-
* @param fetch The function to fetch the document.
|
71
|
-
* @returns The loaded remote document.
|
72
|
-
* @throws {FetchError} If the response is not OK.
|
73
|
-
* @internal
|
74
|
-
*/
|
75
|
-
async function getRemoteDocument(url, response, fetch$1) {
|
76
|
-
const documentUrl = response.url === "" ? url : response.url;
|
77
|
-
const docUrl = new URL(documentUrl);
|
78
|
-
if (!response.ok) {
|
79
|
-
logger.error("Failed to fetch document: {status} {url} {headers}", {
|
80
|
-
status: response.status,
|
81
|
-
url: documentUrl,
|
82
|
-
headers: Object.fromEntries(response.headers.entries())
|
83
|
-
});
|
84
|
-
throw new FetchError(documentUrl, `HTTP ${response.status}: ${documentUrl}`);
|
85
|
-
}
|
86
|
-
const contentType = response.headers.get("Content-Type");
|
87
|
-
const jsonLd = contentType == null || contentType === "application/activity+json" || contentType.startsWith("application/activity+json;") || contentType === "application/ld+json" || contentType.startsWith("application/ld+json;");
|
88
|
-
const linkHeader = response.headers.get("Link");
|
89
|
-
let contextUrl = null;
|
90
|
-
if (linkHeader != null) {
|
91
|
-
let link;
|
92
|
-
try {
|
93
|
-
link = new HTTPHeaderLink(linkHeader);
|
94
|
-
} catch (e) {
|
95
|
-
if (e instanceof SyntaxError) link = new HTTPHeaderLink();
|
96
|
-
else throw e;
|
97
|
-
}
|
98
|
-
if (jsonLd) {
|
99
|
-
const entries = link.getByRel("http://www.w3.org/ns/json-ld#context");
|
100
|
-
for (const [uri, params] of entries) if ("type" in params && params.type === "application/ld+json") {
|
101
|
-
contextUrl = uri;
|
102
|
-
break;
|
103
|
-
}
|
104
|
-
} else {
|
105
|
-
const entries = link.getByRel("alternate");
|
106
|
-
for (const [uri, params] of entries) {
|
107
|
-
const altUri = new URL(uri, docUrl);
|
108
|
-
if ("type" in params && (params.type === "application/activity+json" || params.type === "application/ld+json" || params.type.startsWith("application/ld+json;")) && altUri.href !== docUrl.href) {
|
109
|
-
logger.debug("Found alternate document: {alternateUrl} from {url}", {
|
110
|
-
alternateUrl: altUri.href,
|
111
|
-
url: documentUrl
|
112
|
-
});
|
113
|
-
return await fetch$1(altUri.href);
|
114
|
-
}
|
115
|
-
}
|
116
|
-
}
|
117
|
-
}
|
118
|
-
let document;
|
119
|
-
if (!jsonLd && (contentType === "text/html" || contentType?.startsWith("text/html;") || contentType === "application/xhtml+xml" || contentType?.startsWith("application/xhtml+xml;"))) {
|
120
|
-
const p = /<(a|link)((\s+[a-z][a-z:_-]*=("[^"]*"|'[^']*'|[^\s>]+))+)\/?>/gi;
|
121
|
-
const p2 = /\s+([a-z][a-z:_-]*)=("([^"]*)"|'([^']*)'|([^\s>]+))/gi;
|
122
|
-
const html = await response.text();
|
123
|
-
let m;
|
124
|
-
const rawAttribs = [];
|
125
|
-
while ((m = p.exec(html)) !== null) rawAttribs.push(m[2]);
|
126
|
-
for (const rawAttrs of rawAttribs) {
|
127
|
-
let m2;
|
128
|
-
const attribs = {};
|
129
|
-
while ((m2 = p2.exec(rawAttrs)) !== null) {
|
130
|
-
const key = m2[1].toLowerCase();
|
131
|
-
const value = m2[3] ?? m2[4] ?? m2[5] ?? "";
|
132
|
-
attribs[key] = value;
|
133
|
-
}
|
134
|
-
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) {
|
135
|
-
logger.debug("Found alternate document: {alternateUrl} from {url}", {
|
136
|
-
alternateUrl: attribs.href,
|
137
|
-
url: documentUrl
|
138
|
-
});
|
139
|
-
return await fetch$1(new URL(attribs.href, docUrl).href);
|
140
|
-
}
|
141
|
-
}
|
142
|
-
document = JSON.parse(html);
|
143
|
-
} else document = await response.json();
|
144
|
-
logger.debug("Fetched document: {status} {url} {headers}", {
|
145
|
-
status: response.status,
|
146
|
-
url: documentUrl,
|
147
|
-
headers: Object.fromEntries(response.headers.entries())
|
148
|
-
});
|
149
|
-
return {
|
150
|
-
contextUrl,
|
151
|
-
document,
|
152
|
-
documentUrl
|
153
|
-
};
|
154
|
-
}
|
155
|
-
/**
|
156
|
-
* Creates a JSON-LD document loader that utilizes the browser's `fetch` API.
|
157
|
-
*
|
158
|
-
* The created loader preloads the below frequently used contexts by default
|
159
|
-
* (unless `options.ignorePreloadedContexts` is set to `true`):
|
160
|
-
*
|
161
|
-
* - <https://www.w3.org/ns/activitystreams>
|
162
|
-
* - <https://w3id.org/security/v1>
|
163
|
-
* - <https://w3id.org/security/data-integrity/v1>
|
164
|
-
* - <https://www.w3.org/ns/did/v1>
|
165
|
-
* - <https://w3id.org/security/multikey/v1>
|
166
|
-
* - <https://purl.archive.org/socialweb/webfinger>
|
167
|
-
* - <http://schema.org/>
|
168
|
-
* @param options Options for the document loader.
|
169
|
-
* @returns The document loader.
|
170
|
-
* @since 1.3.0
|
171
|
-
*/
|
172
|
-
function getDocumentLoader({ allowPrivateAddress, skipPreloadedContexts, userAgent } = {}) {
|
173
|
-
async function load(url) {
|
174
|
-
if (!skipPreloadedContexts && url in contexts_default) {
|
175
|
-
logger.debug("Using preloaded context: {url}.", { url });
|
176
|
-
return {
|
177
|
-
contextUrl: null,
|
178
|
-
document: contexts_default[url],
|
179
|
-
documentUrl: url
|
180
|
-
};
|
181
|
-
}
|
182
|
-
if (!allowPrivateAddress) try {
|
183
|
-
await validatePublicUrl(url);
|
184
|
-
} catch (error) {
|
185
|
-
if (error instanceof UrlError) logger.error("Disallowed private URL: {url}", {
|
186
|
-
url,
|
187
|
-
error
|
188
|
-
});
|
189
|
-
throw error;
|
190
|
-
}
|
191
|
-
const request = createRequest(url, { userAgent });
|
192
|
-
logRequest(request);
|
193
|
-
const response = await fetch(request, { redirect: "manual" });
|
194
|
-
if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) return load(response.headers.get("Location"));
|
195
|
-
return getRemoteDocument(url, response, load);
|
196
|
-
}
|
197
|
-
return load;
|
198
|
-
}
|
199
|
-
const _fetchDocumentLoader = getDocumentLoader();
|
200
|
-
const _fetchDocumentLoader_allowPrivateAddress = getDocumentLoader({ allowPrivateAddress: true });
|
201
|
-
/**
|
202
|
-
* A JSON-LD document loader that utilizes the browser's `fetch` API.
|
203
|
-
*
|
204
|
-
* This loader preloads the below frequently used contexts:
|
205
|
-
*
|
206
|
-
* - <https://www.w3.org/ns/activitystreams>
|
207
|
-
* - <https://w3id.org/security/v1>
|
208
|
-
* - <https://w3id.org/security/data-integrity/v1>
|
209
|
-
* - <https://www.w3.org/ns/did/v1>
|
210
|
-
* - <https://w3id.org/security/multikey/v1>
|
211
|
-
* - <https://purl.archive.org/socialweb/webfinger>
|
212
|
-
* - <http://schema.org/>
|
213
|
-
* @param url The URL of the document to load.
|
214
|
-
* @param allowPrivateAddress Whether to allow fetching private network
|
215
|
-
* addresses. Turned off by default.
|
216
|
-
* @returns The remote document.
|
217
|
-
* @deprecated Use {@link getDocumentLoader} instead.
|
218
|
-
*/
|
219
|
-
function fetchDocumentLoader(url, allowPrivateAddress = false) {
|
220
|
-
logger.warn("fetchDocumentLoader() function is deprecated. Use getDocumentLoader() function instead.");
|
221
|
-
return (allowPrivateAddress ? _fetchDocumentLoader_allowPrivateAddress : _fetchDocumentLoader)(url);
|
222
|
-
}
|
223
|
-
/**
|
224
|
-
* Decorates a {@link DocumentLoader} with a cache backed by a {@link Deno.Kv}.
|
225
|
-
* @param parameters The parameters for the cache.
|
226
|
-
* @returns The decorated document loader which is cache-enabled.
|
227
|
-
*/
|
228
|
-
function kvCache({ loader, kv, prefix, rules }) {
|
229
|
-
const keyPrefix = prefix ?? ["_fedify", "remoteDocument"];
|
230
|
-
rules ??= [[new URLPattern({}), Temporal.Duration.from({ minutes: 5 })]];
|
231
|
-
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()));
|
232
|
-
function matchRule(url) {
|
233
|
-
for (const [pattern, duration] of rules) {
|
234
|
-
if (typeof pattern === "string") {
|
235
|
-
if (url === pattern) return duration;
|
236
|
-
continue;
|
237
|
-
}
|
238
|
-
if (pattern instanceof URL) {
|
239
|
-
if (pattern.href == url) return duration;
|
240
|
-
continue;
|
241
|
-
}
|
242
|
-
if (pattern.test(url)) return duration;
|
243
|
-
}
|
244
|
-
return null;
|
245
|
-
}
|
246
|
-
return async (url) => {
|
247
|
-
const match = matchRule(url);
|
248
|
-
if (match == null) return await loader(url);
|
249
|
-
const key = [...keyPrefix, url];
|
250
|
-
let cache = void 0;
|
251
|
-
try {
|
252
|
-
cache = await kv.get(key);
|
253
|
-
} catch (error) {
|
254
|
-
if (error instanceof Error) logger.warn("Failed to get the document of {url} from the KV cache: {error}", {
|
255
|
-
url,
|
256
|
-
error
|
257
|
-
});
|
258
|
-
}
|
259
|
-
if (cache == null) {
|
260
|
-
const remoteDoc = await loader(url);
|
261
|
-
try {
|
262
|
-
await kv.set(key, remoteDoc, { ttl: match });
|
263
|
-
} catch (error) {
|
264
|
-
logger.warn("Failed to save the document of {url} to the KV cache: {error}", {
|
265
|
-
url,
|
266
|
-
error
|
267
|
-
});
|
268
|
-
}
|
269
|
-
return remoteDoc;
|
270
|
-
}
|
271
|
-
return cache;
|
272
|
-
};
|
273
|
-
}
|
274
|
-
/**
|
275
|
-
* Gets the user agent string for the given application and URL.
|
276
|
-
* @param options The options for making the user agent string.
|
277
|
-
* @returns The user agent string.
|
278
|
-
* @since 1.3.0
|
279
|
-
*/
|
280
|
-
function getUserAgent({ software, url } = {}) {
|
281
|
-
const fedify = `Fedify/${deno_default.version}`;
|
282
|
-
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;
|
283
|
-
const userAgent = software == null ? [fedify] : [software, fedify];
|
284
|
-
if (runtime != null) userAgent.push(runtime);
|
285
|
-
if (url != null) userAgent.push(`+${url.toString()}`);
|
286
|
-
const first = userAgent.shift();
|
287
|
-
return `${first} (${userAgent.join("; ")})`;
|
288
|
-
}
|
289
|
-
|
290
|
-
//#endregion
|
291
|
-
export { FetchError, createRequest, fetchDocumentLoader, getDocumentLoader, getRemoteDocument, getUserAgent, kvCache, logRequest };
|
package/dist/runtime/key.js
DELETED
@@ -1,156 +0,0 @@
|
|
1
|
-
|
2
|
-
import { Temporal } from "@js-temporal/polyfill";
|
3
|
-
import { URLPattern } from "urlpattern-polyfill";
|
4
|
-
|
5
|
-
import { decode, encode } from "./multibase/index.js";
|
6
|
-
import { Integer, Sequence } from "asn1js";
|
7
|
-
import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
8
|
-
import { decodeBase64Url } from "byte-encodings/base64url";
|
9
|
-
import { decodeHex } from "byte-encodings/hex";
|
10
|
-
import { addPrefix, getCodeFromData, rmPrefix } from "multicodec";
|
11
|
-
import { createPublicKey } from "node:crypto";
|
12
|
-
import { PublicKeyInfo } from "pkijs";
|
13
|
-
|
14
|
-
//#region runtime/key.ts
|
15
|
-
const algorithms = {
|
16
|
-
"1.2.840.113549.1.1.1": {
|
17
|
-
name: "RSASSA-PKCS1-v1_5",
|
18
|
-
hash: "SHA-256"
|
19
|
-
},
|
20
|
-
"1.3.101.112": "Ed25519"
|
21
|
-
};
|
22
|
-
/**
|
23
|
-
* Imports a PEM-SPKI formatted public key.
|
24
|
-
* @param pem The PEM-SPKI formatted public key.
|
25
|
-
* @returns The imported public key.
|
26
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
27
|
-
* @since 0.5.0
|
28
|
-
*/
|
29
|
-
async function importSpki(pem) {
|
30
|
-
pem = pem.replace(/(?:-----(?:BEGIN|END) PUBLIC KEY-----|\s)/g, "");
|
31
|
-
let spki;
|
32
|
-
try {
|
33
|
-
spki = decodeBase64(pem);
|
34
|
-
} catch (_) {
|
35
|
-
throw new TypeError("Invalid PEM-SPKI format.");
|
36
|
-
}
|
37
|
-
const pki = PublicKeyInfo.fromBER(spki);
|
38
|
-
const oid = pki.algorithm.algorithmId;
|
39
|
-
const algorithm = algorithms[oid];
|
40
|
-
if (algorithm == null) throw new TypeError("Unsupported algorithm: " + oid);
|
41
|
-
return await crypto.subtle.importKey("spki", spki, algorithm, true, ["verify"]);
|
42
|
-
}
|
43
|
-
/**
|
44
|
-
* Exports a public key in PEM-SPKI format.
|
45
|
-
* @param key The public key to export.
|
46
|
-
* @returns The exported public key in PEM-SPKI format.
|
47
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
48
|
-
* @since 0.5.0
|
49
|
-
*/
|
50
|
-
async function exportSpki(key) {
|
51
|
-
const { validateCryptoKey } = await import("../sig/key.js");
|
52
|
-
validateCryptoKey(key);
|
53
|
-
const spki = await crypto.subtle.exportKey("spki", key);
|
54
|
-
let pem = encodeBase64(spki);
|
55
|
-
pem = (pem.match(/.{1,64}/g) || []).join("\n");
|
56
|
-
return `-----BEGIN PUBLIC KEY-----\n${pem}\n-----END PUBLIC KEY-----\n`;
|
57
|
-
}
|
58
|
-
/**
|
59
|
-
* Imports a PEM-PKCS#1 formatted public key.
|
60
|
-
* @param pem The PEM-PKCS#1 formatted public key.
|
61
|
-
* @returns The imported public key.
|
62
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
63
|
-
* @since 1.5.0
|
64
|
-
*/
|
65
|
-
function importPkcs1(pem) {
|
66
|
-
const key = createPublicKey({
|
67
|
-
key: pem,
|
68
|
-
format: "pem",
|
69
|
-
type: "pkcs1"
|
70
|
-
});
|
71
|
-
const spki = key.export({
|
72
|
-
type: "spki",
|
73
|
-
format: "pem"
|
74
|
-
});
|
75
|
-
return importSpki(spki);
|
76
|
-
}
|
77
|
-
const PKCS1_HEADER = /^\s*-----BEGIN\s+RSA\s+PUBLIC\s+KEY-----\s*\n/;
|
78
|
-
/**
|
79
|
-
* Imports a PEM formatted public key (SPKI or PKCS#1).
|
80
|
-
* @param pem The PEM formatted public key to import (SPKI or PKCS#1).
|
81
|
-
* @returns The imported public key.
|
82
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
83
|
-
* @since 1.5.0
|
84
|
-
*/
|
85
|
-
function importPem(pem) {
|
86
|
-
return PKCS1_HEADER.test(pem) ? importPkcs1(pem) : importSpki(pem);
|
87
|
-
}
|
88
|
-
/**
|
89
|
-
* Imports a [Multibase]-encoded public key.
|
90
|
-
*
|
91
|
-
* [Multibase]: https://www.w3.org/TR/vc-data-integrity/#multibase-0
|
92
|
-
* @param key The Multibase-encoded public key.
|
93
|
-
* @returns The imported public key.
|
94
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
95
|
-
* @since 0.10.0
|
96
|
-
*/
|
97
|
-
async function importMultibaseKey(key) {
|
98
|
-
const decoded = decode(key);
|
99
|
-
const code = getCodeFromData(decoded);
|
100
|
-
const content = rmPrefix(decoded);
|
101
|
-
if (code === 4613) {
|
102
|
-
const keyObject = createPublicKey({
|
103
|
-
key: content,
|
104
|
-
format: "der",
|
105
|
-
type: "pkcs1"
|
106
|
-
});
|
107
|
-
const spki = keyObject.export({
|
108
|
-
type: "spki",
|
109
|
-
format: "der"
|
110
|
-
}).buffer;
|
111
|
-
return await crypto.subtle.importKey("spki", new Uint8Array(spki), {
|
112
|
-
name: "RSASSA-PKCS1-v1_5",
|
113
|
-
hash: "SHA-256"
|
114
|
-
}, true, ["verify"]);
|
115
|
-
} else if (code === 237) return await crypto.subtle.importKey("raw", content, "Ed25519", true, ["verify"]);
|
116
|
-
else throw new TypeError("Unsupported key type: 0x" + code.toString(16));
|
117
|
-
}
|
118
|
-
/**
|
119
|
-
* Exports a public key in [Multibase] format.
|
120
|
-
*
|
121
|
-
* [Multibase]: https://www.w3.org/TR/vc-data-integrity/#multibase-0
|
122
|
-
* @param key The public key to export.
|
123
|
-
* @returns The exported public key in Multibase format.
|
124
|
-
* @throws {TypeError} If the key is invalid or unsupported.
|
125
|
-
* @since 0.10.0
|
126
|
-
*/
|
127
|
-
async function exportMultibaseKey(key) {
|
128
|
-
let content;
|
129
|
-
let code;
|
130
|
-
if (key.algorithm.name === "Ed25519") {
|
131
|
-
content = await crypto.subtle.exportKey("raw", key);
|
132
|
-
code = 237;
|
133
|
-
} else if (key.algorithm.name === "RSASSA-PKCS1-v1_5" && key.algorithm.hash.name === "SHA-256") {
|
134
|
-
const jwk = await crypto.subtle.exportKey("jwk", key);
|
135
|
-
const decodedN = decodeBase64Url(jwk.n);
|
136
|
-
const n = new Uint8Array(decodedN.length + 1);
|
137
|
-
n.set(decodedN, 1);
|
138
|
-
const sequence = new Sequence({ value: [new Integer({
|
139
|
-
isHexOnly: true,
|
140
|
-
valueHex: n
|
141
|
-
}), new Integer({
|
142
|
-
isHexOnly: true,
|
143
|
-
valueHex: decodeBase64Url(jwk.e)
|
144
|
-
})] });
|
145
|
-
content = sequence.toBER(false);
|
146
|
-
code = 4613;
|
147
|
-
} else throw new TypeError("Unsupported key type: " + JSON.stringify(key.algorithm));
|
148
|
-
const codeHex = code.toString(16);
|
149
|
-
const codeBytes = decodeHex(codeHex.length % 2 < 1 ? codeHex : "0" + codeHex);
|
150
|
-
const prefixed = addPrefix(codeBytes, new Uint8Array(content));
|
151
|
-
const encoded = encode("base58btc", prefixed);
|
152
|
-
return new TextDecoder().decode(encoded);
|
153
|
-
}
|
154
|
-
|
155
|
-
//#endregion
|
156
|
-
export { exportMultibaseKey, exportSpki, importMultibaseKey, importPem, importPkcs1, importSpki };
|
@@ -1,24 +0,0 @@
|
|
1
|
-
import { Temporal } from "@js-temporal/polyfill";
|
2
|
-
import { URLPattern } from "urlpattern-polyfill";
|
3
|
-
import { LanguageTag } from "@phensley/language-tag";
|
4
|
-
|
5
|
-
//#region runtime/langstr.d.ts
|
6
|
-
/**
|
7
|
-
* A language-tagged string which corresponds to the `rdf:langString` type.
|
8
|
-
*/
|
9
|
-
/**
|
10
|
-
* A language-tagged string which corresponds to the `rdf:langString` type.
|
11
|
-
*/
|
12
|
-
declare class LanguageString extends String {
|
13
|
-
readonly language: LanguageTag;
|
14
|
-
/**
|
15
|
-
* Constructs a new `LanguageString`.
|
16
|
-
* @param value A string value written in the given language.
|
17
|
-
* @param language The language of the string. If a string is given, it will
|
18
|
-
* be parsed as a `LanguageTag`.
|
19
|
-
*/
|
20
|
-
constructor(value: string, language: LanguageTag | string);
|
21
|
-
}
|
22
|
-
|
23
|
-
//#endregion
|
24
|
-
export { LanguageString as LanguageString$1 };
|