@fedify/fedify 1.6.1-dev.856 → 1.6.1-dev.871
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actor-CM3gfkH6.js +36173 -0
- package/dist/{vocab/actor.js → actor-D7NMuy45.js} +5 -4
- package/dist/{vocab/actor.d.ts → actor-lFlm8FYo.d.ts} +2 -2
- package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert.js → assert-Dv75vaGI.js} +2 -1
- package/dist/assert_equals-ClvzlhZu.js +1020 -0
- package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_instance_of.js → assert_instance_of--9UCVKsi.js} +2 -1
- package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_is_error.js → assert_is_error-D162gXcM.js} +2 -2
- package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_not_equals.js → assert_not_equals-Cyf5m9Ke.js} +2 -2
- package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_rejects.js → assert_rejects-FOHCtlD2.js} +23 -3
- package/dist/{node_modules/.pnpm/@jsr_std__assert@0.226.0/node_modules/@jsr/std__assert/assert_throws.js → assert_throws-CRfQJvVx.js} +3 -2
- package/dist/{runtime/authdocloader.js → authdocloader-BKZDAq91.js} +5 -4
- package/dist/authdocloader-OfYZlI31.js +51 -0
- package/dist/{federation/builder.js → builder-DSTiU6ue.js} +18 -17
- package/dist/{_virtual/rolldown_runtime.js → chunk-HsBuZ-b2.js} +1 -0
- package/dist/client-Dw1pCSIt.d.ts +299 -0
- package/dist/{nodeinfo/client.js → client-RN5A1Qgw.js} +3 -2
- package/dist/{federation/collection.js → collection-QaGK9TVn.js} +1 -0
- package/dist/compat/mod.d.ts +12 -2
- package/dist/compat/mod.js +2 -1
- package/dist/compat/transformers.test.d.ts +2 -1
- package/dist/compat/transformers.test.js +32 -8
- package/dist/context-CzJXjNR8.d.ts +2034 -0
- package/dist/{testing/context.js → context-DZKXS0DV.js} +5 -4
- package/dist/{x/denokv.js → denokv-iB_ggPGm.js} +3 -1
- package/dist/{testing/docloader.js → docloader-09nVWLAZ.js} +1 -0
- package/dist/{runtime/contexts.js → docloader-BcMxZ9JH.js} +420 -1
- package/dist/docloader-DDFam5Xn.js +4594 -0
- package/dist/{runtime/docloader.d.ts → docloader-DTRsVZPo.d.ts} +1 -1
- package/dist/esm-BxIKwi-M.js +1221 -0
- package/dist/federation/builder.test.d.ts +2 -1
- package/dist/federation/builder.test.js +22 -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 +24 -4
- package/dist/federation/send.test.d.ts +2 -1
- package/dist/federation/send.test.js +25 -13
- package/dist/{federation/mq.js → federation-Bmj7soSg.js} +47 -1
- package/dist/{node_modules/.pnpm/@jsr_hongminhee__deno-mock-fetch@0.3.2/node_modules/@jsr/hongminhee__deno-mock-fetch/router.js → hongminhee__deno-mock-fetch-DJKLj_H-.js} +96 -1
- package/dist/{sig/http.js → http-BFvv3ZId.js} +5 -4
- package/dist/http-BImJcLfv.d.ts +258 -0
- package/dist/http-v1TqJ9Qa.js +720 -0
- package/dist/{federation/inbox.js → inbox-XV_W1qfB.js} +10 -4
- package/dist/key-BNM-ickE.js +16 -0
- package/dist/key-CVIQ7iUB.js +262 -0
- package/dist/{sig/key.js → key-DIk4Rloj.js} +2 -4
- package/dist/key-DiVhk5ik.js +10 -0
- package/dist/{federation/keycache.js → keycache-uTxsh7dt.js} +2 -1
- package/dist/{testing/keys.js → keys-D7lJqunm.js} +2 -2
- package/dist/{federation/kv.js → kv-DohFOP2C.js} +1 -0
- package/dist/{runtime/langstr.js → langstr-DbWheeIS.js} +1 -0
- package/dist/{sig/ld.js → ld-bOhcKpmk.js} +6 -6
- package/dist/{webfinger/lookup.js → lookup-B5KVF6HM.js} +1 -3
- package/dist/lookup-D3xTID-6.js +131 -0
- package/dist/{webfinger/jrd.d.ts → lookup-DAfStZtI.d.ts} +41 -1
- package/dist/{vocab/lookup.js → lookup-D_v0FFGL.js} +5 -5
- package/dist/middleware-BFedQWFA.js +33 -0
- package/dist/middleware-BiYIqI0b.js +3525 -0
- package/dist/{federation/middleware.js → middleware-CPAfRtS5.js} +957 -105
- package/dist/middleware-pAGwVkRf.js +17 -0
- package/dist/mod-1pDWKvUL.d.ts +2 -0
- package/dist/{runtime/key.d.ts → mod-BxwG4X3V.d.ts} +52 -7
- package/dist/{compat/transformers.d.ts → mod-CeLnlsqE.d.ts} +3 -4
- package/dist/{vocab/lookup.d.ts → mod-DysVoXOu.d.ts} +98 -3
- package/dist/mod-GIh5OYxW.d.ts +2 -0
- package/dist/{sig/ld.d.ts → mod-XT0mRthe.d.ts} +126 -4
- package/dist/mod-g0xFzAP9.d.ts +2 -0
- package/dist/mod.d.ts +18 -34
- package/dist/mod.js +17 -27
- package/dist/multibase-DeCHcK8L.js +316 -0
- package/dist/nodeinfo/client.test.d.ts +2 -1
- package/dist/nodeinfo/client.test.js +15 -4
- package/dist/nodeinfo/handler.test.d.ts +2 -1
- package/dist/nodeinfo/handler.test.js +39 -7
- package/dist/nodeinfo/mod.d.ts +4 -3
- package/dist/nodeinfo/mod.js +3 -3
- package/dist/nodeinfo/semver.test.d.ts +2 -1
- package/dist/nodeinfo/semver.test.js +11 -4
- package/dist/nodeinfo/types.test.d.ts +2 -1
- package/dist/nodeinfo/types.test.js +12 -4
- package/dist/{sig/owner.d.ts → owner-BjpObx-L.d.ts} +4 -6
- package/dist/{sig/owner.js → owner-tYPzPLFs.js} +4 -4
- package/dist/proof-D0cf4R25.js +595 -0
- package/dist/{sig/proof.js → proof-DIsZ1VTb.js} +5 -4
- package/dist/{federation/retry.js → retry-BiIhZWgD.js} +1 -0
- package/dist/{federation/router.js → router-D_aVZZUc.js} +20 -1
- package/dist/runtime/authdocloader.test.d.ts +2 -1
- package/dist/runtime/authdocloader.test.js +24 -9
- package/dist/runtime/docloader.test.d.ts +2 -1
- package/dist/runtime/docloader.test.js +15 -11
- package/dist/runtime/key.test.d.ts +2 -1
- package/dist/runtime/key.test.js +19 -4
- package/dist/runtime/langstr.test.d.ts +2 -1
- package/dist/runtime/langstr.test.js +11 -3
- package/dist/runtime/mod.d.ts +5 -4
- package/dist/runtime/mod.js +7 -4
- package/dist/runtime/multibase/multibase.test.d.ts +2 -1
- package/dist/runtime/multibase/multibase.test.js +11 -5
- package/dist/runtime/url.test.d.ts +2 -1
- package/dist/runtime/url.test.js +7 -6
- package/dist/{nodeinfo/semver.js → semver-CbbIgUsa.js} +1 -0
- package/dist/{federation/send.js → send-CFBOnY61.js} +3 -2
- package/dist/sig/http.test.d.ts +2 -1
- package/dist/sig/http.test.js +23 -12
- package/dist/sig/key.test.d.ts +2 -1
- package/dist/sig/key.test.js +21 -8
- package/dist/sig/ld.test.d.ts +2 -1
- package/dist/sig/ld.test.js +19 -11
- package/dist/sig/mod.d.ts +7 -5
- package/dist/sig/mod.js +7 -5
- package/dist/sig/owner.test.d.ts +2 -1
- package/dist/sig/owner.test.js +23 -9
- package/dist/sig/proof.test.d.ts +2 -1
- package/dist/sig/proof.test.js +22 -10
- package/dist/std__assert-CaBUULmX.js +151 -0
- package/dist/testing/docloader.test.d.ts +2 -1
- package/dist/testing/docloader.test.js +11 -3
- package/dist/testing/mod.d.ts +1 -0
- package/dist/testing/mod.js +2 -136
- package/dist/testing-jcGLO9Lp.js +143 -0
- package/dist/{compat/transformers.js → transformers-jxj-4o2K.js} +1 -1
- package/dist/{vocab/type.js → type-D2s5lmbZ.js} +1 -0
- package/dist/{nodeinfo/types.js → types-CqoqWDkp.js} +2 -1
- package/dist/types-D4p7qK8A.js +457 -0
- package/dist/{runtime/url.js → url-kTAI6_KP.js} +1 -0
- package/dist/vocab/actor.test.d.ts +2 -1
- package/dist/vocab/actor.test.js +5853 -14
- package/dist/vocab/lookup.test.d.ts +2 -1
- package/dist/vocab/lookup.test.js +20 -7
- package/dist/vocab/mod.d.ts +5 -5
- package/dist/vocab/mod.js +4 -5
- package/dist/vocab/type.test.d.ts +2 -1
- package/dist/vocab/type.test.js +9 -4
- package/dist/vocab/vocab.test.d.ts +2 -1
- package/dist/vocab/vocab.test.js +2440 -15
- package/dist/vocab-BSNlVPPE.js +172 -0
- package/dist/{vocab/vocab.js → vocab-BxrrllKY.js} +331 -182
- package/dist/{vocab/vocab.d.ts → vocab-CLWdoo7y.d.ts} +21 -9
- package/dist/webfinger/handler.test.d.ts +2 -1
- package/dist/webfinger/handler.test.js +39 -7
- package/dist/webfinger/lookup.test.d.ts +2 -1
- package/dist/webfinger/lookup.test.js +14 -4
- package/dist/webfinger/mod.d.ts +4 -2
- package/dist/webfinger/mod.js +3 -1
- package/dist/x/cfworkers.d.ts +49 -0
- package/dist/x/cfworkers.js +73 -0
- package/dist/x/cfworkers.test.d.ts +3 -0
- package/dist/x/cfworkers.test.js +153 -0
- package/dist/x/hono.d.ts +11 -2
- package/dist/x/sveltekit.d.ts +11 -2
- package/package.json +6 -1
- package/dist/codegen/fs.js +0 -23
- package/dist/codegen/schema.js +0 -88
- package/dist/codegen/type.js +0 -392
- package/dist/compat/types.d.ts +0 -18
- package/dist/deno.js +0 -137
- package/dist/federation/builder.d.ts +0 -19
- package/dist/federation/callback.d.ts +0 -211
- package/dist/federation/collection.d.ts +0 -36
- package/dist/federation/context.d.ts +0 -757
- package/dist/federation/federation.d.ts +0 -689
- package/dist/federation/handler.d.ts +0 -44
- package/dist/federation/handler.js +0 -543
- package/dist/federation/middleware.d.ts +0 -101
- package/dist/federation/negotiation.js +0 -63
- package/dist/federation/retry.d.ts +0 -71
- package/dist/federation/router.d.ts +0 -91
- 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,1020 @@
|
|
1
|
+
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
4
|
+
globalThis.addEventListener = () => {};
|
5
|
+
|
6
|
+
//#region node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assertion_error.js
|
7
|
+
/**
|
8
|
+
* Error thrown when an assertion fails.
|
9
|
+
*
|
10
|
+
* @example Usage
|
11
|
+
* ```ts no-eval
|
12
|
+
* import { AssertionError } from "@std/assert/assertion-error";
|
13
|
+
*
|
14
|
+
* throw new AssertionError("Assertion failed");
|
15
|
+
* ```
|
16
|
+
*/ var AssertionError = class extends Error {
|
17
|
+
/** Constructs a new instance.
|
18
|
+
*
|
19
|
+
* @example Usage
|
20
|
+
* ```ts no-eval
|
21
|
+
* import { AssertionError } from "@std/assert/assertion-error";
|
22
|
+
*
|
23
|
+
* throw new AssertionError("Assertion failed");
|
24
|
+
* ```
|
25
|
+
*
|
26
|
+
* @param message The error message.
|
27
|
+
*/ constructor(message) {
|
28
|
+
super(message);
|
29
|
+
this.name = "AssertionError";
|
30
|
+
}
|
31
|
+
};
|
32
|
+
|
33
|
+
//#endregion
|
34
|
+
//#region node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/equal.js
|
35
|
+
function isKeyedCollection(x) {
|
36
|
+
return [Symbol.iterator, "size"].every((k) => k in x);
|
37
|
+
}
|
38
|
+
function constructorsEqual(a, b) {
|
39
|
+
return a.constructor === b.constructor || a.constructor === Object && !b.constructor || !a.constructor && b.constructor === Object;
|
40
|
+
}
|
41
|
+
/**
|
42
|
+
* Deep equality comparison used in assertions
|
43
|
+
*
|
44
|
+
* @param c The actual value
|
45
|
+
* @param d The expected value
|
46
|
+
* @returns `true` if the values are deeply equal, `false` otherwise
|
47
|
+
*
|
48
|
+
* @example Usage
|
49
|
+
* ```ts
|
50
|
+
* import { equal } from "@std/assert/equal";
|
51
|
+
*
|
52
|
+
* equal({ foo: "bar" }, { foo: "bar" }); // Returns `true`
|
53
|
+
* equal({ foo: "bar" }, { foo: "baz" }); // Returns `false
|
54
|
+
* ```
|
55
|
+
*/ function equal(c, d) {
|
56
|
+
const seen = new Map();
|
57
|
+
return function compare(a, b) {
|
58
|
+
if (a && b && (a instanceof RegExp && b instanceof RegExp || a instanceof URL && b instanceof URL)) return String(a) === String(b);
|
59
|
+
if (a instanceof Date && b instanceof Date) {
|
60
|
+
const aTime = a.getTime();
|
61
|
+
const bTime = b.getTime();
|
62
|
+
if (Number.isNaN(aTime) && Number.isNaN(bTime)) return true;
|
63
|
+
return aTime === bTime;
|
64
|
+
}
|
65
|
+
if (typeof a === "number" && typeof b === "number") return Number.isNaN(a) && Number.isNaN(b) || a === b;
|
66
|
+
if (Object.is(a, b)) return true;
|
67
|
+
if (a && typeof a === "object" && b && typeof b === "object") {
|
68
|
+
if (a && b && !constructorsEqual(a, b)) return false;
|
69
|
+
if (a instanceof WeakMap || b instanceof WeakMap) {
|
70
|
+
if (!(a instanceof WeakMap && b instanceof WeakMap)) return false;
|
71
|
+
throw new TypeError("cannot compare WeakMap instances");
|
72
|
+
}
|
73
|
+
if (a instanceof WeakSet || b instanceof WeakSet) {
|
74
|
+
if (!(a instanceof WeakSet && b instanceof WeakSet)) return false;
|
75
|
+
throw new TypeError("cannot compare WeakSet instances");
|
76
|
+
}
|
77
|
+
if (a instanceof WeakRef || b instanceof WeakRef) {
|
78
|
+
if (!(a instanceof WeakRef && b instanceof WeakRef)) return false;
|
79
|
+
return compare(a.deref(), b.deref());
|
80
|
+
}
|
81
|
+
if (seen.get(a) === b) return true;
|
82
|
+
if (Object.keys(a).length !== Object.keys(b).length) return false;
|
83
|
+
seen.set(a, b);
|
84
|
+
if (isKeyedCollection(a) && isKeyedCollection(b)) {
|
85
|
+
if (a.size !== b.size) return false;
|
86
|
+
let unmatchedEntries = a.size;
|
87
|
+
for (const [aKey, aValue] of a.entries()) for (const [bKey, bValue] of b.entries()) if (aKey === aValue && bKey === bValue && compare(aKey, bKey) || compare(aKey, bKey) && compare(aValue, bValue)) {
|
88
|
+
unmatchedEntries--;
|
89
|
+
break;
|
90
|
+
}
|
91
|
+
return unmatchedEntries === 0;
|
92
|
+
}
|
93
|
+
const merged = {
|
94
|
+
...a,
|
95
|
+
...b
|
96
|
+
};
|
97
|
+
for (const key of [...Object.getOwnPropertyNames(merged), ...Object.getOwnPropertySymbols(merged)]) {
|
98
|
+
if (!compare(a && a[key], b && b[key])) return false;
|
99
|
+
if (key in a && !(key in b) || key in b && !(key in a)) return false;
|
100
|
+
}
|
101
|
+
return true;
|
102
|
+
}
|
103
|
+
return false;
|
104
|
+
}(c, d);
|
105
|
+
}
|
106
|
+
|
107
|
+
//#endregion
|
108
|
+
//#region node_modules/.pnpm/@jsr+std__internal@1.0.7/node_modules/@jsr/std__internal/assertion_state.js
|
109
|
+
/**
|
110
|
+
* Check the test suite internal state
|
111
|
+
*
|
112
|
+
* @example Usage
|
113
|
+
* ```ts ignore
|
114
|
+
* import { AssertionState } from "@std/internal";
|
115
|
+
*
|
116
|
+
* const assertionState = new AssertionState();
|
117
|
+
* ```
|
118
|
+
*/ var AssertionState = class {
|
119
|
+
#state;
|
120
|
+
constructor() {
|
121
|
+
this.#state = {
|
122
|
+
assertionCount: void 0,
|
123
|
+
assertionCheck: false,
|
124
|
+
assertionTriggered: false,
|
125
|
+
assertionTriggeredCount: 0
|
126
|
+
};
|
127
|
+
globalThis.addEventListener("unload", () => {
|
128
|
+
if (this.#state.assertionCheck || this.#state.assertionCount !== void 0) throw new Error("AssertionCounter was not cleaned up: If tests are not otherwise failing, ensure `expect.hasAssertion` and `expect.assertions` are only run in bdd tests");
|
129
|
+
});
|
130
|
+
}
|
131
|
+
/**
|
132
|
+
* Get the number that through `expect.assertions` api set.
|
133
|
+
*
|
134
|
+
* @returns the number that through `expect.assertions` api set.
|
135
|
+
*
|
136
|
+
* @example Usage
|
137
|
+
* ```ts ignore
|
138
|
+
* import { AssertionState } from "@std/internal";
|
139
|
+
*
|
140
|
+
* const assertionState = new AssertionState();
|
141
|
+
* assertionState.assertionCount;
|
142
|
+
* ```
|
143
|
+
*/ get assertionCount() {
|
144
|
+
return this.#state.assertionCount;
|
145
|
+
}
|
146
|
+
/**
|
147
|
+
* Get a certain number that assertions were called before.
|
148
|
+
*
|
149
|
+
* @returns return a certain number that assertions were called before.
|
150
|
+
*
|
151
|
+
* @example Usage
|
152
|
+
* ```ts ignore
|
153
|
+
* import { AssertionState } from "@std/internal";
|
154
|
+
*
|
155
|
+
* const assertionState = new AssertionState();
|
156
|
+
* assertionState.assertionTriggeredCount;
|
157
|
+
* ```
|
158
|
+
*/ get assertionTriggeredCount() {
|
159
|
+
return this.#state.assertionTriggeredCount;
|
160
|
+
}
|
161
|
+
/**
|
162
|
+
* If `expect.hasAssertions` called, then through this method to update #state.assertionCheck value.
|
163
|
+
*
|
164
|
+
* @param val Set #state.assertionCheck's value
|
165
|
+
*
|
166
|
+
* @example Usage
|
167
|
+
* ```ts ignore
|
168
|
+
* import { AssertionState } from "@std/internal";
|
169
|
+
*
|
170
|
+
* const assertionState = new AssertionState();
|
171
|
+
* assertionState.setAssertionCheck(true);
|
172
|
+
* ```
|
173
|
+
*/ setAssertionCheck(val) {
|
174
|
+
this.#state.assertionCheck = val;
|
175
|
+
}
|
176
|
+
/**
|
177
|
+
* If any matchers was called, `#state.assertionTriggered` will be set through this method.
|
178
|
+
*
|
179
|
+
* @param val Set #state.assertionTriggered's value
|
180
|
+
*
|
181
|
+
* @example Usage
|
182
|
+
* ```ts ignore
|
183
|
+
* import { AssertionState } from "@std/internal";
|
184
|
+
*
|
185
|
+
* const assertionState = new AssertionState();
|
186
|
+
* assertionState.setAssertionTriggered(true);
|
187
|
+
* ```
|
188
|
+
*/ setAssertionTriggered(val) {
|
189
|
+
this.#state.assertionTriggered = val;
|
190
|
+
}
|
191
|
+
/**
|
192
|
+
* If `expect.assertions` called, then through this method to update #state.assertionCheck value.
|
193
|
+
*
|
194
|
+
* @param num Set #state.assertionCount's value, for example if the value is set 2, that means
|
195
|
+
* you must have two assertion matchers call in your test suite.
|
196
|
+
*
|
197
|
+
* @example Usage
|
198
|
+
* ```ts ignore
|
199
|
+
* import { AssertionState } from "@std/internal";
|
200
|
+
*
|
201
|
+
* const assertionState = new AssertionState();
|
202
|
+
* assertionState.setAssertionCount(2);
|
203
|
+
* ```
|
204
|
+
*/ setAssertionCount(num) {
|
205
|
+
this.#state.assertionCount = num;
|
206
|
+
}
|
207
|
+
/**
|
208
|
+
* If any matchers was called, `#state.assertionTriggeredCount` value will plus one internally.
|
209
|
+
*
|
210
|
+
* @example Usage
|
211
|
+
* ```ts ignore
|
212
|
+
* import { AssertionState } from "@std/internal";
|
213
|
+
*
|
214
|
+
* const assertionState = new AssertionState();
|
215
|
+
* assertionState.updateAssertionTriggerCount();
|
216
|
+
* ```
|
217
|
+
*/ updateAssertionTriggerCount() {
|
218
|
+
if (this.#state.assertionCount !== void 0) this.#state.assertionTriggeredCount += 1;
|
219
|
+
}
|
220
|
+
/**
|
221
|
+
* Check Assertion internal state, if `#state.assertionCheck` is set true, but
|
222
|
+
* `#state.assertionTriggered` is still false, then should throw an Assertion Error.
|
223
|
+
*
|
224
|
+
* @returns a boolean value, that the test suite is satisfied with the check. If not,
|
225
|
+
* it should throw an AssertionError.
|
226
|
+
*
|
227
|
+
* @example Usage
|
228
|
+
* ```ts ignore
|
229
|
+
* import { AssertionState } from "@std/internal";
|
230
|
+
*
|
231
|
+
* const assertionState = new AssertionState();
|
232
|
+
* if (assertionState.checkAssertionErrorState()) {
|
233
|
+
* // throw AssertionError("");
|
234
|
+
* }
|
235
|
+
* ```
|
236
|
+
*/ checkAssertionErrorState() {
|
237
|
+
return this.#state.assertionCheck && !this.#state.assertionTriggered;
|
238
|
+
}
|
239
|
+
/**
|
240
|
+
* Reset all assertion state when every test suite function ran completely.
|
241
|
+
*
|
242
|
+
* @example Usage
|
243
|
+
* ```ts ignore
|
244
|
+
* import { AssertionState } from "@std/internal";
|
245
|
+
*
|
246
|
+
* const assertionState = new AssertionState();
|
247
|
+
* assertionState.resetAssertionState();
|
248
|
+
* ```
|
249
|
+
*/ resetAssertionState() {
|
250
|
+
this.#state = {
|
251
|
+
assertionCount: void 0,
|
252
|
+
assertionCheck: false,
|
253
|
+
assertionTriggered: false,
|
254
|
+
assertionTriggeredCount: 0
|
255
|
+
};
|
256
|
+
}
|
257
|
+
/**
|
258
|
+
* Check Assertion called state, if `#state.assertionCount` is set to a number value, but
|
259
|
+
* `#state.assertionTriggeredCount` is less then it, then should throw an assertion error.
|
260
|
+
*
|
261
|
+
* @returns a boolean value, that the test suite is satisfied with the check. If not,
|
262
|
+
* it should throw an AssertionError.
|
263
|
+
*
|
264
|
+
* @example Usage
|
265
|
+
* ```ts ignore
|
266
|
+
* import { AssertionState } from "@std/internal";
|
267
|
+
*
|
268
|
+
* const assertionState = new AssertionState();
|
269
|
+
* if (assertionState.checkAssertionCountSatisfied()) {
|
270
|
+
* // throw AssertionError("");
|
271
|
+
* }
|
272
|
+
* ```
|
273
|
+
*/ checkAssertionCountSatisfied() {
|
274
|
+
return this.#state.assertionCount !== void 0 && this.#state.assertionCount !== this.#state.assertionTriggeredCount;
|
275
|
+
}
|
276
|
+
};
|
277
|
+
const assertionState = new AssertionState();
|
278
|
+
|
279
|
+
//#endregion
|
280
|
+
//#region node_modules/.pnpm/@jsr+std__internal@1.0.7/node_modules/@jsr/std__internal/styles.js
|
281
|
+
const { Deno } = globalThis;
|
282
|
+
const noColor = typeof Deno?.noColor === "boolean" ? Deno.noColor : false;
|
283
|
+
const enabled = !noColor;
|
284
|
+
function code(open, close) {
|
285
|
+
return {
|
286
|
+
open: `\x1b[${open.join(";")}m`,
|
287
|
+
close: `\x1b[${close}m`,
|
288
|
+
regexp: new RegExp(`\\x1b\\[${close}m`, "g")
|
289
|
+
};
|
290
|
+
}
|
291
|
+
function run(str, code$1) {
|
292
|
+
return enabled ? `${code$1.open}${str.replace(code$1.regexp, code$1.open)}${code$1.close}` : str;
|
293
|
+
}
|
294
|
+
/**
|
295
|
+
* Sets the style of text to be printed to bold.
|
296
|
+
*
|
297
|
+
* Disable by setting the `NO_COLOR` environmental variable.
|
298
|
+
*
|
299
|
+
* @param str Text to make bold
|
300
|
+
*
|
301
|
+
* @returns Bold text for printing
|
302
|
+
*
|
303
|
+
* @example Usage
|
304
|
+
* ```ts no-assert
|
305
|
+
* import { bold } from "@std/internal/styles";
|
306
|
+
*
|
307
|
+
* console.log(bold("Hello, world!")); // Prints "Hello, world!" in bold
|
308
|
+
* ```
|
309
|
+
*/ function bold(str) {
|
310
|
+
return run(str, code([1], 22));
|
311
|
+
}
|
312
|
+
/**
|
313
|
+
* Sets the color of text to be printed to red.
|
314
|
+
*
|
315
|
+
* Disable by setting the `NO_COLOR` environmental variable.
|
316
|
+
*
|
317
|
+
* @param str Text to make red
|
318
|
+
*
|
319
|
+
* @returns Red text for printing
|
320
|
+
*
|
321
|
+
* @example Usage
|
322
|
+
* ```ts no-assert
|
323
|
+
* import { red } from "@std/internal/styles";
|
324
|
+
*
|
325
|
+
* console.log(red("Hello, world!")); // Prints "Hello, world!" in red
|
326
|
+
* ```
|
327
|
+
*/ function red(str) {
|
328
|
+
return run(str, code([31], 39));
|
329
|
+
}
|
330
|
+
/**
|
331
|
+
* Sets the color of text to be printed to green.
|
332
|
+
*
|
333
|
+
* Disable by setting the `NO_COLOR` environmental variable.
|
334
|
+
*
|
335
|
+
* @param str Text to make green
|
336
|
+
*
|
337
|
+
* @returns Green text for print
|
338
|
+
*
|
339
|
+
* @example Usage
|
340
|
+
* ```ts no-assert
|
341
|
+
* import { green } from "@std/internal/styles";
|
342
|
+
*
|
343
|
+
* console.log(green("Hello, world!")); // Prints "Hello, world!" in green
|
344
|
+
* ```
|
345
|
+
*/ function green(str) {
|
346
|
+
return run(str, code([32], 39));
|
347
|
+
}
|
348
|
+
/**
|
349
|
+
* Sets the color of text to be printed to white.
|
350
|
+
*
|
351
|
+
* @param str Text to make white
|
352
|
+
*
|
353
|
+
* @returns White text for print
|
354
|
+
*
|
355
|
+
* @example Usage
|
356
|
+
* ```ts no-assert
|
357
|
+
* import { white } from "@std/internal/styles";
|
358
|
+
*
|
359
|
+
* console.log(white("Hello, world!")); // Prints "Hello, world!" in white
|
360
|
+
* ```
|
361
|
+
*/ function white(str) {
|
362
|
+
return run(str, code([37], 39));
|
363
|
+
}
|
364
|
+
/**
|
365
|
+
* Sets the color of text to be printed to gray.
|
366
|
+
*
|
367
|
+
* @param str Text to make gray
|
368
|
+
*
|
369
|
+
* @returns Gray text for print
|
370
|
+
*
|
371
|
+
* @example Usage
|
372
|
+
* ```ts no-assert
|
373
|
+
* import { gray } from "@std/internal/styles";
|
374
|
+
*
|
375
|
+
* console.log(gray("Hello, world!")); // Prints "Hello, world!" in gray
|
376
|
+
* ```
|
377
|
+
*/ function gray(str) {
|
378
|
+
return brightBlack(str);
|
379
|
+
}
|
380
|
+
/**
|
381
|
+
* Sets the color of text to be printed to bright-black.
|
382
|
+
*
|
383
|
+
* @param str Text to make bright-black
|
384
|
+
*
|
385
|
+
* @returns Bright-black text for print
|
386
|
+
*
|
387
|
+
* @example Usage
|
388
|
+
* ```ts no-assert
|
389
|
+
* import { brightBlack } from "@std/internal/styles";
|
390
|
+
*
|
391
|
+
* console.log(brightBlack("Hello, world!")); // Prints "Hello, world!" in bright-black
|
392
|
+
* ```
|
393
|
+
*/ function brightBlack(str) {
|
394
|
+
return run(str, code([90], 39));
|
395
|
+
}
|
396
|
+
/**
|
397
|
+
* Sets the background color of text to be printed to red.
|
398
|
+
*
|
399
|
+
* @param str Text to make its background red
|
400
|
+
*
|
401
|
+
* @returns Red background text for print
|
402
|
+
*
|
403
|
+
* @example Usage
|
404
|
+
* ```ts no-assert
|
405
|
+
* import { bgRed } from "@std/internal/styles";
|
406
|
+
*
|
407
|
+
* console.log(bgRed("Hello, world!")); // Prints "Hello, world!" with red background
|
408
|
+
* ```
|
409
|
+
*/ function bgRed(str) {
|
410
|
+
return run(str, code([41], 49));
|
411
|
+
}
|
412
|
+
/**
|
413
|
+
* Sets the background color of text to be printed to green.
|
414
|
+
*
|
415
|
+
* @param str Text to make its background green
|
416
|
+
*
|
417
|
+
* @returns Green background text for print
|
418
|
+
*
|
419
|
+
* @example Usage
|
420
|
+
* ```ts no-assert
|
421
|
+
* import { bgGreen } from "@std/internal/styles";
|
422
|
+
*
|
423
|
+
* console.log(bgGreen("Hello, world!")); // Prints "Hello, world!" with green background
|
424
|
+
* ```
|
425
|
+
*/ function bgGreen(str) {
|
426
|
+
return run(str, code([42], 49));
|
427
|
+
}
|
428
|
+
const ANSI_PATTERN = new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)", "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TXZcf-nq-uy=><~]))"].join("|"), "g");
|
429
|
+
/**
|
430
|
+
* Remove ANSI escape codes from the string.
|
431
|
+
*
|
432
|
+
* @param string Text to remove ANSI escape codes from
|
433
|
+
*
|
434
|
+
* @returns Text without ANSI escape codes
|
435
|
+
*
|
436
|
+
* @example Usage
|
437
|
+
* ```ts no-assert
|
438
|
+
* import { red, stripAnsiCode } from "@std/internal/styles";
|
439
|
+
*
|
440
|
+
* console.log(stripAnsiCode(red("Hello, world!"))); // Prints "Hello, world!"
|
441
|
+
* ```
|
442
|
+
*/ function stripAnsiCode(string) {
|
443
|
+
return string.replace(ANSI_PATTERN, "");
|
444
|
+
}
|
445
|
+
|
446
|
+
//#endregion
|
447
|
+
//#region node_modules/.pnpm/@jsr+std__internal@1.0.7/node_modules/@jsr/std__internal/build_message.js
|
448
|
+
/**
|
449
|
+
* Colors the output of assertion diffs.
|
450
|
+
*
|
451
|
+
* @param diffType Difference type, either added or removed.
|
452
|
+
* @param background If true, colors the background instead of the text.
|
453
|
+
*
|
454
|
+
* @returns A function that colors the input string.
|
455
|
+
*
|
456
|
+
* @example Usage
|
457
|
+
* ```ts
|
458
|
+
* import { createColor } from "@std/internal";
|
459
|
+
* import { assertEquals } from "@std/assert";
|
460
|
+
* import { bold, green, red, white } from "@std/fmt/colors";
|
461
|
+
*
|
462
|
+
* assertEquals(createColor("added")("foo"), green(bold("foo")));
|
463
|
+
* assertEquals(createColor("removed")("foo"), red(bold("foo")));
|
464
|
+
* assertEquals(createColor("common")("foo"), white("foo"));
|
465
|
+
* ```
|
466
|
+
*/ function createColor(diffType, background = false) {
|
467
|
+
switch (diffType) {
|
468
|
+
case "added": return (s) => background ? bgGreen(white(s)) : green(bold(s));
|
469
|
+
case "removed": return (s) => background ? bgRed(white(s)) : red(bold(s));
|
470
|
+
default: return white;
|
471
|
+
}
|
472
|
+
}
|
473
|
+
/**
|
474
|
+
* Prefixes `+` or `-` in diff output.
|
475
|
+
*
|
476
|
+
* @param diffType Difference type, either added or removed
|
477
|
+
*
|
478
|
+
* @returns A string representing the sign.
|
479
|
+
*
|
480
|
+
* @example Usage
|
481
|
+
* ```ts
|
482
|
+
* import { createSign } from "@std/internal";
|
483
|
+
* import { assertEquals } from "@std/assert";
|
484
|
+
*
|
485
|
+
* assertEquals(createSign("added"), "+ ");
|
486
|
+
* assertEquals(createSign("removed"), "- ");
|
487
|
+
* assertEquals(createSign("common"), " ");
|
488
|
+
* ```
|
489
|
+
*/ function createSign(diffType) {
|
490
|
+
switch (diffType) {
|
491
|
+
case "added": return "+ ";
|
492
|
+
case "removed": return "- ";
|
493
|
+
default: return " ";
|
494
|
+
}
|
495
|
+
}
|
496
|
+
/**
|
497
|
+
* Builds a message based on the provided diff result.
|
498
|
+
*
|
499
|
+
* @param diffResult The diff result array.
|
500
|
+
* @param options Optional parameters for customizing the message.
|
501
|
+
*
|
502
|
+
* @returns An array of strings representing the built message.
|
503
|
+
*
|
504
|
+
* @example Usage
|
505
|
+
* ```ts no-assert
|
506
|
+
* import { diffStr, buildMessage } from "@std/internal";
|
507
|
+
*
|
508
|
+
* const diffResult = diffStr("Hello, world!", "Hello, world");
|
509
|
+
*
|
510
|
+
* console.log(buildMessage(diffResult));
|
511
|
+
* // [
|
512
|
+
* // "",
|
513
|
+
* // "",
|
514
|
+
* // " [Diff] Actual / Expected",
|
515
|
+
* // "",
|
516
|
+
* // "",
|
517
|
+
* // "- Hello, world!",
|
518
|
+
* // "+ Hello, world",
|
519
|
+
* // "",
|
520
|
+
* // ]
|
521
|
+
* ```
|
522
|
+
*/ function buildMessage(diffResult, options = {}) {
|
523
|
+
const { stringDiff = false } = options;
|
524
|
+
const messages = [
|
525
|
+
"",
|
526
|
+
"",
|
527
|
+
` ${gray(bold("[Diff]"))} ${red(bold("Actual"))} / ${green(bold("Expected"))}`,
|
528
|
+
"",
|
529
|
+
""
|
530
|
+
];
|
531
|
+
const diffMessages = diffResult.map((result) => {
|
532
|
+
const color = createColor(result.type);
|
533
|
+
const line = result.details?.map((detail) => detail.type !== "common" ? createColor(detail.type, true)(detail.value) : detail.value).join("") ?? result.value;
|
534
|
+
return color(`${createSign(result.type)}${line}`);
|
535
|
+
});
|
536
|
+
messages.push(...stringDiff ? [diffMessages.join("")] : diffMessages, "");
|
537
|
+
return messages;
|
538
|
+
}
|
539
|
+
|
540
|
+
//#endregion
|
541
|
+
//#region node_modules/.pnpm/@jsr+std__internal@1.0.7/node_modules/@jsr/std__internal/diff.js
|
542
|
+
const REMOVED = 1;
|
543
|
+
const COMMON = 2;
|
544
|
+
const ADDED = 3;
|
545
|
+
/**
|
546
|
+
* Creates an array of common elements between two arrays.
|
547
|
+
*
|
548
|
+
* @typeParam T The type of elements in the arrays.
|
549
|
+
*
|
550
|
+
* @param A The first array.
|
551
|
+
* @param B The second array.
|
552
|
+
*
|
553
|
+
* @returns An array containing the common elements between the two arrays.
|
554
|
+
*
|
555
|
+
* @example Usage
|
556
|
+
* ```ts
|
557
|
+
* import { createCommon } from "@std/internal/diff";
|
558
|
+
* import { assertEquals } from "@std/assert";
|
559
|
+
*
|
560
|
+
* const a = [1, 2, 3];
|
561
|
+
* const b = [1, 2, 4];
|
562
|
+
*
|
563
|
+
* assertEquals(createCommon(a, b), [1, 2]);
|
564
|
+
* ```
|
565
|
+
*/ function createCommon(A, B) {
|
566
|
+
const common = [];
|
567
|
+
if (A.length === 0 || B.length === 0) return [];
|
568
|
+
for (let i = 0; i < Math.min(A.length, B.length); i += 1) {
|
569
|
+
const a = A[i];
|
570
|
+
const b = B[i];
|
571
|
+
if (a !== void 0 && a === b) common.push(a);
|
572
|
+
else return common;
|
573
|
+
}
|
574
|
+
return common;
|
575
|
+
}
|
576
|
+
/**
|
577
|
+
* Asserts that the value is a {@linkcode FarthestPoint}.
|
578
|
+
* If not, an error is thrown.
|
579
|
+
*
|
580
|
+
* @param value The value to check.
|
581
|
+
*
|
582
|
+
* @returns A void value that returns once the assertion completes.
|
583
|
+
*
|
584
|
+
* @example Usage
|
585
|
+
* ```ts
|
586
|
+
* import { assertFp } from "@std/internal/diff";
|
587
|
+
* import { assertThrows } from "@std/assert";
|
588
|
+
*
|
589
|
+
* assertFp({ y: 0, id: 0 });
|
590
|
+
* assertThrows(() => assertFp({ id: 0 }));
|
591
|
+
* assertThrows(() => assertFp({ y: 0 }));
|
592
|
+
* assertThrows(() => assertFp(undefined));
|
593
|
+
* ```
|
594
|
+
*/ function assertFp(value) {
|
595
|
+
if (value == null || typeof value !== "object" || typeof value?.y !== "number" || typeof value?.id !== "number") throw new Error(`Unexpected value, expected 'FarthestPoint': received ${typeof value}`);
|
596
|
+
}
|
597
|
+
/**
|
598
|
+
* Creates an array of backtraced differences.
|
599
|
+
*
|
600
|
+
* @typeParam T The type of elements in the arrays.
|
601
|
+
*
|
602
|
+
* @param A The first array.
|
603
|
+
* @param B The second array.
|
604
|
+
* @param current The current {@linkcode FarthestPoint}.
|
605
|
+
* @param swapped Boolean indicating if the arrays are swapped.
|
606
|
+
* @param routes The routes array.
|
607
|
+
* @param diffTypesPtrOffset The offset of the diff types in the routes array.
|
608
|
+
*
|
609
|
+
* @returns An array of backtraced differences.
|
610
|
+
*
|
611
|
+
* @example Usage
|
612
|
+
* ```ts
|
613
|
+
* import { backTrace } from "@std/internal/diff";
|
614
|
+
* import { assertEquals } from "@std/assert";
|
615
|
+
*
|
616
|
+
* assertEquals(
|
617
|
+
* backTrace([], [], { y: 0, id: 0 }, false, new Uint32Array(0), 0),
|
618
|
+
* [],
|
619
|
+
* );
|
620
|
+
* ```
|
621
|
+
*/ function backTrace(A, B, current, swapped, routes, diffTypesPtrOffset) {
|
622
|
+
const M = A.length;
|
623
|
+
const N = B.length;
|
624
|
+
const result = [];
|
625
|
+
let a = M - 1;
|
626
|
+
let b = N - 1;
|
627
|
+
let j = routes[current.id];
|
628
|
+
let type = routes[current.id + diffTypesPtrOffset];
|
629
|
+
while (true) {
|
630
|
+
if (!j && !type) break;
|
631
|
+
const prev = j;
|
632
|
+
if (type === REMOVED) {
|
633
|
+
result.unshift({
|
634
|
+
type: swapped ? "removed" : "added",
|
635
|
+
value: B[b]
|
636
|
+
});
|
637
|
+
b -= 1;
|
638
|
+
} else if (type === ADDED) {
|
639
|
+
result.unshift({
|
640
|
+
type: swapped ? "added" : "removed",
|
641
|
+
value: A[a]
|
642
|
+
});
|
643
|
+
a -= 1;
|
644
|
+
} else {
|
645
|
+
result.unshift({
|
646
|
+
type: "common",
|
647
|
+
value: A[a]
|
648
|
+
});
|
649
|
+
a -= 1;
|
650
|
+
b -= 1;
|
651
|
+
}
|
652
|
+
j = routes[prev];
|
653
|
+
type = routes[prev + diffTypesPtrOffset];
|
654
|
+
}
|
655
|
+
return result;
|
656
|
+
}
|
657
|
+
/**
|
658
|
+
* Creates a {@linkcode FarthestPoint}.
|
659
|
+
*
|
660
|
+
* @param k The current index.
|
661
|
+
* @param M The length of the first array.
|
662
|
+
* @param routes The routes array.
|
663
|
+
* @param diffTypesPtrOffset The offset of the diff types in the routes array.
|
664
|
+
* @param ptr The current pointer.
|
665
|
+
* @param slide The slide {@linkcode FarthestPoint}.
|
666
|
+
* @param down The down {@linkcode FarthestPoint}.
|
667
|
+
*
|
668
|
+
* @returns A {@linkcode FarthestPoint}.
|
669
|
+
*
|
670
|
+
* @example Usage
|
671
|
+
* ```ts
|
672
|
+
* import { createFp } from "@std/internal/diff";
|
673
|
+
* import { assertEquals } from "@std/assert";
|
674
|
+
*
|
675
|
+
* assertEquals(
|
676
|
+
* createFp(
|
677
|
+
* 0,
|
678
|
+
* 0,
|
679
|
+
* new Uint32Array(0),
|
680
|
+
* 0,
|
681
|
+
* 0,
|
682
|
+
* { y: -1, id: 0 },
|
683
|
+
* { y: 0, id: 0 },
|
684
|
+
* ),
|
685
|
+
* { y: -1, id: 1 },
|
686
|
+
* );
|
687
|
+
* ```
|
688
|
+
*/ function createFp(k, M, routes, diffTypesPtrOffset, ptr, slide, down) {
|
689
|
+
if (slide && slide.y === -1 && down && down.y === -1) return {
|
690
|
+
y: 0,
|
691
|
+
id: 0
|
692
|
+
};
|
693
|
+
const isAdding = down?.y === -1 || k === M || (slide?.y ?? 0) > (down?.y ?? 0) + 1;
|
694
|
+
if (slide && isAdding) {
|
695
|
+
const prev = slide.id;
|
696
|
+
ptr++;
|
697
|
+
routes[ptr] = prev;
|
698
|
+
routes[ptr + diffTypesPtrOffset] = ADDED;
|
699
|
+
return {
|
700
|
+
y: slide.y,
|
701
|
+
id: ptr
|
702
|
+
};
|
703
|
+
}
|
704
|
+
if (down && !isAdding) {
|
705
|
+
const prev = down.id;
|
706
|
+
ptr++;
|
707
|
+
routes[ptr] = prev;
|
708
|
+
routes[ptr + diffTypesPtrOffset] = REMOVED;
|
709
|
+
return {
|
710
|
+
y: down.y + 1,
|
711
|
+
id: ptr
|
712
|
+
};
|
713
|
+
}
|
714
|
+
throw new Error("Unexpected missing FarthestPoint");
|
715
|
+
}
|
716
|
+
/**
|
717
|
+
* Renders the differences between the actual and expected values.
|
718
|
+
*
|
719
|
+
* @typeParam T The type of elements in the arrays.
|
720
|
+
*
|
721
|
+
* @param A Actual value
|
722
|
+
* @param B Expected value
|
723
|
+
*
|
724
|
+
* @returns An array of differences between the actual and expected values.
|
725
|
+
*
|
726
|
+
* @example Usage
|
727
|
+
* ```ts
|
728
|
+
* import { diff } from "@std/internal/diff";
|
729
|
+
* import { assertEquals } from "@std/assert";
|
730
|
+
*
|
731
|
+
* const a = [1, 2, 3];
|
732
|
+
* const b = [1, 2, 4];
|
733
|
+
*
|
734
|
+
* assertEquals(diff(a, b), [
|
735
|
+
* { type: "common", value: 1 },
|
736
|
+
* { type: "common", value: 2 },
|
737
|
+
* { type: "removed", value: 3 },
|
738
|
+
* { type: "added", value: 4 },
|
739
|
+
* ]);
|
740
|
+
* ```
|
741
|
+
*/ function diff(A, B) {
|
742
|
+
const prefixCommon = createCommon(A, B);
|
743
|
+
A = A.slice(prefixCommon.length);
|
744
|
+
B = B.slice(prefixCommon.length);
|
745
|
+
const swapped = B.length > A.length;
|
746
|
+
[A, B] = swapped ? [B, A] : [A, B];
|
747
|
+
const M = A.length;
|
748
|
+
const N = B.length;
|
749
|
+
if (!M && !N && !prefixCommon.length) return [];
|
750
|
+
if (!N) return [...prefixCommon.map((value) => ({
|
751
|
+
type: "common",
|
752
|
+
value
|
753
|
+
})), ...A.map((value) => ({
|
754
|
+
type: swapped ? "added" : "removed",
|
755
|
+
value
|
756
|
+
}))];
|
757
|
+
const offset = N;
|
758
|
+
const delta = M - N;
|
759
|
+
const length = M + N + 1;
|
760
|
+
const fp = Array.from({ length }, () => ({
|
761
|
+
y: -1,
|
762
|
+
id: -1
|
763
|
+
}));
|
764
|
+
/**
|
765
|
+
* Note: this buffer is used to save memory and improve performance. The first
|
766
|
+
* half is used to save route and the last half is used to save diff type.
|
767
|
+
*/ const routes = new Uint32Array((M * N + length + 1) * 2);
|
768
|
+
const diffTypesPtrOffset = routes.length / 2;
|
769
|
+
let ptr = 0;
|
770
|
+
function snake(k, A$1, B$1, slide, down) {
|
771
|
+
const M$1 = A$1.length;
|
772
|
+
const N$1 = B$1.length;
|
773
|
+
const fp$1 = createFp(k, M$1, routes, diffTypesPtrOffset, ptr, slide, down);
|
774
|
+
ptr = fp$1.id;
|
775
|
+
while (fp$1.y + k < M$1 && fp$1.y < N$1 && A$1[fp$1.y + k] === B$1[fp$1.y]) {
|
776
|
+
const prev = fp$1.id;
|
777
|
+
ptr++;
|
778
|
+
fp$1.id = ptr;
|
779
|
+
fp$1.y += 1;
|
780
|
+
routes[ptr] = prev;
|
781
|
+
routes[ptr + diffTypesPtrOffset] = COMMON;
|
782
|
+
}
|
783
|
+
return fp$1;
|
784
|
+
}
|
785
|
+
let currentFp = fp[delta + offset];
|
786
|
+
assertFp(currentFp);
|
787
|
+
let p = -1;
|
788
|
+
while (currentFp.y < N) {
|
789
|
+
p = p + 1;
|
790
|
+
for (let k = -p; k < delta; ++k) {
|
791
|
+
const index$1 = k + offset;
|
792
|
+
fp[index$1] = snake(k, A, B, fp[index$1 - 1], fp[index$1 + 1]);
|
793
|
+
}
|
794
|
+
for (let k = delta + p; k > delta; --k) {
|
795
|
+
const index$1 = k + offset;
|
796
|
+
fp[index$1] = snake(k, A, B, fp[index$1 - 1], fp[index$1 + 1]);
|
797
|
+
}
|
798
|
+
const index = delta + offset;
|
799
|
+
fp[delta + offset] = snake(delta, A, B, fp[index - 1], fp[index + 1]);
|
800
|
+
currentFp = fp[delta + offset];
|
801
|
+
assertFp(currentFp);
|
802
|
+
}
|
803
|
+
return [...prefixCommon.map((value) => ({
|
804
|
+
type: "common",
|
805
|
+
value
|
806
|
+
})), ...backTrace(A, B, currentFp, swapped, routes, diffTypesPtrOffset)];
|
807
|
+
}
|
808
|
+
|
809
|
+
//#endregion
|
810
|
+
//#region node_modules/.pnpm/@jsr+std__internal@1.0.7/node_modules/@jsr/std__internal/diff_str.js
|
811
|
+
/**
|
812
|
+
* Unescape invisible characters.
|
813
|
+
*
|
814
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#escape_sequences}
|
815
|
+
*
|
816
|
+
* @param string String to unescape.
|
817
|
+
*
|
818
|
+
* @returns Unescaped string.
|
819
|
+
*
|
820
|
+
* @example Usage
|
821
|
+
* ```ts
|
822
|
+
* import { unescape } from "@std/internal/diff-str";
|
823
|
+
* import { assertEquals } from "@std/assert";
|
824
|
+
*
|
825
|
+
* assertEquals(unescape("Hello\nWorld"), "Hello\\n\nWorld");
|
826
|
+
* ```
|
827
|
+
*/ function unescape(string) {
|
828
|
+
return string.replaceAll("\\", "\\\\").replaceAll("\b", "\\b").replaceAll("\f", "\\f").replaceAll(" ", "\\t").replaceAll("\v", "\\v").replaceAll(/\r\n|\r|\n/g, (str) => str === "\r" ? "\\r" : str === "\n" ? "\\n\n" : "\\r\\n\r\n");
|
829
|
+
}
|
830
|
+
const WHITESPACE_SYMBOLS = /((?:\\[bftv]|[^\S\r\n])+|\\[rn\\]|[()[\]{}'"\r\n]|\b)/;
|
831
|
+
/**
|
832
|
+
* Tokenizes a string into an array of tokens.
|
833
|
+
*
|
834
|
+
* @param string The string to tokenize.
|
835
|
+
* @param wordDiff If true, performs word-based tokenization. Default is false.
|
836
|
+
*
|
837
|
+
* @returns An array of tokens.
|
838
|
+
*
|
839
|
+
* @example Usage
|
840
|
+
* ```ts
|
841
|
+
* import { tokenize } from "@std/internal/diff-str";
|
842
|
+
* import { assertEquals } from "@std/assert";
|
843
|
+
*
|
844
|
+
* assertEquals(tokenize("Hello\nWorld"), ["Hello\n", "World"]);
|
845
|
+
* ```
|
846
|
+
*/ function tokenize(string, wordDiff = false) {
|
847
|
+
if (wordDiff) return string.split(WHITESPACE_SYMBOLS).filter((token) => token);
|
848
|
+
const tokens = [];
|
849
|
+
const lines = string.split(/(\n|\r\n)/).filter((line) => line);
|
850
|
+
for (const [i, line] of lines.entries()) if (i % 2) tokens[tokens.length - 1] += line;
|
851
|
+
else tokens.push(line);
|
852
|
+
return tokens;
|
853
|
+
}
|
854
|
+
/**
|
855
|
+
* Create details by filtering relevant word-diff for current line and merge
|
856
|
+
* "space-diff" if surrounded by word-diff for cleaner displays.
|
857
|
+
*
|
858
|
+
* @param line Current line
|
859
|
+
* @param tokens Word-diff tokens
|
860
|
+
*
|
861
|
+
* @returns Array of diff results.
|
862
|
+
*
|
863
|
+
* @example Usage
|
864
|
+
* ```ts
|
865
|
+
* import { createDetails } from "@std/internal/diff-str";
|
866
|
+
* import { assertEquals } from "@std/assert";
|
867
|
+
*
|
868
|
+
* const tokens = [
|
869
|
+
* { type: "added", value: "a" },
|
870
|
+
* { type: "removed", value: "b" },
|
871
|
+
* { type: "common", value: "c" },
|
872
|
+
* ] as const;
|
873
|
+
* assertEquals(
|
874
|
+
* createDetails({ type: "added", value: "a" }, [...tokens]),
|
875
|
+
* [{ type: "added", value: "a" }, { type: "common", value: "c" }]
|
876
|
+
* );
|
877
|
+
* ```
|
878
|
+
*/ function createDetails(line, tokens) {
|
879
|
+
return tokens.filter(({ type }) => type === line.type || type === "common").map((result, i, t) => {
|
880
|
+
const token = t[i - 1];
|
881
|
+
if (result.type === "common" && token && token.type === t[i + 1]?.type && /\s+/.test(result.value)) return {
|
882
|
+
...result,
|
883
|
+
type: token.type
|
884
|
+
};
|
885
|
+
return result;
|
886
|
+
});
|
887
|
+
}
|
888
|
+
const NON_WHITESPACE_REGEXP = /\S/;
|
889
|
+
/**
|
890
|
+
* Renders the differences between the actual and expected strings. Partially
|
891
|
+
* inspired from {@link https://github.com/kpdecker/jsdiff}.
|
892
|
+
*
|
893
|
+
* @param A Actual string
|
894
|
+
* @param B Expected string
|
895
|
+
*
|
896
|
+
* @returns Array of diff results.
|
897
|
+
*
|
898
|
+
* @example Usage
|
899
|
+
* ```ts
|
900
|
+
* import { diffStr } from "@std/internal/diff-str";
|
901
|
+
* import { assertEquals } from "@std/assert";
|
902
|
+
*
|
903
|
+
* assertEquals(diffStr("Hello!", "Hello"), [
|
904
|
+
* {
|
905
|
+
* type: "removed",
|
906
|
+
* value: "Hello!\n",
|
907
|
+
* details: [
|
908
|
+
* { type: "common", value: "Hello" },
|
909
|
+
* { type: "removed", value: "!" },
|
910
|
+
* { type: "common", value: "\n" }
|
911
|
+
* ]
|
912
|
+
* },
|
913
|
+
* {
|
914
|
+
* type: "added",
|
915
|
+
* value: "Hello\n",
|
916
|
+
* details: [
|
917
|
+
* { type: "common", value: "Hello" },
|
918
|
+
* { type: "common", value: "\n" }
|
919
|
+
* ]
|
920
|
+
* }
|
921
|
+
* ]);
|
922
|
+
* ```
|
923
|
+
*/ function diffStr(A, B) {
|
924
|
+
const diffResult = diff(tokenize(`${unescape(A)}\n`), tokenize(`${unescape(B)}\n`));
|
925
|
+
const added = [];
|
926
|
+
const removed = [];
|
927
|
+
for (const result of diffResult) {
|
928
|
+
if (result.type === "added") added.push(result);
|
929
|
+
if (result.type === "removed") removed.push(result);
|
930
|
+
}
|
931
|
+
const hasMoreRemovedLines = added.length < removed.length;
|
932
|
+
const aLines = hasMoreRemovedLines ? added : removed;
|
933
|
+
const bLines = hasMoreRemovedLines ? removed : added;
|
934
|
+
for (const a of aLines) {
|
935
|
+
let tokens = [];
|
936
|
+
let b;
|
937
|
+
while (bLines.length) {
|
938
|
+
b = bLines.shift();
|
939
|
+
const tokenized = [tokenize(a.value, true), tokenize(b.value, true)];
|
940
|
+
if (hasMoreRemovedLines) tokenized.reverse();
|
941
|
+
tokens = diff(tokenized[0], tokenized[1]);
|
942
|
+
if (tokens.some(({ type, value }) => type === "common" && NON_WHITESPACE_REGEXP.test(value))) break;
|
943
|
+
}
|
944
|
+
a.details = createDetails(a, tokens);
|
945
|
+
if (b) b.details = createDetails(b, tokens);
|
946
|
+
}
|
947
|
+
return diffResult;
|
948
|
+
}
|
949
|
+
|
950
|
+
//#endregion
|
951
|
+
//#region node_modules/.pnpm/@jsr+std__internal@1.0.7/node_modules/@jsr/std__internal/format.js
|
952
|
+
/**
|
953
|
+
* Converts the input into a string. Objects, Sets and Maps are sorted so as to
|
954
|
+
* make tests less flaky.
|
955
|
+
*
|
956
|
+
* @param v Value to be formatted
|
957
|
+
*
|
958
|
+
* @returns The formatted string
|
959
|
+
*
|
960
|
+
* @example Usage
|
961
|
+
* ```ts
|
962
|
+
* import { format } from "@std/internal/format";
|
963
|
+
* import { assertEquals } from "@std/assert";
|
964
|
+
*
|
965
|
+
* assertEquals(format({ a: 1, b: 2 }), "{\n a: 1,\n b: 2,\n}");
|
966
|
+
* assertEquals(format(new Set([1, 2])), "Set(2) {\n 1,\n 2,\n}");
|
967
|
+
* assertEquals(format(new Map([[1, 2]])), "Map(1) {\n 1 => 2,\n}");
|
968
|
+
* ```
|
969
|
+
*/ function format(v) {
|
970
|
+
const { Deno: Deno$1 } = globalThis;
|
971
|
+
return typeof Deno$1?.inspect === "function" ? Deno$1.inspect(v, {
|
972
|
+
depth: Infinity,
|
973
|
+
sorted: true,
|
974
|
+
trailingComma: true,
|
975
|
+
compact: false,
|
976
|
+
iterableLimit: Infinity,
|
977
|
+
getters: true,
|
978
|
+
strAbbreviateSize: Infinity
|
979
|
+
}) : `"${String(v).replace(/(?=["\\])/g, "\\")}"`;
|
980
|
+
}
|
981
|
+
|
982
|
+
//#endregion
|
983
|
+
//#region node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_equals.js
|
984
|
+
/**
|
985
|
+
* Make an assertion that `actual` and `expected` are equal, deeply. If not
|
986
|
+
* deeply equal, then throw.
|
987
|
+
*
|
988
|
+
* Type parameter can be specified to ensure values under comparison have the
|
989
|
+
* same type.
|
990
|
+
*
|
991
|
+
* @example Usage
|
992
|
+
* ```ts no-eval
|
993
|
+
* import { assertEquals } from "@std/assert/assert-equals";
|
994
|
+
*
|
995
|
+
* assertEquals("world", "world"); // Doesn't throw
|
996
|
+
* assertEquals("hello", "world"); // Throws
|
997
|
+
* ```
|
998
|
+
*
|
999
|
+
* Note: formatter option is experimental and may be removed in the future.
|
1000
|
+
*
|
1001
|
+
* @typeParam T The type of the values to compare. This is usually inferred.
|
1002
|
+
* @param actual The actual value to compare.
|
1003
|
+
* @param expected The expected value to compare.
|
1004
|
+
* @param msg The optional message to display if the assertion fails.
|
1005
|
+
* @param options The optional object for the assertion.
|
1006
|
+
*/ function assertEquals(actual, expected, msg) {
|
1007
|
+
if (equal(actual, expected)) return;
|
1008
|
+
const msgSuffix = msg ? `: ${msg}` : ".";
|
1009
|
+
let message = `Values are not equal${msgSuffix}`;
|
1010
|
+
const actualString = format(actual);
|
1011
|
+
const expectedString = format(expected);
|
1012
|
+
const stringDiff = typeof actual === "string" && typeof expected === "string";
|
1013
|
+
const diffResult = stringDiff ? diffStr(actual, expected) : diff(actualString.split("\n"), expectedString.split("\n"));
|
1014
|
+
const diffMsg = buildMessage(diffResult, { stringDiff }).join("\n");
|
1015
|
+
message = `${message}\n${diffMsg}`;
|
1016
|
+
throw new AssertionError(message);
|
1017
|
+
}
|
1018
|
+
|
1019
|
+
//#endregion
|
1020
|
+
export { AssertionError, assertEquals, buildMessage, diff, diffStr, equal, format, red, stripAnsiCode };
|