@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
@@ -0,0 +1,1221 @@
|
|
1
|
+
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
globalThis.addEventListener = () => {};
|
5
|
+
|
6
|
+
import { __commonJS, __toESM } from "./chunk-HsBuZ-b2.js";
|
7
|
+
|
8
|
+
//#region node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js
|
9
|
+
var require_glob_to_regexp = __commonJS({ "node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js"(exports, module) {
|
10
|
+
module.exports = function(glob$1, opts) {
|
11
|
+
if (typeof glob$1 !== "string") throw new TypeError("Expected a string");
|
12
|
+
var str = String(glob$1);
|
13
|
+
var reStr = "";
|
14
|
+
var extended = opts ? !!opts.extended : false;
|
15
|
+
var globstar = opts ? !!opts.globstar : false;
|
16
|
+
var inGroup = false;
|
17
|
+
var flags = opts && typeof opts.flags === "string" ? opts.flags : "";
|
18
|
+
var c;
|
19
|
+
for (var i = 0, len = str.length; i < len; i++) {
|
20
|
+
c = str[i];
|
21
|
+
switch (c) {
|
22
|
+
case "/":
|
23
|
+
case "$":
|
24
|
+
case "^":
|
25
|
+
case "+":
|
26
|
+
case ".":
|
27
|
+
case "(":
|
28
|
+
case ")":
|
29
|
+
case "=":
|
30
|
+
case "!":
|
31
|
+
case "|":
|
32
|
+
reStr += "\\" + c;
|
33
|
+
break;
|
34
|
+
case "?": if (extended) {
|
35
|
+
reStr += ".";
|
36
|
+
break;
|
37
|
+
}
|
38
|
+
case "[":
|
39
|
+
case "]": if (extended) {
|
40
|
+
reStr += c;
|
41
|
+
break;
|
42
|
+
}
|
43
|
+
case "{": if (extended) {
|
44
|
+
inGroup = true;
|
45
|
+
reStr += "(";
|
46
|
+
break;
|
47
|
+
}
|
48
|
+
case "}": if (extended) {
|
49
|
+
inGroup = false;
|
50
|
+
reStr += ")";
|
51
|
+
break;
|
52
|
+
}
|
53
|
+
case ",":
|
54
|
+
if (inGroup) {
|
55
|
+
reStr += "|";
|
56
|
+
break;
|
57
|
+
}
|
58
|
+
reStr += "\\" + c;
|
59
|
+
break;
|
60
|
+
case "*":
|
61
|
+
var prevChar = str[i - 1];
|
62
|
+
var starCount = 1;
|
63
|
+
while (str[i + 1] === "*") {
|
64
|
+
starCount++;
|
65
|
+
i++;
|
66
|
+
}
|
67
|
+
var nextChar = str[i + 1];
|
68
|
+
if (!globstar) reStr += ".*";
|
69
|
+
else {
|
70
|
+
var isGlobstar = starCount > 1 && (prevChar === "/" || prevChar === void 0) && (nextChar === "/" || nextChar === void 0);
|
71
|
+
if (isGlobstar) {
|
72
|
+
reStr += "((?:[^/]*(?:/|$))*)";
|
73
|
+
i++;
|
74
|
+
} else reStr += "([^/]*)";
|
75
|
+
}
|
76
|
+
break;
|
77
|
+
default: reStr += c;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
if (!flags || !~flags.indexOf("g")) reStr = "^" + reStr + "$";
|
81
|
+
return new RegExp(reStr, flags);
|
82
|
+
};
|
83
|
+
} });
|
84
|
+
|
85
|
+
//#endregion
|
86
|
+
//#region node_modules/.pnpm/regexparam@3.0.0/node_modules/regexparam/dist/index.mjs
|
87
|
+
/**
|
88
|
+
* @param {string|RegExp} input The route pattern
|
89
|
+
* @param {boolean} [loose] Allow open-ended matching. Ignored with `RegExp` input.
|
90
|
+
*/
|
91
|
+
function parse(input, loose) {
|
92
|
+
if (input instanceof RegExp) return {
|
93
|
+
keys: false,
|
94
|
+
pattern: input
|
95
|
+
};
|
96
|
+
var c, o, tmp, ext, keys = [], pattern = "", arr = input.split("/");
|
97
|
+
arr[0] || arr.shift();
|
98
|
+
while (tmp = arr.shift()) {
|
99
|
+
c = tmp[0];
|
100
|
+
if (c === "*") {
|
101
|
+
keys.push(c);
|
102
|
+
pattern += tmp[1] === "?" ? "(?:/(.*))?" : "/(.*)";
|
103
|
+
} else if (c === ":") {
|
104
|
+
o = tmp.indexOf("?", 1);
|
105
|
+
ext = tmp.indexOf(".", 1);
|
106
|
+
keys.push(tmp.substring(1, !!~o ? o : !!~ext ? ext : tmp.length));
|
107
|
+
pattern += !!~o && !~ext ? "(?:/([^/]+?))?" : "/([^/]+?)";
|
108
|
+
if (!!~ext) pattern += (!!~o ? "?" : "") + "\\" + tmp.substring(ext);
|
109
|
+
} else pattern += "/" + tmp;
|
110
|
+
}
|
111
|
+
return {
|
112
|
+
keys,
|
113
|
+
pattern: new RegExp("^" + pattern + (loose ? "(?=$|/)" : "/?$"), "i")
|
114
|
+
};
|
115
|
+
}
|
116
|
+
|
117
|
+
//#endregion
|
118
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/TypeDescriptor.js
|
119
|
+
const valueTypes = new Set([
|
120
|
+
"boolean",
|
121
|
+
"number",
|
122
|
+
"null",
|
123
|
+
"string",
|
124
|
+
"undefined"
|
125
|
+
]);
|
126
|
+
const referenceTypes = new Set([
|
127
|
+
"array",
|
128
|
+
"function",
|
129
|
+
"object",
|
130
|
+
"symbol"
|
131
|
+
]);
|
132
|
+
const detectableTypes = new Set([
|
133
|
+
"boolean",
|
134
|
+
"function",
|
135
|
+
"number",
|
136
|
+
"string",
|
137
|
+
"symbol"
|
138
|
+
]);
|
139
|
+
const typeConstructors = new Set([
|
140
|
+
Boolean,
|
141
|
+
Number,
|
142
|
+
String
|
143
|
+
]);
|
144
|
+
var TypeDescriptor = class TypeDescriptor {
|
145
|
+
constructor(value) {
|
146
|
+
this.name = TypeDescriptor.of(value);
|
147
|
+
this.isValueType = TypeDescriptor.isValueType(value);
|
148
|
+
this.isReferenceType = TypeDescriptor.isReferenceType(value);
|
149
|
+
this.isArray = TypeDescriptor.isArray(value);
|
150
|
+
this.isBoolean = TypeDescriptor.isBoolean(value);
|
151
|
+
this.isFunction = TypeDescriptor.isFunction(value);
|
152
|
+
this.isNull = TypeDescriptor.isNull(value);
|
153
|
+
this.isNumber = TypeDescriptor.isNumber(value);
|
154
|
+
this.isObject = TypeDescriptor.isObject(value);
|
155
|
+
this.isString = TypeDescriptor.isString(value);
|
156
|
+
this.isSymbol = TypeDescriptor.isSymbol(value);
|
157
|
+
this.isUndefined = TypeDescriptor.isUndefined(value);
|
158
|
+
}
|
159
|
+
static of(value) {
|
160
|
+
if (value === null) return "null";
|
161
|
+
if (value === void 0) return "undefined";
|
162
|
+
const detectedType = typeof value;
|
163
|
+
if (detectableTypes.has(detectedType)) return detectedType;
|
164
|
+
if (detectedType === "object") {
|
165
|
+
if (Array.isArray(value)) return "array";
|
166
|
+
if (typeConstructors.has(value.constructor)) return value.constructor.name.toLowerCase();
|
167
|
+
return detectedType;
|
168
|
+
}
|
169
|
+
throw new Error("Failed due to an unknown type.");
|
170
|
+
}
|
171
|
+
static from(value) {
|
172
|
+
return new TypeDescriptor(value);
|
173
|
+
}
|
174
|
+
static isValueType(value) {
|
175
|
+
return valueTypes.has(TypeDescriptor.of(value));
|
176
|
+
}
|
177
|
+
static isReferenceType(value) {
|
178
|
+
return referenceTypes.has(TypeDescriptor.of(value));
|
179
|
+
}
|
180
|
+
static isArray(value) {
|
181
|
+
return TypeDescriptor.of(value) === "array";
|
182
|
+
}
|
183
|
+
static isBoolean(value) {
|
184
|
+
return TypeDescriptor.of(value) === "boolean";
|
185
|
+
}
|
186
|
+
static isFunction(value) {
|
187
|
+
return TypeDescriptor.of(value) === "function";
|
188
|
+
}
|
189
|
+
static isNull(value) {
|
190
|
+
return TypeDescriptor.of(value) === "null";
|
191
|
+
}
|
192
|
+
static isNumber(value) {
|
193
|
+
return TypeDescriptor.of(value) === "number";
|
194
|
+
}
|
195
|
+
static isObject(value) {
|
196
|
+
return TypeDescriptor.of(value) === "object";
|
197
|
+
}
|
198
|
+
static isString(value) {
|
199
|
+
return TypeDescriptor.of(value) === "string";
|
200
|
+
}
|
201
|
+
static isSymbol(value) {
|
202
|
+
return TypeDescriptor.of(value) === "symbol";
|
203
|
+
}
|
204
|
+
static isUndefined(value) {
|
205
|
+
return TypeDescriptor.of(value) === "undefined";
|
206
|
+
}
|
207
|
+
};
|
208
|
+
|
209
|
+
//#endregion
|
210
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/IsSubsetOf.js
|
211
|
+
const allowedTypes = new Set([
|
212
|
+
"array",
|
213
|
+
"object",
|
214
|
+
"function",
|
215
|
+
"null"
|
216
|
+
]);
|
217
|
+
const isSubsetOf = function(subset, superset, visited = []) {
|
218
|
+
const subsetType = TypeDescriptor.of(subset);
|
219
|
+
const supersetType = TypeDescriptor.of(superset);
|
220
|
+
if (!allowedTypes.has(subsetType)) throw new Error(`Type '${subsetType}' is not supported.`);
|
221
|
+
if (!allowedTypes.has(supersetType)) throw new Error(`Type '${supersetType}' is not supported.`);
|
222
|
+
if (TypeDescriptor.isFunction(subset)) {
|
223
|
+
if (!TypeDescriptor.isFunction(superset)) throw new Error(`Types '${subsetType}' and '${supersetType}' do not match.`);
|
224
|
+
return subset.toString() === superset.toString();
|
225
|
+
}
|
226
|
+
if (TypeDescriptor.isArray(subset)) {
|
227
|
+
if (!TypeDescriptor.isArray(superset)) throw new Error(`Types '${subsetType}' and '${supersetType}' do not match.`);
|
228
|
+
if (subset.length > superset.length) return false;
|
229
|
+
for (const subsetItem of subset) {
|
230
|
+
const subsetItemType = TypeDescriptor.of(subsetItem);
|
231
|
+
let isItemInSuperset;
|
232
|
+
switch (subsetItemType) {
|
233
|
+
case "array":
|
234
|
+
case "object":
|
235
|
+
case "function": {
|
236
|
+
if (visited.includes(subsetItem)) continue;
|
237
|
+
visited.push(subsetItem);
|
238
|
+
isItemInSuperset = superset.some((supersetItem) => {
|
239
|
+
try {
|
240
|
+
return isSubsetOf(subsetItem, supersetItem, visited);
|
241
|
+
} catch {
|
242
|
+
return false;
|
243
|
+
}
|
244
|
+
});
|
245
|
+
break;
|
246
|
+
}
|
247
|
+
default: isItemInSuperset = superset.includes(subsetItem);
|
248
|
+
}
|
249
|
+
if (!isItemInSuperset) return false;
|
250
|
+
}
|
251
|
+
return true;
|
252
|
+
}
|
253
|
+
if (TypeDescriptor.isObject(subset)) {
|
254
|
+
if (!TypeDescriptor.isObject(superset) || TypeDescriptor.isArray(superset)) throw new Error(`Types '${subsetType}' and '${supersetType}' do not match.`);
|
255
|
+
if (Object.keys(subset).length > Object.keys(superset).length) return false;
|
256
|
+
for (const [subsetKey, subsetValue] of Object.entries(subset)) {
|
257
|
+
const supersetValue = superset[subsetKey];
|
258
|
+
const subsetValueType = TypeDescriptor.of(subsetValue);
|
259
|
+
switch (subsetValueType) {
|
260
|
+
case "array":
|
261
|
+
case "object":
|
262
|
+
case "function": {
|
263
|
+
if (visited.includes(subsetValue)) continue;
|
264
|
+
visited.push(subsetValue);
|
265
|
+
try {
|
266
|
+
const isInSuperset = isSubsetOf(subsetValue, supersetValue, visited);
|
267
|
+
if (!isInSuperset) return false;
|
268
|
+
} catch {
|
269
|
+
return false;
|
270
|
+
}
|
271
|
+
break;
|
272
|
+
}
|
273
|
+
default: if (subsetValue !== supersetValue) return false;
|
274
|
+
}
|
275
|
+
}
|
276
|
+
return true;
|
277
|
+
}
|
278
|
+
if (TypeDescriptor.isNull(subset)) {
|
279
|
+
if (!TypeDescriptor.isNull(superset)) throw new Error(`Types '${subsetType}' and '${supersetType}' do not match.`);
|
280
|
+
return true;
|
281
|
+
}
|
282
|
+
throw new Error("Invalid operation.");
|
283
|
+
};
|
284
|
+
isSubsetOf.structural = function(subset, superset, visited = []) {
|
285
|
+
if (!TypeDescriptor.isObject(subset)) throw new Error(`Type '${TypeDescriptor.of(subset)}' is not supported.`);
|
286
|
+
if (!TypeDescriptor.isObject(superset)) throw new Error(`Type '${TypeDescriptor.of(superset)}' is not supported.`);
|
287
|
+
for (const [subsetKey, subsetValue] of Object.entries(subset)) {
|
288
|
+
if (superset[subsetKey] === void 0) return false;
|
289
|
+
const subsetValueType = TypeDescriptor.of(subsetValue);
|
290
|
+
const supersetValue = superset[subsetKey];
|
291
|
+
if (subsetValueType === "object") {
|
292
|
+
if (visited.includes(subsetValue)) continue;
|
293
|
+
visited.push(subsetValue);
|
294
|
+
try {
|
295
|
+
const isInSuperset = isSubsetOf.structural(subsetValue, supersetValue, visited);
|
296
|
+
if (!isInSuperset) return false;
|
297
|
+
} catch {
|
298
|
+
return false;
|
299
|
+
}
|
300
|
+
}
|
301
|
+
}
|
302
|
+
return true;
|
303
|
+
};
|
304
|
+
|
305
|
+
//#endregion
|
306
|
+
//#region node_modules/.pnpm/dequal@2.0.3/node_modules/dequal/dist/index.mjs
|
307
|
+
var has = Object.prototype.hasOwnProperty;
|
308
|
+
function find(iter, tar, key) {
|
309
|
+
for (key of iter.keys()) if (dequal(key, tar)) return key;
|
310
|
+
}
|
311
|
+
function dequal(foo, bar) {
|
312
|
+
var ctor, len, tmp;
|
313
|
+
if (foo === bar) return true;
|
314
|
+
if (foo && bar && (ctor = foo.constructor) === bar.constructor) {
|
315
|
+
if (ctor === Date) return foo.getTime() === bar.getTime();
|
316
|
+
if (ctor === RegExp) return foo.toString() === bar.toString();
|
317
|
+
if (ctor === Array) {
|
318
|
+
if ((len = foo.length) === bar.length) while (len-- && dequal(foo[len], bar[len]));
|
319
|
+
return len === -1;
|
320
|
+
}
|
321
|
+
if (ctor === Set) {
|
322
|
+
if (foo.size !== bar.size) return false;
|
323
|
+
for (len of foo) {
|
324
|
+
tmp = len;
|
325
|
+
if (tmp && typeof tmp === "object") {
|
326
|
+
tmp = find(bar, tmp);
|
327
|
+
if (!tmp) return false;
|
328
|
+
}
|
329
|
+
if (!bar.has(tmp)) return false;
|
330
|
+
}
|
331
|
+
return true;
|
332
|
+
}
|
333
|
+
if (ctor === Map) {
|
334
|
+
if (foo.size !== bar.size) return false;
|
335
|
+
for (len of foo) {
|
336
|
+
tmp = len[0];
|
337
|
+
if (tmp && typeof tmp === "object") {
|
338
|
+
tmp = find(bar, tmp);
|
339
|
+
if (!tmp) return false;
|
340
|
+
}
|
341
|
+
if (!dequal(len[1], bar.get(tmp))) return false;
|
342
|
+
}
|
343
|
+
return true;
|
344
|
+
}
|
345
|
+
if (ctor === ArrayBuffer) {
|
346
|
+
foo = new Uint8Array(foo);
|
347
|
+
bar = new Uint8Array(bar);
|
348
|
+
} else if (ctor === DataView) {
|
349
|
+
if ((len = foo.byteLength) === bar.byteLength) while (len-- && foo.getInt8(len) === bar.getInt8(len));
|
350
|
+
return len === -1;
|
351
|
+
}
|
352
|
+
if (ArrayBuffer.isView(foo)) {
|
353
|
+
if ((len = foo.byteLength) === bar.byteLength) while (len-- && foo[len] === bar[len]);
|
354
|
+
return len === -1;
|
355
|
+
}
|
356
|
+
if (!ctor || typeof foo === "object") {
|
357
|
+
len = 0;
|
358
|
+
for (ctor in foo) {
|
359
|
+
if (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;
|
360
|
+
if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;
|
361
|
+
}
|
362
|
+
return Object.keys(bar).length === len;
|
363
|
+
}
|
364
|
+
}
|
365
|
+
return foo !== foo && bar !== bar;
|
366
|
+
}
|
367
|
+
|
368
|
+
//#endregion
|
369
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/RequestUtils.js
|
370
|
+
const absoluteUrlRX = new RegExp("^[a-z]+://|^data:", "i");
|
371
|
+
const protocolRelativeUrlRX = new RegExp("^//", "i");
|
372
|
+
function hasCredentialsInUrl(url) {
|
373
|
+
const urlObject = new URL(url, !absoluteUrlRX.test(url) ? "http://dummy" : void 0);
|
374
|
+
return Boolean(urlObject.username || urlObject.password);
|
375
|
+
}
|
376
|
+
function normalizeUrl(url, allowRelativeUrls) {
|
377
|
+
if (url instanceof URL) return url.href;
|
378
|
+
const primitiveUrl = String(url).valueOf();
|
379
|
+
if (absoluteUrlRX.test(primitiveUrl)) return new URL(primitiveUrl).href;
|
380
|
+
if (protocolRelativeUrlRX.test(primitiveUrl)) return new URL(primitiveUrl, "http://dummy").href.replace(/^[a-z]+:/, "");
|
381
|
+
if ("location" in globalThis) if (primitiveUrl.startsWith("/")) return `${globalThis.location.origin}${primitiveUrl}`;
|
382
|
+
else return `${globalThis.location.href}/${primitiveUrl}`;
|
383
|
+
else if (allowRelativeUrls) {
|
384
|
+
const urlInstance = new URL(primitiveUrl, "http://dummy");
|
385
|
+
return urlInstance.pathname + urlInstance.search;
|
386
|
+
} else throw new Error("Relative urls are not support by default in node.js tests. Either use a utility such as jsdom to define globalThis.location or set `fetchMock.config.allowRelativeUrls = true`");
|
387
|
+
}
|
388
|
+
function createCallLogFromUrlAndOptions(url, options) {
|
389
|
+
const pendingPromises = [];
|
390
|
+
if (typeof url === "string" || url instanceof String || url instanceof URL) {
|
391
|
+
const normalizedUrl = normalizeUrl(url, true);
|
392
|
+
const derivedOptions = options ? { ...options } : {};
|
393
|
+
if (derivedOptions.headers) derivedOptions.headers = normalizeHeaders(derivedOptions.headers);
|
394
|
+
derivedOptions.method = derivedOptions.method ? derivedOptions.method.toLowerCase() : "get";
|
395
|
+
return {
|
396
|
+
args: [url, options],
|
397
|
+
url: normalizedUrl,
|
398
|
+
queryParams: new URLSearchParams(getQuery(normalizedUrl)),
|
399
|
+
options: derivedOptions,
|
400
|
+
signal: derivedOptions.signal,
|
401
|
+
pendingPromises
|
402
|
+
};
|
403
|
+
}
|
404
|
+
if (typeof url === "object") throw new TypeError("fetch-mock: Unrecognised Request object. Read the Config and Installation sections of the docs");
|
405
|
+
else throw new TypeError("fetch-mock: Invalid arguments passed to fetch");
|
406
|
+
}
|
407
|
+
async function createCallLogFromRequest(request, options) {
|
408
|
+
const pendingPromises = [];
|
409
|
+
const derivedOptions = { method: request.method };
|
410
|
+
try {
|
411
|
+
try {
|
412
|
+
derivedOptions.body = await request.clone().formData();
|
413
|
+
} catch {
|
414
|
+
derivedOptions.body = await request.clone().text();
|
415
|
+
}
|
416
|
+
} catch {}
|
417
|
+
if (request.headers) derivedOptions.headers = normalizeHeaders(request.headers);
|
418
|
+
const url = normalizeUrl(request.url, true);
|
419
|
+
const callLog = {
|
420
|
+
args: [request, options],
|
421
|
+
url,
|
422
|
+
queryParams: new URLSearchParams(getQuery(url)),
|
423
|
+
options: Object.assign(derivedOptions, options || {}),
|
424
|
+
request,
|
425
|
+
signal: options && options.signal || request.signal,
|
426
|
+
pendingPromises
|
427
|
+
};
|
428
|
+
return callLog;
|
429
|
+
}
|
430
|
+
function getPath(url) {
|
431
|
+
const u = absoluteUrlRX.test(url) ? new URL(url) : new URL(url, "http://dummy");
|
432
|
+
return u.pathname;
|
433
|
+
}
|
434
|
+
function getQuery(url) {
|
435
|
+
const u = absoluteUrlRX.test(url) ? new URL(url) : new URL(url, "http://dummy");
|
436
|
+
return u.search ? u.search.substr(1) : "";
|
437
|
+
}
|
438
|
+
function normalizeHeaders(headers) {
|
439
|
+
let entries;
|
440
|
+
if (headers instanceof Headers) entries = [...headers.entries()];
|
441
|
+
else if (Array.isArray(headers)) entries = headers;
|
442
|
+
else entries = Object.entries(headers);
|
443
|
+
return Object.fromEntries(entries.map(([key, val]) => [key.toLowerCase(), String(val).valueOf()]));
|
444
|
+
}
|
445
|
+
|
446
|
+
//#endregion
|
447
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/Matchers.js
|
448
|
+
var import_glob_to_regexp = __toESM(require_glob_to_regexp(), 1);
|
449
|
+
const isUrlMatcher = (matcher) => matcher instanceof RegExp || typeof matcher === "string" || typeof matcher === "object" && "href" in matcher;
|
450
|
+
const isFunctionMatcher = (matcher) => typeof matcher === "function";
|
451
|
+
const stringMatchers = {
|
452
|
+
begin: (targetString) => ({ url }) => url.startsWith(targetString),
|
453
|
+
end: (targetString) => ({ url }) => url.endsWith(targetString),
|
454
|
+
include: (targetString) => ({ url }) => url.includes(targetString),
|
455
|
+
glob: (targetString) => {
|
456
|
+
const urlRX = (0, import_glob_to_regexp.default)(targetString);
|
457
|
+
return ({ url }) => urlRX.test(url);
|
458
|
+
},
|
459
|
+
express: (targetString) => {
|
460
|
+
const urlRX = parse(targetString);
|
461
|
+
return (callLog) => {
|
462
|
+
const vals = urlRX.pattern.exec(getPath(callLog.url));
|
463
|
+
if (!vals) {
|
464
|
+
callLog.expressParams = {};
|
465
|
+
return false;
|
466
|
+
}
|
467
|
+
vals.shift();
|
468
|
+
callLog.expressParams = urlRX.keys.reduce((map, paramName, i) => vals[i] ? Object.assign(map, { [paramName]: vals[i] }) : map, {});
|
469
|
+
return true;
|
470
|
+
};
|
471
|
+
},
|
472
|
+
path: (targetString) => {
|
473
|
+
const dotlessTargetString = getPath(targetString);
|
474
|
+
return ({ url }) => {
|
475
|
+
const path = getPath(url);
|
476
|
+
return path === targetString || path === dotlessTargetString;
|
477
|
+
};
|
478
|
+
}
|
479
|
+
};
|
480
|
+
const getHeaderMatcher = ({ headers: expectedHeaders }) => {
|
481
|
+
if (!expectedHeaders) return;
|
482
|
+
const expectation = normalizeHeaders(expectedHeaders);
|
483
|
+
return ({ options: { headers = {} } }) => {
|
484
|
+
const lowerCaseHeaders = normalizeHeaders(headers);
|
485
|
+
return Object.keys(expectation).every((headerName) => lowerCaseHeaders[headerName] === expectation[headerName]);
|
486
|
+
};
|
487
|
+
};
|
488
|
+
const getMissingHeaderMatcher = ({ missingHeaders: expectedMissingHeaders }) => {
|
489
|
+
if (!expectedMissingHeaders) return;
|
490
|
+
const expectation = expectedMissingHeaders.map((header) => header.toLowerCase());
|
491
|
+
return ({ options: { headers = {} } }) => {
|
492
|
+
const lowerCaseHeaders = normalizeHeaders(headers);
|
493
|
+
return expectation.every((headerName) => !(headerName in lowerCaseHeaders));
|
494
|
+
};
|
495
|
+
};
|
496
|
+
const getMethodMatcher = ({ method: expectedMethod }) => {
|
497
|
+
if (!expectedMethod) return;
|
498
|
+
return ({ options: { method } = {} }) => {
|
499
|
+
const actualMethod = method ? method.toLowerCase() : "get";
|
500
|
+
return expectedMethod === actualMethod;
|
501
|
+
};
|
502
|
+
};
|
503
|
+
const getQueryParamsMatcher = ({ query: passedQuery }) => {
|
504
|
+
if (!passedQuery) return;
|
505
|
+
const expectedQuery = new URLSearchParams();
|
506
|
+
for (const [key, value] of Object.entries(passedQuery)) if (Array.isArray(value)) for (const item of value) expectedQuery.append(key, typeof item === "object" || typeof item === "undefined" ? "" : item.toString());
|
507
|
+
else expectedQuery.append(key, typeof value === "object" || typeof value === "undefined" ? "" : value.toString());
|
508
|
+
const keys = Array.from(expectedQuery.keys());
|
509
|
+
return ({ queryParams }) => {
|
510
|
+
return keys.every((key) => {
|
511
|
+
const expectedValues = expectedQuery.getAll(key).sort();
|
512
|
+
const actualValues = queryParams.getAll(key).sort();
|
513
|
+
if (expectedValues.length !== actualValues.length) return false;
|
514
|
+
if (Array.isArray(passedQuery[key])) return expectedValues.every((expected, index) => expected === actualValues[index]);
|
515
|
+
return dequal(actualValues, expectedValues);
|
516
|
+
});
|
517
|
+
};
|
518
|
+
};
|
519
|
+
const getExpressParamsMatcher = ({ params: expectedParams, url }) => {
|
520
|
+
if (!expectedParams) return;
|
521
|
+
if (!(typeof url === "string" && /express:/.test(url))) throw new Error("fetch-mock: matching on params is only possible when using an express: matcher");
|
522
|
+
const expectedKeys = Object.keys(expectedParams);
|
523
|
+
return ({ expressParams = {} }) => {
|
524
|
+
return expectedKeys.every((key) => expressParams[key] === expectedParams[key]);
|
525
|
+
};
|
526
|
+
};
|
527
|
+
const formDataToObject = (formData) => {
|
528
|
+
const fields = [...formData];
|
529
|
+
const result = {};
|
530
|
+
fields.forEach(([key, value]) => {
|
531
|
+
result[key] = result[key] || [];
|
532
|
+
result[key].push(value);
|
533
|
+
});
|
534
|
+
return result;
|
535
|
+
};
|
536
|
+
const getBodyMatcher = (route) => {
|
537
|
+
let { body: expectedBody } = route;
|
538
|
+
let expectedBodyType = "json";
|
539
|
+
if (!expectedBody) return;
|
540
|
+
if (expectedBody instanceof FormData) {
|
541
|
+
expectedBodyType = "formData";
|
542
|
+
expectedBody = formDataToObject(expectedBody);
|
543
|
+
}
|
544
|
+
return ({ options: { body, method = "get" } }) => {
|
545
|
+
if (["get", "head"].includes(method.toLowerCase())) return false;
|
546
|
+
let sentBody;
|
547
|
+
try {
|
548
|
+
if (typeof body === "string") {
|
549
|
+
sentBody = JSON.parse(body);
|
550
|
+
if (expectedBodyType !== "json") return false;
|
551
|
+
}
|
552
|
+
} catch {}
|
553
|
+
if (body instanceof FormData) {
|
554
|
+
if (expectedBodyType !== "formData") return false;
|
555
|
+
sentBody = formDataToObject(body);
|
556
|
+
}
|
557
|
+
return sentBody && (route.matchPartialBody ? isSubsetOf(expectedBody, sentBody) : dequal(expectedBody, sentBody));
|
558
|
+
};
|
559
|
+
};
|
560
|
+
const getFunctionMatcher = ({ matcherFunction }) => matcherFunction;
|
561
|
+
const getRegexpMatcher = (regexp) => ({ url }) => regexp.test(url);
|
562
|
+
const getFullUrlMatcher = (route, matcherUrl, query) => {
|
563
|
+
const expectedUrl = normalizeUrl(matcherUrl, route.allowRelativeUrls);
|
564
|
+
if (route.url === matcherUrl) route.url = expectedUrl;
|
565
|
+
return ({ url }) => {
|
566
|
+
if (query && expectedUrl.indexOf("?")) return getPath(url) === getPath(expectedUrl);
|
567
|
+
return normalizeUrl(url, true) === expectedUrl;
|
568
|
+
};
|
569
|
+
};
|
570
|
+
const getUrlMatcher = (route) => {
|
571
|
+
const { url: matcherUrl, query } = route;
|
572
|
+
if (matcherUrl === "*") return () => true;
|
573
|
+
if (matcherUrl instanceof RegExp) return getRegexpMatcher(matcherUrl);
|
574
|
+
if (matcherUrl instanceof URL) {
|
575
|
+
if (matcherUrl.href) return getFullUrlMatcher(route, matcherUrl.href, query);
|
576
|
+
}
|
577
|
+
if (typeof matcherUrl === "string") {
|
578
|
+
for (const shorthand in stringMatchers) if (matcherUrl.indexOf(`${shorthand}:`) === 0) {
|
579
|
+
const urlFragment = matcherUrl.replace(new RegExp(`^${shorthand}:`), "");
|
580
|
+
return stringMatchers[shorthand](urlFragment);
|
581
|
+
}
|
582
|
+
return getFullUrlMatcher(route, matcherUrl, query);
|
583
|
+
}
|
584
|
+
if (typeof matcherUrl === "object") {
|
585
|
+
const matchers = Object.entries(matcherUrl).map(([key, pattern]) => {
|
586
|
+
if (key === "regexp") return getRegexpMatcher(pattern);
|
587
|
+
else if (key in stringMatchers) return stringMatchers[key](pattern);
|
588
|
+
else throw new Error(`unrecognised url matching pattern: ${key}`);
|
589
|
+
});
|
590
|
+
return (route$1) => matchers.every((matcher) => matcher(route$1));
|
591
|
+
}
|
592
|
+
};
|
593
|
+
const builtInMatchers = [
|
594
|
+
{
|
595
|
+
name: "url",
|
596
|
+
matcher: getUrlMatcher
|
597
|
+
},
|
598
|
+
{
|
599
|
+
name: "query",
|
600
|
+
matcher: getQueryParamsMatcher
|
601
|
+
},
|
602
|
+
{
|
603
|
+
name: "method",
|
604
|
+
matcher: getMethodMatcher
|
605
|
+
},
|
606
|
+
{
|
607
|
+
name: "headers",
|
608
|
+
matcher: getHeaderMatcher
|
609
|
+
},
|
610
|
+
{
|
611
|
+
name: "missingHeaders",
|
612
|
+
matcher: getMissingHeaderMatcher
|
613
|
+
},
|
614
|
+
{
|
615
|
+
name: "params",
|
616
|
+
matcher: getExpressParamsMatcher
|
617
|
+
},
|
618
|
+
{
|
619
|
+
name: "body",
|
620
|
+
matcher: getBodyMatcher,
|
621
|
+
usesBody: true
|
622
|
+
},
|
623
|
+
{
|
624
|
+
name: "matcherFunction",
|
625
|
+
matcher: getFunctionMatcher
|
626
|
+
}
|
627
|
+
];
|
628
|
+
|
629
|
+
//#endregion
|
630
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/StatusTextMap.js
|
631
|
+
const statusTextMap = {
|
632
|
+
100: "Continue",
|
633
|
+
101: "Switching Protocols",
|
634
|
+
102: "Processing",
|
635
|
+
200: "OK",
|
636
|
+
201: "Created",
|
637
|
+
202: "Accepted",
|
638
|
+
203: "Non-Authoritative Information",
|
639
|
+
204: "No Content",
|
640
|
+
205: "Reset Content",
|
641
|
+
206: "Partial Content",
|
642
|
+
207: "Multi-Status",
|
643
|
+
208: "Already Reported",
|
644
|
+
226: "IM Used",
|
645
|
+
300: "Multiple Choices",
|
646
|
+
301: "Moved Permanently",
|
647
|
+
302: "Found",
|
648
|
+
303: "See Other",
|
649
|
+
304: "Not Modified",
|
650
|
+
305: "Use Proxy",
|
651
|
+
307: "Temporary Redirect",
|
652
|
+
308: "Permanent Redirect",
|
653
|
+
400: "Bad Request",
|
654
|
+
401: "Unauthorized",
|
655
|
+
402: "Payment Required",
|
656
|
+
403: "Forbidden",
|
657
|
+
404: "Not Found",
|
658
|
+
405: "Method Not Allowed",
|
659
|
+
406: "Not Acceptable",
|
660
|
+
407: "Proxy Authentication Required",
|
661
|
+
408: "Request Timeout",
|
662
|
+
409: "Conflict",
|
663
|
+
410: "Gone",
|
664
|
+
411: "Length Required",
|
665
|
+
412: "Precondition Failed",
|
666
|
+
413: "Payload Too Large",
|
667
|
+
414: "URI Too Long",
|
668
|
+
415: "Unsupported Media Type",
|
669
|
+
416: "Range Not Satisfiable",
|
670
|
+
417: "Expectation Failed",
|
671
|
+
418: "I'm a teapot",
|
672
|
+
421: "Misdirected Request",
|
673
|
+
422: "Unprocessable Entity",
|
674
|
+
423: "Locked",
|
675
|
+
424: "Failed Dependency",
|
676
|
+
425: "Unordered Collection",
|
677
|
+
426: "Upgrade Required",
|
678
|
+
428: "Precondition Required",
|
679
|
+
429: "Too Many Requests",
|
680
|
+
431: "Request Header Fields Too Large",
|
681
|
+
451: "Unavailable For Legal Reasons",
|
682
|
+
500: "Internal Server Error",
|
683
|
+
501: "Not Implemented",
|
684
|
+
502: "Bad Gateway",
|
685
|
+
503: "Service Unavailable",
|
686
|
+
504: "Gateway Timeout",
|
687
|
+
505: "HTTP Version Not Supported",
|
688
|
+
506: "Variant Also Negotiates",
|
689
|
+
507: "Insufficient Storage",
|
690
|
+
508: "Loop Detected",
|
691
|
+
509: "Bandwidth Limit Exceeded",
|
692
|
+
510: "Not Extended",
|
693
|
+
511: "Network Authentication Required"
|
694
|
+
};
|
695
|
+
var StatusTextMap_default = statusTextMap;
|
696
|
+
|
697
|
+
//#endregion
|
698
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/Route.js
|
699
|
+
var __classPrivateFieldSet = void 0 && (void 0).__classPrivateFieldSet || function(receiver, state, value, kind, f) {
|
700
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
701
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
702
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
703
|
+
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
704
|
+
};
|
705
|
+
var __classPrivateFieldGet = void 0 && (void 0).__classPrivateFieldGet || function(receiver, state, kind, f) {
|
706
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
707
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
708
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
709
|
+
};
|
710
|
+
var _Route_instances, _a, _Route_responseSubscriptions, _Route_validate, _Route_sanitize, _Route_generateMatcher, _Route_limit, _Route_delayResponse;
|
711
|
+
function isBodyInit(body) {
|
712
|
+
return body instanceof Blob || body instanceof ArrayBuffer || ArrayBuffer.isView(body) || body instanceof DataView || body instanceof FormData || body instanceof ReadableStream || body instanceof URLSearchParams || body instanceof String || typeof body === "string" || body === null;
|
713
|
+
}
|
714
|
+
function sanitizeStatus(status) {
|
715
|
+
if (status === 0) return 200;
|
716
|
+
if (!status) return 200;
|
717
|
+
if (typeof status === "number" && parseInt(String(status), 10) !== status && status >= 200 || status < 600) return status;
|
718
|
+
throw new TypeError(`fetch-mock: Invalid status ${status} passed on response object.
|
719
|
+
To respond with a JSON object that has status as a property assign the object to body
|
720
|
+
e.g. {"body": {"status: "registered"}}`);
|
721
|
+
}
|
722
|
+
var Route = class {
|
723
|
+
constructor(config) {
|
724
|
+
_Route_instances.add(this);
|
725
|
+
_Route_responseSubscriptions.set(this, void 0);
|
726
|
+
this.init(config);
|
727
|
+
}
|
728
|
+
init(config) {
|
729
|
+
this.config = config;
|
730
|
+
__classPrivateFieldSet(this, _Route_responseSubscriptions, [], "f");
|
731
|
+
__classPrivateFieldGet(this, _Route_instances, "m", _Route_sanitize).call(this);
|
732
|
+
__classPrivateFieldGet(this, _Route_instances, "m", _Route_validate).call(this);
|
733
|
+
__classPrivateFieldGet(this, _Route_instances, "m", _Route_generateMatcher).call(this);
|
734
|
+
__classPrivateFieldGet(this, _Route_instances, "m", _Route_limit).call(this);
|
735
|
+
__classPrivateFieldGet(this, _Route_instances, "m", _Route_delayResponse).call(this);
|
736
|
+
}
|
737
|
+
reset() {}
|
738
|
+
waitFor(awaitedRoutes) {
|
739
|
+
const { response } = this.config;
|
740
|
+
this.config.response = Promise.all(awaitedRoutes.map((awaitedRoute) => new Promise((res) => awaitedRoute.onRespond(() => {
|
741
|
+
res(void 0);
|
742
|
+
})))).then(() => response);
|
743
|
+
}
|
744
|
+
onRespond(func) {
|
745
|
+
__classPrivateFieldGet(this, _Route_responseSubscriptions, "f").push(func);
|
746
|
+
}
|
747
|
+
constructResponse(responseInput) {
|
748
|
+
const responseOptions = this.constructResponseOptions(responseInput);
|
749
|
+
const body = this.constructResponseBody(responseInput, responseOptions);
|
750
|
+
const responsePackage = {
|
751
|
+
response: new this.config.Response(body, responseOptions),
|
752
|
+
responseOptions,
|
753
|
+
responseInput
|
754
|
+
};
|
755
|
+
__classPrivateFieldGet(this, _Route_responseSubscriptions, "f").forEach((func) => func());
|
756
|
+
return responsePackage;
|
757
|
+
}
|
758
|
+
constructResponseOptions(responseInput) {
|
759
|
+
const options = responseInput.options || {};
|
760
|
+
options.status = sanitizeStatus(responseInput.status);
|
761
|
+
options.statusText = StatusTextMap_default[options.status];
|
762
|
+
options.headers = new this.config.Headers(responseInput.headers);
|
763
|
+
return options;
|
764
|
+
}
|
765
|
+
constructResponseBody(responseInput, responseOptions) {
|
766
|
+
let body = responseInput.body;
|
767
|
+
const bodyIsBodyInit = isBodyInit(body);
|
768
|
+
if (!bodyIsBodyInit) if (typeof body === "undefined") body = null;
|
769
|
+
else if (typeof body === "object") {
|
770
|
+
body = JSON.stringify(body);
|
771
|
+
if (!responseOptions.headers.has("Content-Type")) responseOptions.headers.set("Content-Type", "application/json");
|
772
|
+
} else throw new TypeError("Invalid body provided to construct response");
|
773
|
+
if (this.config.includeContentLength && !responseOptions.headers.has("Content-Length") && !(body instanceof ReadableStream) && !(body instanceof FormData)) {
|
774
|
+
let length = 0;
|
775
|
+
if (body instanceof Blob) length = body.size;
|
776
|
+
else if (body instanceof ArrayBuffer || ArrayBuffer.isView(body) || body instanceof DataView) length = body.byteLength;
|
777
|
+
else if (body instanceof URLSearchParams) length = body.toString().length;
|
778
|
+
else if (typeof body === "string" || body instanceof String) length = body.length;
|
779
|
+
responseOptions.headers.set("Content-Length", length.toString());
|
780
|
+
}
|
781
|
+
return body;
|
782
|
+
}
|
783
|
+
static defineMatcher(matcher) {
|
784
|
+
_a.registeredMatchers.push(matcher);
|
785
|
+
}
|
786
|
+
};
|
787
|
+
_a = Route, _Route_responseSubscriptions = new WeakMap(), _Route_instances = new WeakSet(), _Route_validate = function _Route_validate$1() {
|
788
|
+
if (["matched", "unmatched"].includes(this.config.name)) throw new Error(`fetch-mock: Routes cannot use the reserved name \`${this.config.name}\``);
|
789
|
+
if (!("response" in this.config)) throw new Error("fetch-mock: Each route must define a response");
|
790
|
+
if (!_a.registeredMatchers.some(({ name }) => name in this.config)) throw new Error("fetch-mock: Each route must specify some criteria for matching calls to fetch. To match all calls use '*'");
|
791
|
+
}, _Route_sanitize = function _Route_sanitize$1() {
|
792
|
+
if (this.config.method) this.config.method = this.config.method.toLowerCase();
|
793
|
+
}, _Route_generateMatcher = function _Route_generateMatcher$1() {
|
794
|
+
const activeMatchers = _a.registeredMatchers.filter(({ name }) => name in this.config).map(({ matcher, usesBody }) => ({
|
795
|
+
matcher: matcher(this.config),
|
796
|
+
usesBody
|
797
|
+
}));
|
798
|
+
this.config.usesBody = activeMatchers.some(({ usesBody }) => usesBody);
|
799
|
+
this.matcher = (normalizedRequest) => activeMatchers.every(({ matcher }) => matcher(normalizedRequest));
|
800
|
+
}, _Route_limit = function _Route_limit$1() {
|
801
|
+
if (!this.config.repeat) return;
|
802
|
+
const originalMatcher = this.matcher;
|
803
|
+
let timesLeft = this.config.repeat;
|
804
|
+
this.matcher = (callLog) => {
|
805
|
+
const match = timesLeft && originalMatcher(callLog);
|
806
|
+
if (match) {
|
807
|
+
timesLeft--;
|
808
|
+
return true;
|
809
|
+
}
|
810
|
+
};
|
811
|
+
this.reset = () => {
|
812
|
+
timesLeft = this.config.repeat;
|
813
|
+
};
|
814
|
+
}, _Route_delayResponse = function _Route_delayResponse$1() {
|
815
|
+
if (this.config.delay) {
|
816
|
+
const { response } = this.config;
|
817
|
+
this.config.response = () => {
|
818
|
+
return new Promise((res) => setTimeout(() => res(response), this.config.delay));
|
819
|
+
};
|
820
|
+
}
|
821
|
+
};
|
822
|
+
Route.registeredMatchers = [];
|
823
|
+
builtInMatchers.forEach(Route.defineMatcher);
|
824
|
+
var Route_default = Route;
|
825
|
+
|
826
|
+
//#endregion
|
827
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/Router.js
|
828
|
+
const responseConfigProps = [
|
829
|
+
"body",
|
830
|
+
"headers",
|
831
|
+
"throws",
|
832
|
+
"status",
|
833
|
+
"redirectUrl"
|
834
|
+
];
|
835
|
+
function nameToOptions(options) {
|
836
|
+
return typeof options === "string" ? { name: options } : options;
|
837
|
+
}
|
838
|
+
function isPromise(response) {
|
839
|
+
return typeof response.then === "function";
|
840
|
+
}
|
841
|
+
function normalizeResponseInput(responseInput) {
|
842
|
+
if (typeof responseInput === "number") return { status: responseInput };
|
843
|
+
else if (typeof responseInput === "string" || shouldSendAsObject(responseInput)) return { body: responseInput };
|
844
|
+
return responseInput;
|
845
|
+
}
|
846
|
+
function shouldSendAsObject(responseInput) {
|
847
|
+
if (responseConfigProps.some((prop) => prop in responseInput)) {
|
848
|
+
if (Object.keys(responseInput).every((key) => responseConfigProps.includes(key))) return false;
|
849
|
+
return true;
|
850
|
+
}
|
851
|
+
return true;
|
852
|
+
}
|
853
|
+
function throwSpecExceptions({ url, options: { headers, method, body } }) {
|
854
|
+
if (headers) Object.entries(headers).forEach(([key]) => {
|
855
|
+
if (/\s/.test(key)) throw new TypeError("Invalid name");
|
856
|
+
});
|
857
|
+
if (hasCredentialsInUrl(url)) throw new TypeError(`Request cannot be constructed from a URL that includes credentials: ${url}`);
|
858
|
+
if (["get", "head"].includes(method) && body) throw new TypeError("Request with GET/HEAD method cannot have body.");
|
859
|
+
}
|
860
|
+
const resolveUntilResponseConfig = async (callLog) => {
|
861
|
+
let response = callLog.route.config.response;
|
862
|
+
while (true) if (typeof response === "function") response = response(callLog);
|
863
|
+
else if (isPromise(response)) response = await response;
|
864
|
+
else return response;
|
865
|
+
};
|
866
|
+
var Router = class {
|
867
|
+
constructor(fetchMockConfig, { routes, fallbackRoute } = {}) {
|
868
|
+
this.config = fetchMockConfig;
|
869
|
+
this.routes = routes || [];
|
870
|
+
this.fallbackRoute = fallbackRoute;
|
871
|
+
}
|
872
|
+
needsToReadBody(request) {
|
873
|
+
return Boolean(request && this.routes.some((route) => route.config.usesBody));
|
874
|
+
}
|
875
|
+
execute(callLog) {
|
876
|
+
throwSpecExceptions(callLog);
|
877
|
+
return new Promise(async (resolve, reject) => {
|
878
|
+
const { url, options, request, pendingPromises } = callLog;
|
879
|
+
if (callLog.signal) {
|
880
|
+
const abort = () => {
|
881
|
+
const error = new DOMException("The operation was aborted.", "AbortError");
|
882
|
+
const requestBody = request?.body || options?.body;
|
883
|
+
if (requestBody instanceof ReadableStream) if (requestBody.locked) requestBody.getReader().cancel(error);
|
884
|
+
else requestBody.cancel(error);
|
885
|
+
if (callLog?.response?.body) if (callLog.response.body.locked) callLog.response.body.getReader().cancel(error);
|
886
|
+
else callLog.response.body.cancel(error);
|
887
|
+
reject(error);
|
888
|
+
};
|
889
|
+
if (callLog.signal.aborted) abort();
|
890
|
+
callLog.signal.addEventListener("abort", abort);
|
891
|
+
}
|
892
|
+
if (this.needsToReadBody(request)) options.body = await options.body;
|
893
|
+
const routesToTry = this.fallbackRoute ? [...this.routes, this.fallbackRoute] : this.routes;
|
894
|
+
const route = routesToTry.find((route$1) => route$1.matcher(callLog));
|
895
|
+
if (route) try {
|
896
|
+
callLog.route = route;
|
897
|
+
const { response, responseOptions, responseInput } = await this.generateResponse(callLog);
|
898
|
+
const observableResponse = this.createObservableResponse(response, responseOptions, responseInput, url, pendingPromises);
|
899
|
+
callLog.response = response;
|
900
|
+
resolve(observableResponse);
|
901
|
+
} catch (err) {
|
902
|
+
reject(err);
|
903
|
+
}
|
904
|
+
else reject(new Error(`fetch-mock: No response or fallback rule to cover ${options && options.method || "GET"} to ${url}`));
|
905
|
+
});
|
906
|
+
}
|
907
|
+
async generateResponse(callLog) {
|
908
|
+
const responseInput = await resolveUntilResponseConfig(callLog);
|
909
|
+
if (responseInput instanceof Response) return {
|
910
|
+
response: responseInput.clone(),
|
911
|
+
responseOptions: {},
|
912
|
+
responseInput: {}
|
913
|
+
};
|
914
|
+
const responseConfig = normalizeResponseInput(responseInput);
|
915
|
+
if (responseConfig.throws) throw responseConfig.throws;
|
916
|
+
return callLog.route.constructResponse(responseConfig);
|
917
|
+
}
|
918
|
+
createObservableResponse(response, responseConfig, responseInput, responseUrl, pendingPromises) {
|
919
|
+
return new Proxy(response, { get: (originalResponse, name) => {
|
920
|
+
if (responseInput.redirectUrl) {
|
921
|
+
if (name === "url") return responseInput.redirectUrl;
|
922
|
+
if (name === "redirected") return true;
|
923
|
+
} else {
|
924
|
+
if (name === "url") return responseUrl;
|
925
|
+
if (name === "redirected") return false;
|
926
|
+
}
|
927
|
+
if (responseInput.status === 0) {
|
928
|
+
if (name === "status") return 0;
|
929
|
+
if (name === "statusText") return "";
|
930
|
+
}
|
931
|
+
if (typeof response[name] === "function") return new Proxy(response[name], { apply: (func, thisArg, args) => {
|
932
|
+
const result = func.apply(response, args);
|
933
|
+
if (result.then) pendingPromises.push(result.catch(() => void 0));
|
934
|
+
return result;
|
935
|
+
} });
|
936
|
+
return originalResponse[name];
|
937
|
+
} });
|
938
|
+
}
|
939
|
+
addRoute(matcher, response, nameOrOptions) {
|
940
|
+
const config = {};
|
941
|
+
if (isUrlMatcher(matcher)) config.url = matcher;
|
942
|
+
else if (isFunctionMatcher(matcher)) config.matcherFunction = matcher;
|
943
|
+
else Object.assign(config, matcher);
|
944
|
+
if (typeof response !== "undefined") config.response = response;
|
945
|
+
if (nameOrOptions) Object.assign(config, typeof nameOrOptions === "string" ? nameToOptions(nameOrOptions) : nameOrOptions);
|
946
|
+
const route = new Route_default({
|
947
|
+
...this.config,
|
948
|
+
...config
|
949
|
+
});
|
950
|
+
if (route.config.name && this.routes.some(({ config: { name: existingName } }) => route.config.name === existingName)) throw new Error("fetch-mock: Adding route with same name as existing route.");
|
951
|
+
if (route.config.waitFor) {
|
952
|
+
const routeNamesToWaitFor = Array.isArray(route.config.waitFor) ? route.config.waitFor : [route.config.waitFor];
|
953
|
+
const routesToAwait = [];
|
954
|
+
routeNamesToWaitFor.forEach((routeName) => {
|
955
|
+
const routeToAwait = this.routes.find(({ config: { name: existingName } }) => routeName === existingName);
|
956
|
+
if (routeToAwait) routesToAwait.push(routeToAwait);
|
957
|
+
else throw new Error(`Cannot wait for route \`${routeName}\`: route of that name does not exist`);
|
958
|
+
});
|
959
|
+
route.waitFor(routesToAwait);
|
960
|
+
}
|
961
|
+
this.routes.push(route);
|
962
|
+
}
|
963
|
+
setFallback(response) {
|
964
|
+
if (this.fallbackRoute) console.warn("calling fetchMock.catch() twice - are you sure you want to overwrite the previous fallback response");
|
965
|
+
this.fallbackRoute = new Route_default({
|
966
|
+
matcherFunction: () => true,
|
967
|
+
response: response || "ok",
|
968
|
+
...this.config
|
969
|
+
});
|
970
|
+
this.fallbackRoute.config.isFallback = true;
|
971
|
+
}
|
972
|
+
removeRoutes({ names, includeSticky, includeFallback } = {}) {
|
973
|
+
includeFallback = includeFallback ?? true;
|
974
|
+
this.routes = this.routes.filter(({ config: { sticky, name } }) => {
|
975
|
+
if (sticky && !includeSticky) return true;
|
976
|
+
if (!names) return false;
|
977
|
+
return !names.includes(name);
|
978
|
+
});
|
979
|
+
if (includeFallback) delete this.fallbackRoute;
|
980
|
+
}
|
981
|
+
modifyRoute(routeName, options) {
|
982
|
+
const route = this.routes.find(({ config: { name } }) => name === routeName);
|
983
|
+
if (!route) throw new Error(`Cannot call modifyRoute() on route \`${routeName}\`: route of that name not found`);
|
984
|
+
if (route.config.sticky) throw new Error(`Cannot call modifyRoute() on route \`${routeName}\`: route is sticky and cannot be modified`);
|
985
|
+
if ("name" in options) throw new Error(`Cannot rename the route \`${routeName}\` as \`${options.name}\`: renaming routes is not supported`);
|
986
|
+
if ("sticky" in options) throw new Error(`Altering the stickiness of route \`${routeName}\` is not supported`);
|
987
|
+
const newConfig = {
|
988
|
+
...route.config,
|
989
|
+
...options
|
990
|
+
};
|
991
|
+
Object.entries(options).forEach(([key, value]) => {
|
992
|
+
if (value === null) delete newConfig[key];
|
993
|
+
});
|
994
|
+
route.init(newConfig);
|
995
|
+
}
|
996
|
+
};
|
997
|
+
|
998
|
+
//#endregion
|
999
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/CallHistory.js
|
1000
|
+
const isName = (filter) => typeof filter === "string" && /^[\da-zA-Z-]+$/.test(filter) && !["matched", "unmatched"].includes(filter);
|
1001
|
+
const isMatchedOrUnmatched = (filter) => typeof filter === "boolean" || ["matched", "unmatched"].includes(filter);
|
1002
|
+
var CallHistory = class {
|
1003
|
+
constructor(config, router) {
|
1004
|
+
this.callLogs = [];
|
1005
|
+
this.config = config;
|
1006
|
+
this.router = router;
|
1007
|
+
}
|
1008
|
+
recordCall(callLog) {
|
1009
|
+
this.callLogs.push(callLog);
|
1010
|
+
}
|
1011
|
+
clear() {
|
1012
|
+
this.callLogs.forEach(({ route }) => {
|
1013
|
+
if (route) route.reset();
|
1014
|
+
});
|
1015
|
+
this.callLogs = [];
|
1016
|
+
}
|
1017
|
+
async flush(waitForResponseMethods) {
|
1018
|
+
const queuedPromises = this.callLogs.flatMap((call) => call.pendingPromises);
|
1019
|
+
await Promise.allSettled(queuedPromises);
|
1020
|
+
if (waitForResponseMethods) {
|
1021
|
+
await Promise.resolve();
|
1022
|
+
await this.flush();
|
1023
|
+
}
|
1024
|
+
}
|
1025
|
+
calls(filter, options) {
|
1026
|
+
let calls = [...this.callLogs];
|
1027
|
+
if (typeof filter === "undefined" && !options) return calls;
|
1028
|
+
if (isMatchedOrUnmatched(filter)) {
|
1029
|
+
if ([true, "matched"].includes(filter)) calls = calls.filter(({ route }) => !route.config.isFallback);
|
1030
|
+
else if ([false, "unmatched"].includes(filter)) calls = calls.filter(({ route }) => Boolean(route.config.isFallback));
|
1031
|
+
if (!options) return calls;
|
1032
|
+
} else if (isName(filter)) {
|
1033
|
+
calls = calls.filter(({ route: { config: { name } } }) => name === filter);
|
1034
|
+
if (!options) return calls;
|
1035
|
+
} else if (isUrlMatcher(filter)) options = {
|
1036
|
+
url: filter,
|
1037
|
+
...options || {}
|
1038
|
+
};
|
1039
|
+
else options = {
|
1040
|
+
...filter,
|
1041
|
+
...options || {}
|
1042
|
+
};
|
1043
|
+
const { matcher } = new Route_default({
|
1044
|
+
response: "ok",
|
1045
|
+
...options
|
1046
|
+
});
|
1047
|
+
calls = calls.filter(({ url, options: options$1 }) => {
|
1048
|
+
return matcher(createCallLogFromUrlAndOptions(url, options$1));
|
1049
|
+
});
|
1050
|
+
return calls;
|
1051
|
+
}
|
1052
|
+
called(filter, options) {
|
1053
|
+
return Boolean(this.calls(filter, options).length);
|
1054
|
+
}
|
1055
|
+
lastCall(filter, options) {
|
1056
|
+
return this.calls(filter, options).pop();
|
1057
|
+
}
|
1058
|
+
done(routeNames) {
|
1059
|
+
let routesToCheck = this.router.routes;
|
1060
|
+
if (routeNames) {
|
1061
|
+
routeNames = Array.isArray(routeNames) ? routeNames : [routeNames];
|
1062
|
+
routesToCheck = this.router.routes.filter(({ config: { name } }) => routeNames.includes(name));
|
1063
|
+
}
|
1064
|
+
return routesToCheck.map((route) => {
|
1065
|
+
const calls = this.callLogs.filter(({ route: routeApplied }) => routeApplied === route);
|
1066
|
+
if (!calls.length) {
|
1067
|
+
console.warn(`Warning: ${route.config.name} not called`);
|
1068
|
+
return false;
|
1069
|
+
}
|
1070
|
+
const expectedTimes = route.config.repeat;
|
1071
|
+
if (!expectedTimes) return true;
|
1072
|
+
const actualTimes = calls.length;
|
1073
|
+
if (expectedTimes > actualTimes) {
|
1074
|
+
console.warn(`Warning: ${route.config.name} only called ${actualTimes} times, but ${expectedTimes} expected`);
|
1075
|
+
return false;
|
1076
|
+
}
|
1077
|
+
return true;
|
1078
|
+
}).every((isDone) => isDone);
|
1079
|
+
}
|
1080
|
+
};
|
1081
|
+
var CallHistory_default = CallHistory;
|
1082
|
+
|
1083
|
+
//#endregion
|
1084
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/FetchMock.js
|
1085
|
+
const defaultFetchMockConfig = {
|
1086
|
+
includeContentLength: true,
|
1087
|
+
matchPartialBody: false,
|
1088
|
+
Request: globalThis.Request,
|
1089
|
+
Response: globalThis.Response,
|
1090
|
+
Headers: globalThis.Headers,
|
1091
|
+
fetch: globalThis.fetch
|
1092
|
+
};
|
1093
|
+
const defineShorthand = (shorthandOptions) => {
|
1094
|
+
function shorthand(matcher, response, options) {
|
1095
|
+
return this.route(matcher, response, Object.assign(options || {}, shorthandOptions));
|
1096
|
+
}
|
1097
|
+
return shorthand;
|
1098
|
+
};
|
1099
|
+
const defineGreedyShorthand = (shorthandOptions) => {
|
1100
|
+
return function(response, options) {
|
1101
|
+
return this.route("*", response, Object.assign(options || {}, shorthandOptions));
|
1102
|
+
};
|
1103
|
+
};
|
1104
|
+
var FetchMock = class FetchMock {
|
1105
|
+
constructor(config, router) {
|
1106
|
+
this.sticky = defineShorthand({ sticky: true });
|
1107
|
+
this.once = defineShorthand({ repeat: 1 });
|
1108
|
+
this.any = defineGreedyShorthand({});
|
1109
|
+
this.anyOnce = defineGreedyShorthand({ repeat: 1 });
|
1110
|
+
this.get = defineShorthand({ method: "get" });
|
1111
|
+
this.getOnce = defineShorthand({
|
1112
|
+
method: "get",
|
1113
|
+
repeat: 1
|
1114
|
+
});
|
1115
|
+
this.post = defineShorthand({ method: "post" });
|
1116
|
+
this.postOnce = defineShorthand({
|
1117
|
+
method: "post",
|
1118
|
+
repeat: 1
|
1119
|
+
});
|
1120
|
+
this.put = defineShorthand({ method: "put" });
|
1121
|
+
this.putOnce = defineShorthand({
|
1122
|
+
method: "put",
|
1123
|
+
repeat: 1
|
1124
|
+
});
|
1125
|
+
this.delete = defineShorthand({ method: "delete" });
|
1126
|
+
this.deleteOnce = defineShorthand({
|
1127
|
+
method: "delete",
|
1128
|
+
repeat: 1
|
1129
|
+
});
|
1130
|
+
this.head = defineShorthand({ method: "head" });
|
1131
|
+
this.headOnce = defineShorthand({
|
1132
|
+
method: "head",
|
1133
|
+
repeat: 1
|
1134
|
+
});
|
1135
|
+
this.patch = defineShorthand({ method: "patch" });
|
1136
|
+
this.patchOnce = defineShorthand({
|
1137
|
+
method: "patch",
|
1138
|
+
repeat: 1
|
1139
|
+
});
|
1140
|
+
this.config = config;
|
1141
|
+
this.router = new Router(this.config, {
|
1142
|
+
routes: router ? [...router.routes] : [],
|
1143
|
+
fallbackRoute: router ? router.fallbackRoute : null
|
1144
|
+
});
|
1145
|
+
this.callHistory = new CallHistory_default(this.config, this.router);
|
1146
|
+
this.fetchHandler = this.fetchHandler.bind(this);
|
1147
|
+
Object.assign(this.fetchHandler, { fetchMock: this });
|
1148
|
+
}
|
1149
|
+
createInstance() {
|
1150
|
+
return new FetchMock({ ...this.config }, this.router);
|
1151
|
+
}
|
1152
|
+
async fetchHandler(requestInput, requestInit) {
|
1153
|
+
let callLog;
|
1154
|
+
if (requestInput instanceof this.config.Request) callLog = await createCallLogFromRequest(requestInput, requestInit);
|
1155
|
+
else callLog = createCallLogFromUrlAndOptions(requestInput, requestInit);
|
1156
|
+
this.callHistory.recordCall(callLog);
|
1157
|
+
const responsePromise = this.router.execute(callLog);
|
1158
|
+
callLog.pendingPromises.push(responsePromise);
|
1159
|
+
return responsePromise;
|
1160
|
+
}
|
1161
|
+
route(matcher, response, options) {
|
1162
|
+
this.router.addRoute(matcher, response, options);
|
1163
|
+
return this;
|
1164
|
+
}
|
1165
|
+
catch(response) {
|
1166
|
+
this.router.setFallback(response);
|
1167
|
+
return this;
|
1168
|
+
}
|
1169
|
+
defineMatcher(matcher) {
|
1170
|
+
Route_default.defineMatcher(matcher);
|
1171
|
+
}
|
1172
|
+
removeRoutes(options) {
|
1173
|
+
this.router.removeRoutes(options);
|
1174
|
+
return this;
|
1175
|
+
}
|
1176
|
+
removeRoute(routeName) {
|
1177
|
+
this.router.removeRoutes({ names: [routeName] });
|
1178
|
+
return this;
|
1179
|
+
}
|
1180
|
+
modifyRoute(routeName, options) {
|
1181
|
+
this.router.modifyRoute(routeName, options);
|
1182
|
+
return this;
|
1183
|
+
}
|
1184
|
+
clearHistory() {
|
1185
|
+
this.callHistory.clear();
|
1186
|
+
return this;
|
1187
|
+
}
|
1188
|
+
mockGlobal() {
|
1189
|
+
globalThis.fetch = this.fetchHandler;
|
1190
|
+
return this;
|
1191
|
+
}
|
1192
|
+
unmockGlobal() {
|
1193
|
+
globalThis.fetch = this.config.fetch;
|
1194
|
+
return this;
|
1195
|
+
}
|
1196
|
+
hardReset(options) {
|
1197
|
+
this.clearHistory();
|
1198
|
+
this.removeRoutes(options);
|
1199
|
+
this.unmockGlobal();
|
1200
|
+
return this;
|
1201
|
+
}
|
1202
|
+
spy(matcher, name) {
|
1203
|
+
const boundFetch = this.config.fetch.bind(globalThis);
|
1204
|
+
if (matcher) this.route(matcher, ({ args }) => boundFetch(...args), name);
|
1205
|
+
else this.catch(({ args }) => boundFetch(...args));
|
1206
|
+
return this;
|
1207
|
+
}
|
1208
|
+
spyGlobal() {
|
1209
|
+
this.mockGlobal();
|
1210
|
+
return this.spy();
|
1211
|
+
}
|
1212
|
+
};
|
1213
|
+
const fetchMock = new FetchMock({ ...defaultFetchMockConfig });
|
1214
|
+
var FetchMock_default = fetchMock;
|
1215
|
+
|
1216
|
+
//#endregion
|
1217
|
+
//#region node_modules/.pnpm/fetch-mock@12.5.2/node_modules/fetch-mock/dist/esm/index.js
|
1218
|
+
var esm_default = FetchMock_default;
|
1219
|
+
|
1220
|
+
//#endregion
|
1221
|
+
export { esm_default };
|