@fedify/fedify 0.9.0-dev.177 → 0.9.0-dev.181
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/CHANGES.md +13 -0
- package/esm/deps/jsr.io/@std/encoding/{0.224.2 → 0.224.3}/base64.js +14 -7
- package/esm/deps/jsr.io/@std/encoding/{0.224.2 → 0.224.3}/hex.js +24 -7
- package/esm/deps/jsr.io/@std/semver/0.224.1/can_parse.js +30 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/compare.js +17 -0
- package/esm/deps/jsr.io/@std/semver/0.224.1/difference.js +37 -0
- package/esm/deps/jsr.io/@std/semver/0.224.1/equals.js +27 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/format.js +14 -1
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/format_range.js +9 -1
- package/esm/deps/jsr.io/@std/semver/0.224.1/greater_or_equal.js +25 -0
- package/esm/deps/jsr.io/@std/semver/0.224.1/greater_than.js +27 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/greater_than_range.js +19 -1
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/increment.js +18 -2
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/is_range.js +10 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/is_semver.js +16 -0
- package/esm/deps/jsr.io/@std/semver/0.224.1/less_or_equal.js +25 -0
- package/esm/deps/jsr.io/@std/semver/0.224.1/less_than.js +25 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/less_than_range.js +21 -3
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/max_satisfying.js +12 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/min_satisfying.js +12 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/mod.js +3 -2
- package/esm/deps/jsr.io/@std/semver/0.224.1/not_equals.js +24 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/parse.js +16 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/parse_range.js +18 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/range_intersects.js +16 -1
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/range_max.js +16 -5
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/range_min.js +16 -5
- package/esm/deps/jsr.io/@std/semver/0.224.1/satisfies.js +26 -0
- package/esm/deps/jsr.io/@std/semver/0.224.1/test_range.js +28 -0
- package/esm/deps/jsr.io/@std/semver/0.224.1/try_parse.js +30 -0
- package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/try_parse_range.js +16 -1
- package/esm/federation/collection.js +1 -1
- package/esm/federation/handler.js +1 -1
- package/esm/federation/middleware.js +7 -3
- package/esm/httpsig/mod.js +60 -283
- package/esm/nodeinfo/types.js +1 -1
- package/esm/runtime/docloader.js +3 -3
- package/esm/runtime/key.js +1 -1
- package/esm/sig/http.js +229 -0
- package/esm/{httpsig → sig}/key.js +0 -3
- package/esm/sig/mod.js +8 -0
- package/esm/sig/owner.js +94 -0
- package/esm/vocab/tombstone.yaml +20 -0
- package/esm/vocab/vocab.js +165 -0
- package/package.json +7 -1
- package/types/deps/jsr.io/@std/assert/0.225.3/assert.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/assert/0.225.3/assertion_error.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/encoding/{0.224.2/_util.d.ts → 0.224.3/_validate_binary_like.d.ts} +1 -1
- package/types/deps/jsr.io/@std/encoding/0.224.3/_validate_binary_like.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/encoding/{0.224.2 → 0.224.3}/base64.d.ts +9 -4
- package/types/deps/jsr.io/@std/encoding/0.224.3/base64.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/encoding/0.224.3/hex.d.ts +37 -0
- package/types/deps/jsr.io/@std/encoding/0.224.3/hex.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/common.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/encoding.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/language.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/media_type.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/negotiation.d.ts +27 -6
- package/types/deps/jsr.io/@std/http/0.224.2/negotiation.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/_constants.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/_shared.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/_test_comparator_set.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/semver/0.224.1/can_parse.d.ts +17 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/can_parse.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/compare.d.ts +28 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/compare.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/constants.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/semver/0.224.1/difference.d.ts +27 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/difference.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/equals.d.ts +24 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/equals.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/format.d.ts +14 -1
- package/types/deps/jsr.io/@std/semver/0.224.1/format.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/format_range.d.ts +17 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/format_range.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/greater_or_equal.d.ts +24 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/greater_or_equal.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/greater_than.d.ts +24 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/greater_than.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/greater_than_range.d.ts +22 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/greater_than_range.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/increment.d.ts +18 -2
- package/types/deps/jsr.io/@std/semver/0.224.1/increment.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/is_range.d.ts +10 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/is_range.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/is_semver.d.ts +16 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/is_semver.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/less_or_equal.d.ts +24 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/less_or_equal.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/less_than.d.ts +24 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/less_than.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/less_than_range.d.ts +22 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/less_than_range.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/max_satisfying.d.ts +12 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/max_satisfying.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/min_satisfying.d.ts +12 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/min_satisfying.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/mod.d.ts +3 -2
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/mod.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/semver/0.224.1/not_equals.d.ts +23 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/not_equals.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/parse.d.ts +25 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/parse.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/parse_range.d.ts +26 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/parse_range.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/range_intersects.d.ts +24 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/range_intersects.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/range_max.d.ts +16 -5
- package/types/deps/jsr.io/@std/semver/0.224.1/range_max.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/range_min.d.ts +16 -5
- package/types/deps/jsr.io/@std/semver/0.224.1/range_min.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/satisfies.d.ts +24 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/satisfies.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/test_range.d.ts +27 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/test_range.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/try_parse.d.ts +21 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/try_parse.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/try_parse_range.d.ts +23 -0
- package/types/deps/jsr.io/@std/semver/0.224.1/try_parse_range.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/types.d.ts +7 -2
- package/types/deps/jsr.io/@std/semver/0.224.1/types.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/text/{0.224.0 → 0.224.1}/_util.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/text/{0.224.0 → 0.224.1}/case.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/text/0.224.1/closest_string.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/text/0.224.1/compare_similarity.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/text/{0.224.0 → 0.224.1}/levenshtein_distance.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/text/0.224.1/mod.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/text/0.224.1/word_similarity_sort.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_dumper/dumper.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_dumper/dumper_state.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_error.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_loader/loader.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_loader/loader_state.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_mark.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_state.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/binary.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/bool.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/float.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/function.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/int.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/map.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/merge.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/mod.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/nil.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/omap.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/pairs.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/regexp.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/seq.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/set.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/str.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/timestamp.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/_type/undefined.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/0.224.1/_utils.d.ts.map +1 -0
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/mod.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/parse.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/schema/core.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/schema/default.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/schema/extended.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/schema/failsafe.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/schema/json.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/schema/mod.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/schema.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/stringify.d.ts.map +1 -1
- package/types/deps/jsr.io/@std/yaml/{0.224.0 → 0.224.1}/type.d.ts.map +1 -1
- package/types/federation/middleware.d.ts.map +1 -1
- package/types/httpsig/mod.d.ts +45 -48
- package/types/httpsig/mod.d.ts.map +1 -1
- package/types/nodeinfo/types.d.ts +1 -1
- package/types/sig/http.d.ts +54 -0
- package/types/sig/http.d.ts.map +1 -0
- package/types/sig/http.test.d.ts.map +1 -0
- package/types/{httpsig → sig}/key.d.ts +0 -3
- package/types/sig/key.d.ts.map +1 -0
- package/types/sig/key.test.d.ts.map +1 -0
- package/types/sig/mod.d.ts +9 -0
- package/types/sig/mod.d.ts.map +1 -0
- package/types/sig/owner.d.ts +50 -0
- package/types/sig/owner.d.ts.map +1 -0
- package/types/sig/owner.test.d.ts.map +1 -0
- package/types/vocab/vocab.d.ts +143 -0
- package/types/vocab/vocab.d.ts.map +1 -1
- package/esm/deps/jsr.io/@std/semver/0.224.0/can_parse.js +0 -15
- package/esm/deps/jsr.io/@std/semver/0.224.0/difference.js +0 -16
- package/esm/deps/jsr.io/@std/semver/0.224.0/equals.js +0 -11
- package/esm/deps/jsr.io/@std/semver/0.224.0/greater_or_equal.js +0 -9
- package/esm/deps/jsr.io/@std/semver/0.224.0/greater_than.js +0 -11
- package/esm/deps/jsr.io/@std/semver/0.224.0/less_or_equal.js +0 -9
- package/esm/deps/jsr.io/@std/semver/0.224.0/less_than.js +0 -9
- package/esm/deps/jsr.io/@std/semver/0.224.0/not_equals.js +0 -9
- package/esm/deps/jsr.io/@std/semver/0.224.0/satisfies.js +0 -11
- package/esm/deps/jsr.io/@std/semver/0.224.0/test_range.js +0 -13
- package/esm/deps/jsr.io/@std/semver/0.224.0/try_parse.js +0 -17
- package/types/deps/jsr.io/@std/encoding/0.224.2/_util.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/encoding/0.224.2/base64.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/encoding/0.224.2/hex.d.ts +0 -24
- package/types/deps/jsr.io/@std/encoding/0.224.2/hex.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/http/0.224.1/negotiation.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/_constants.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/can_parse.d.ts +0 -2
- package/types/deps/jsr.io/@std/semver/0.224.0/can_parse.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/compare.d.ts +0 -11
- package/types/deps/jsr.io/@std/semver/0.224.0/compare.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/difference.d.ts +0 -6
- package/types/deps/jsr.io/@std/semver/0.224.0/difference.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/equals.d.ts +0 -8
- package/types/deps/jsr.io/@std/semver/0.224.0/equals.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/format.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/format_range.d.ts +0 -9
- package/types/deps/jsr.io/@std/semver/0.224.0/format_range.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/greater_or_equal.d.ts +0 -8
- package/types/deps/jsr.io/@std/semver/0.224.0/greater_or_equal.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/greater_than.d.ts +0 -8
- package/types/deps/jsr.io/@std/semver/0.224.0/greater_than.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/greater_than_range.d.ts +0 -4
- package/types/deps/jsr.io/@std/semver/0.224.0/greater_than_range.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/increment.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/is_range.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/is_semver.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/less_or_equal.d.ts +0 -8
- package/types/deps/jsr.io/@std/semver/0.224.0/less_or_equal.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/less_than.d.ts +0 -8
- package/types/deps/jsr.io/@std/semver/0.224.0/less_than.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/less_than_range.d.ts +0 -4
- package/types/deps/jsr.io/@std/semver/0.224.0/less_than_range.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/max_satisfying.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/min_satisfying.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/not_equals.d.ts +0 -8
- package/types/deps/jsr.io/@std/semver/0.224.0/not_equals.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/parse.d.ts +0 -9
- package/types/deps/jsr.io/@std/semver/0.224.0/parse.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/parse_range.d.ts +0 -8
- package/types/deps/jsr.io/@std/semver/0.224.0/parse_range.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/range_intersects.d.ts +0 -9
- package/types/deps/jsr.io/@std/semver/0.224.0/range_intersects.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/range_max.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/range_min.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/satisfies.d.ts +0 -9
- package/types/deps/jsr.io/@std/semver/0.224.0/satisfies.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/test_range.d.ts +0 -12
- package/types/deps/jsr.io/@std/semver/0.224.0/test_range.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/try_parse.d.ts +0 -8
- package/types/deps/jsr.io/@std/semver/0.224.0/try_parse.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/try_parse_range.d.ts +0 -8
- package/types/deps/jsr.io/@std/semver/0.224.0/try_parse_range.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/semver/0.224.0/types.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/text/0.224.0/closest_string.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/text/0.224.0/compare_similarity.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/text/0.224.0/mod.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/text/0.224.0/word_similarity_sort.d.ts.map +0 -1
- package/types/deps/jsr.io/@std/yaml/0.224.0/_utils.d.ts.map +0 -1
- package/types/httpsig/key.d.ts.map +0 -1
- package/types/httpsig/key.test.d.ts.map +0 -1
- /package/esm/deps/jsr.io/@std/encoding/{0.224.2/_util.js → 0.224.3/_validate_binary_like.js} +0 -0
- /package/esm/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/common.js +0 -0
- /package/esm/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/encoding.js +0 -0
- /package/esm/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/language.js +0 -0
- /package/esm/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/media_type.js +0 -0
- /package/esm/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/negotiation.js +0 -0
- /package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/_constants.js +0 -0
- /package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/_shared.js +0 -0
- /package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/_test_comparator_set.js +0 -0
- /package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/constants.js +0 -0
- /package/esm/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/types.js +0 -0
- /package/types/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/common.d.ts +0 -0
- /package/types/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/encoding.d.ts +0 -0
- /package/types/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/language.d.ts +0 -0
- /package/types/deps/jsr.io/@std/http/{0.224.1 → 0.224.2}/_negotiation/media_type.d.ts +0 -0
- /package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/_constants.d.ts +0 -0
- /package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/_shared.d.ts +0 -0
- /package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/_test_comparator_set.d.ts +0 -0
- /package/types/deps/jsr.io/@std/semver/{0.224.0 → 0.224.1}/constants.d.ts +0 -0
package/esm/runtime/key.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as dntShim from "../_dnt.shims.js";
|
|
2
|
-
import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/0.224.
|
|
2
|
+
import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/0.224.3/base64.js";
|
|
3
3
|
/**
|
|
4
4
|
* Imports a PEM-SPKI formatted public key.
|
|
5
5
|
* @param pem The PEM-SPKI formatted public key.
|
package/esm/sig/http.js
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import * as dntShim from "../_dnt.shims.js";
|
|
2
|
+
import { getLogger } from "@logtape/logtape";
|
|
3
|
+
import { equals } from "../deps/jsr.io/@std/bytes/0.224.0/mod.js";
|
|
4
|
+
import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/0.224.3/base64.js";
|
|
5
|
+
import { fetchDocumentLoader, } from "../runtime/docloader.js";
|
|
6
|
+
import { isActor } from "../vocab/actor.js";
|
|
7
|
+
import { CryptographicKey, Object as ASObject } from "../vocab/vocab.js";
|
|
8
|
+
import { validateCryptoKey } from "./key.js";
|
|
9
|
+
/**
|
|
10
|
+
* Signs a request using the given private key.
|
|
11
|
+
* @param request The request to sign.
|
|
12
|
+
* @param privateKey The private key to use for signing.
|
|
13
|
+
* @param keyId The key ID to use for the signature. It will be used by the
|
|
14
|
+
* verifier.
|
|
15
|
+
* @returns The signed request.
|
|
16
|
+
* @throws {TypeError} If the private key is invalid or unsupported.
|
|
17
|
+
*/
|
|
18
|
+
export async function signRequest(request, privateKey, keyId) {
|
|
19
|
+
validateCryptoKey(privateKey, "private");
|
|
20
|
+
const url = new URL(request.url);
|
|
21
|
+
const body = request.method !== "GET" && request.method !== "HEAD"
|
|
22
|
+
? await request.arrayBuffer()
|
|
23
|
+
: null;
|
|
24
|
+
const headers = new Headers(request.headers);
|
|
25
|
+
if (!headers.has("Host")) {
|
|
26
|
+
headers.set("Host", url.host);
|
|
27
|
+
}
|
|
28
|
+
if (!headers.has("Digest") && body != null) {
|
|
29
|
+
const digest = await dntShim.crypto.subtle.digest("SHA-256", body);
|
|
30
|
+
headers.set("Digest", `sha-256=${encodeBase64(digest)}`);
|
|
31
|
+
}
|
|
32
|
+
if (!headers.has("Date")) {
|
|
33
|
+
headers.set("Date", new Date().toUTCString());
|
|
34
|
+
}
|
|
35
|
+
const serialized = [
|
|
36
|
+
["(request-target)", `${request.method.toLowerCase()} ${url.pathname}`],
|
|
37
|
+
...headers,
|
|
38
|
+
];
|
|
39
|
+
const headerNames = serialized.map(([name]) => name);
|
|
40
|
+
const message = serialized
|
|
41
|
+
.map(([name, value]) => `${name}: ${value.trim()}`).join("\n");
|
|
42
|
+
// TODO: support other than RSASSA-PKCS1-v1_5:
|
|
43
|
+
const signature = await dntShim.crypto.subtle.sign("RSASSA-PKCS1-v1_5", privateKey, new TextEncoder().encode(message));
|
|
44
|
+
const sigHeader = `keyId="${keyId.href}",headers="${headerNames.join(" ")}",signature="${encodeBase64(signature)}"`;
|
|
45
|
+
headers.set("Signature", sigHeader);
|
|
46
|
+
return new Request(request, {
|
|
47
|
+
headers,
|
|
48
|
+
body,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
const supportedHashAlgorithms = {
|
|
52
|
+
"sha": "SHA-1",
|
|
53
|
+
"sha-256": "SHA-256",
|
|
54
|
+
"sha-512": "SHA-512",
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Verifies the signature of a request.
|
|
58
|
+
*
|
|
59
|
+
* Note that this function consumes the request body, so it should not be used
|
|
60
|
+
* if the request body is already consumed. Consuming the request body after
|
|
61
|
+
* calling this function is okay, since this function clones the request
|
|
62
|
+
* under the hood.
|
|
63
|
+
*
|
|
64
|
+
* @param request The request to verify.
|
|
65
|
+
* @param options Options for verifying the request.
|
|
66
|
+
* @returns The public key of the verified signature, or `null` if the signature
|
|
67
|
+
* could not be verified.
|
|
68
|
+
*/
|
|
69
|
+
export async function verifyRequest(request, { documentLoader, contextLoader, timeWindow, currentTime } = {}) {
|
|
70
|
+
const logger = getLogger(["fedify", "sig", "http"]);
|
|
71
|
+
request = request.clone();
|
|
72
|
+
const dateHeader = request.headers.get("Date");
|
|
73
|
+
if (dateHeader == null) {
|
|
74
|
+
logger.debug("Failed to verify; no Date header found.", { headers: Object.fromEntries(request.headers.entries()) });
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
const sigHeader = request.headers.get("Signature");
|
|
78
|
+
if (sigHeader == null) {
|
|
79
|
+
logger.debug("Failed to verify; no Signature header found.", { headers: Object.fromEntries(request.headers.entries()) });
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
const digestHeader = request.headers.get("Digest");
|
|
83
|
+
if (request.method !== "GET" && request.method !== "HEAD" &&
|
|
84
|
+
digestHeader == null) {
|
|
85
|
+
logger.debug("Failed to verify; no Digest header found.", { headers: Object.fromEntries(request.headers.entries()) });
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
let body = null;
|
|
89
|
+
if (digestHeader != null) {
|
|
90
|
+
body = await request.arrayBuffer();
|
|
91
|
+
const digests = digestHeader.split(",").map((pair) => pair.includes("=") ? pair.split("=", 2) : [pair, ""]);
|
|
92
|
+
let matched = false;
|
|
93
|
+
for (let [algo, digestBase64] of digests) {
|
|
94
|
+
algo = algo.trim().toLowerCase();
|
|
95
|
+
if (!(algo in supportedHashAlgorithms))
|
|
96
|
+
continue;
|
|
97
|
+
const digest = decodeBase64(digestBase64);
|
|
98
|
+
const expectedDigest = await dntShim.crypto.subtle.digest(supportedHashAlgorithms[algo], body);
|
|
99
|
+
if (!equals(digest, new Uint8Array(expectedDigest))) {
|
|
100
|
+
logger.debug("Failed to verify; digest mismatch ({algorithm}): " +
|
|
101
|
+
"{digest} != {expectedDigest}.", {
|
|
102
|
+
algorithm: algo,
|
|
103
|
+
digest: digestBase64,
|
|
104
|
+
expectedDigest: encodeBase64(expectedDigest),
|
|
105
|
+
});
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
matched = true;
|
|
109
|
+
}
|
|
110
|
+
if (!matched) {
|
|
111
|
+
logger.debug("Failed to verify; no supported digest algorithm found. " +
|
|
112
|
+
"Supported: {supportedAlgorithms}; found: {algorithms}.", {
|
|
113
|
+
supportedAlgorithms: Object.keys(supportedHashAlgorithms),
|
|
114
|
+
algorithms: digests.map(([algo]) => algo),
|
|
115
|
+
});
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
const date = dntShim.Temporal.Instant.from(new Date(dateHeader).toISOString());
|
|
120
|
+
const now = currentTime ?? dntShim.Temporal.Now.instant();
|
|
121
|
+
const tw = timeWindow ?? { minutes: 1 };
|
|
122
|
+
if (dntShim.Temporal.Instant.compare(date, now.add(tw)) > 0) {
|
|
123
|
+
logger.debug("Failed to verify; Date is too far in the future.", { date: date.toString(), now: now.toString() });
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
else if (dntShim.Temporal.Instant.compare(date, now.subtract(tw)) < 0) {
|
|
127
|
+
logger.debug("Failed to verify; Date is too far in the past.", { date: date.toString(), now: now.toString() });
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
const sigValues = Object.fromEntries(sigHeader.split(",").map((pair) => pair.match(/^\s*([A-Za-z]+)="([^"]*)"\s*$/)).filter((m) => m != null).map((m) => m.slice(1, 3)));
|
|
131
|
+
if (!("keyId" in sigValues)) {
|
|
132
|
+
logger.debug("Failed to verify; no keyId field found in the Signature header.", { signature: sigHeader });
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
else if (!("headers" in sigValues)) {
|
|
136
|
+
logger.debug("Failed to verify; no headers field found in the Signature header.", { signature: sigHeader });
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
else if (!("signature" in sigValues)) {
|
|
140
|
+
logger.debug("Failed to verify; no signature field found in the Signature header.", { signature: sigHeader });
|
|
141
|
+
return null;
|
|
142
|
+
}
|
|
143
|
+
const { keyId, headers, signature } = sigValues;
|
|
144
|
+
logger.debug("Fetching key {keyId} to verify signature...", { keyId });
|
|
145
|
+
let document;
|
|
146
|
+
try {
|
|
147
|
+
const remoteDocument = await (documentLoader ?? fetchDocumentLoader)(keyId);
|
|
148
|
+
document = remoteDocument.document;
|
|
149
|
+
}
|
|
150
|
+
catch (_) {
|
|
151
|
+
logger.debug("Failed to fetch key {keyId}.", { keyId });
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
let object;
|
|
155
|
+
try {
|
|
156
|
+
object = await ASObject.fromJsonLd(document, {
|
|
157
|
+
documentLoader,
|
|
158
|
+
contextLoader,
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
catch (e) {
|
|
162
|
+
if (!(e instanceof TypeError))
|
|
163
|
+
throw e;
|
|
164
|
+
try {
|
|
165
|
+
object = await CryptographicKey.fromJsonLd(document, {
|
|
166
|
+
documentLoader,
|
|
167
|
+
contextLoader,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
catch (e) {
|
|
171
|
+
if (e instanceof TypeError) {
|
|
172
|
+
logger.debug("Failed to verify; key {keyId} returned an invalid object.", { keyId });
|
|
173
|
+
return null;
|
|
174
|
+
}
|
|
175
|
+
throw e;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
let key = null;
|
|
179
|
+
if (object instanceof CryptographicKey)
|
|
180
|
+
key = object;
|
|
181
|
+
else if (isActor(object)) {
|
|
182
|
+
for await (const k of object.getPublicKeys({ documentLoader, contextLoader })) {
|
|
183
|
+
if (k.id?.href === keyId) {
|
|
184
|
+
key = k;
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
if (key == null) {
|
|
189
|
+
logger.debug("Failed to verify; object {keyId} returned an {actorType}, " +
|
|
190
|
+
"but has no key matching {keyId}.", { keyId, actorType: object.constructor.name });
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
logger.debug("Failed to verify; key {keyId} returned an invalid object.", { keyId });
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
if (key.publicKey == null) {
|
|
199
|
+
logger.debug("Failed to verify; key {keyId} has no publicKeyPem field.", { keyId });
|
|
200
|
+
return null;
|
|
201
|
+
}
|
|
202
|
+
const headerNames = headers.split(/\s+/g);
|
|
203
|
+
if (!headerNames.includes("(request-target)") || !headerNames.includes("date")) {
|
|
204
|
+
logger.debug("Failed to verify; required headers missing in the Signature header: " +
|
|
205
|
+
"{headers}.", { headers });
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
208
|
+
if (body != null && !headerNames.includes("digest")) {
|
|
209
|
+
logger.debug("Failed to verify; required headers missing in the Signature header: " +
|
|
210
|
+
"{headers}.", { headers });
|
|
211
|
+
return null;
|
|
212
|
+
}
|
|
213
|
+
const message = headerNames.map((name) => `${name}: ` +
|
|
214
|
+
(name == "(request-target)"
|
|
215
|
+
? `${request.method.toLowerCase()} ${new URL(request.url).pathname}`
|
|
216
|
+
: name == "host"
|
|
217
|
+
? request.headers.get("host") ?? new URL(request.url).host
|
|
218
|
+
: request.headers.get(name))).join("\n");
|
|
219
|
+
const sig = decodeBase64(signature);
|
|
220
|
+
// TODO: support other than RSASSA-PKCS1-v1_5:
|
|
221
|
+
const verified = await dntShim.crypto.subtle.verify("RSASSA-PKCS1-v1_5", key.publicKey, sig, new TextEncoder().encode(message));
|
|
222
|
+
if (!verified) {
|
|
223
|
+
logger.debug("Failed to verify; signature {signature} is invalid. " +
|
|
224
|
+
"Check if the key is correct or if the signed message is correct. " +
|
|
225
|
+
"The message to sign is:\n{message}", { signature, message });
|
|
226
|
+
return null;
|
|
227
|
+
}
|
|
228
|
+
return key;
|
|
229
|
+
}
|
|
@@ -28,7 +28,6 @@ export function validateCryptoKey(key, type) {
|
|
|
28
28
|
/**
|
|
29
29
|
* Generates a key pair which is appropriate for Fedify.
|
|
30
30
|
* @returns The generated key pair.
|
|
31
|
-
* @since 0.3.0
|
|
32
31
|
*/
|
|
33
32
|
export function generateCryptoKeyPair() {
|
|
34
33
|
return dntShim.crypto.subtle.generateKey({
|
|
@@ -44,7 +43,6 @@ export function generateCryptoKeyPair() {
|
|
|
44
43
|
* @returns The exported key in JWK format. The key is suitable for
|
|
45
44
|
* serialization and storage.
|
|
46
45
|
* @throws {TypeError} If the key is invalid or unsupported.
|
|
47
|
-
* @since 0.3.0
|
|
48
46
|
*/
|
|
49
47
|
export async function exportJwk(key) {
|
|
50
48
|
validateCryptoKey(key);
|
|
@@ -56,7 +54,6 @@ export async function exportJwk(key) {
|
|
|
56
54
|
* @param type Which type of key to import, either `"public"`" or `"private"`".
|
|
57
55
|
* @returns The imported key.
|
|
58
56
|
* @throws {TypeError} If the key is invalid or unsupported.
|
|
59
|
-
* @since 0.3.0
|
|
60
57
|
*/
|
|
61
58
|
export async function importJwk(jwk, type) {
|
|
62
59
|
const key = await dntShim.crypto.subtle.importKey("jwk", jwk, { name: "RSASSA-PKCS1-v1_5", hash: "SHA-256" }, true, type === "public" ? ["verify"] : ["sign"]);
|
package/esm/sig/mod.js
ADDED
package/esm/sig/owner.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { fetchDocumentLoader, } from "../runtime/docloader.js";
|
|
2
|
+
import { isActor } from "../vocab/actor.js";
|
|
3
|
+
import { CryptographicKey, Object as ASObject, } from "../vocab/vocab.js";
|
|
4
|
+
export { exportJwk, generateCryptoKeyPair, importJwk } from "./key.js";
|
|
5
|
+
/**
|
|
6
|
+
* Checks if the actor of the given activity owns the specified key.
|
|
7
|
+
* @param activity The activity to check.
|
|
8
|
+
* @param key The public key to check.
|
|
9
|
+
* @param options Options for checking the key ownership.
|
|
10
|
+
* @returns Whether the actor is the owner of the key.
|
|
11
|
+
*/
|
|
12
|
+
export async function doesActorOwnKey(activity, key, options) {
|
|
13
|
+
if (key.ownerId != null) {
|
|
14
|
+
return key.ownerId.href === activity.actorId?.href;
|
|
15
|
+
}
|
|
16
|
+
const actor = await activity.getActor(options);
|
|
17
|
+
if (actor == null || !isActor(actor))
|
|
18
|
+
return false;
|
|
19
|
+
for (const publicKeyId of actor.publicKeyIds) {
|
|
20
|
+
if (key.id != null && publicKeyId.href === key.id.href)
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Gets the actor that owns the specified key. Returns `null` if the key has no
|
|
27
|
+
* known owner.
|
|
28
|
+
*
|
|
29
|
+
* @param keyId The ID of the key to check, or the key itself.
|
|
30
|
+
* @param options Options for getting the key owner.
|
|
31
|
+
* @returns The actor that owns the key, or `null` if the key has no known
|
|
32
|
+
* owner.
|
|
33
|
+
*/
|
|
34
|
+
export async function getKeyOwner(keyId, options) {
|
|
35
|
+
const documentLoader = options.documentLoader ?? fetchDocumentLoader;
|
|
36
|
+
const contextLoader = options.contextLoader ?? fetchDocumentLoader;
|
|
37
|
+
let object;
|
|
38
|
+
if (keyId instanceof CryptographicKey) {
|
|
39
|
+
object = keyId;
|
|
40
|
+
if (object.id == null)
|
|
41
|
+
return null;
|
|
42
|
+
keyId = object.id;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
let keyDoc;
|
|
46
|
+
try {
|
|
47
|
+
const { document } = await documentLoader(keyId.href);
|
|
48
|
+
keyDoc = document;
|
|
49
|
+
}
|
|
50
|
+
catch (_) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
try {
|
|
54
|
+
object = await ASObject.fromJsonLd(keyDoc, {
|
|
55
|
+
documentLoader,
|
|
56
|
+
contextLoader,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
catch (e) {
|
|
60
|
+
if (!(e instanceof TypeError))
|
|
61
|
+
throw e;
|
|
62
|
+
try {
|
|
63
|
+
object = await CryptographicKey.fromJsonLd(keyDoc, {
|
|
64
|
+
documentLoader,
|
|
65
|
+
contextLoader,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
catch (e) {
|
|
69
|
+
if (e instanceof TypeError)
|
|
70
|
+
return null;
|
|
71
|
+
throw e;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
let owner = null;
|
|
76
|
+
if (object instanceof CryptographicKey) {
|
|
77
|
+
if (object.ownerId == null)
|
|
78
|
+
return null;
|
|
79
|
+
owner = await object.getOwner({ documentLoader, contextLoader });
|
|
80
|
+
}
|
|
81
|
+
else if (isActor(object)) {
|
|
82
|
+
owner = object;
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
if (owner == null)
|
|
88
|
+
return null;
|
|
89
|
+
for (const kid of owner.publicKeyIds) {
|
|
90
|
+
if (kid.href === keyId.href)
|
|
91
|
+
return owner;
|
|
92
|
+
}
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
$schema: ../codegen/schema.yaml
|
|
2
|
+
name: Tombstone
|
|
3
|
+
uri: "https://www.w3.org/ns/activitystreams#Tombstone"
|
|
4
|
+
extends: "https://www.w3.org/ns/activitystreams#Object"
|
|
5
|
+
entity: true
|
|
6
|
+
description: |
|
|
7
|
+
A `Tombstone` represents a content object that has been deleted.
|
|
8
|
+
It can be used in {@link Collection}s to signify that there used to be
|
|
9
|
+
an object at this position, but it has been deleted.
|
|
10
|
+
defaultContext: "https://www.w3.org/ns/activitystreams"
|
|
11
|
+
|
|
12
|
+
properties:
|
|
13
|
+
- singularName: deleted
|
|
14
|
+
functional: true
|
|
15
|
+
uri: "https://www.w3.org/ns/activitystreams#deleted"
|
|
16
|
+
description: |
|
|
17
|
+
On a `Tombstone` object, the `deleted` property is a timestamp for when
|
|
18
|
+
the object was deleted.
|
|
19
|
+
range:
|
|
20
|
+
- "http://www.w3.org/2001/XMLSchema#dateTime"
|
package/esm/vocab/vocab.js
CHANGED
|
@@ -2151,6 +2151,10 @@ export class Object {
|
|
|
2151
2151
|
delete values["@type"];
|
|
2152
2152
|
return await Service.fromJsonLd(values, options);
|
|
2153
2153
|
}
|
|
2154
|
+
if (values["@type"].includes("https://www.w3.org/ns/activitystreams#Tombstone")) {
|
|
2155
|
+
delete values["@type"];
|
|
2156
|
+
return await Tombstone.fromJsonLd(values, options);
|
|
2157
|
+
}
|
|
2154
2158
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Object")) {
|
|
2155
2159
|
throw new TypeError("Invalid type: " + values["@type"]);
|
|
2156
2160
|
}
|
|
@@ -2208,6 +2212,7 @@ export class Object {
|
|
|
2208
2212
|
"https://www.w3.org/ns/activitystreams#Profile",
|
|
2209
2213
|
"https://www.w3.org/ns/activitystreams#Relationship",
|
|
2210
2214
|
"https://www.w3.org/ns/activitystreams#Service",
|
|
2215
|
+
"https://www.w3.org/ns/activitystreams#Tombstone",
|
|
2211
2216
|
].some((t) => v["@type"].includes(t))
|
|
2212
2217
|
? await _a.fromJsonLd(v, options)
|
|
2213
2218
|
: typeof v === "object" && "@type" in v &&
|
|
@@ -2344,6 +2349,7 @@ export class Object {
|
|
|
2344
2349
|
"https://www.w3.org/ns/activitystreams#Profile",
|
|
2345
2350
|
"https://www.w3.org/ns/activitystreams#Relationship",
|
|
2346
2351
|
"https://www.w3.org/ns/activitystreams#Service",
|
|
2352
|
+
"https://www.w3.org/ns/activitystreams#Tombstone",
|
|
2347
2353
|
].some((t) => v["@type"].includes(t))
|
|
2348
2354
|
? await _a.fromJsonLd(v, options)
|
|
2349
2355
|
: typeof v === "object" && "@type" in v &&
|
|
@@ -2435,6 +2441,7 @@ export class Object {
|
|
|
2435
2441
|
"https://www.w3.org/ns/activitystreams#Profile",
|
|
2436
2442
|
"https://www.w3.org/ns/activitystreams#Relationship",
|
|
2437
2443
|
"https://www.w3.org/ns/activitystreams#Service",
|
|
2444
|
+
"https://www.w3.org/ns/activitystreams#Tombstone",
|
|
2438
2445
|
].some((t) => v["@type"].includes(t))
|
|
2439
2446
|
? await _a.fromJsonLd(v, options)
|
|
2440
2447
|
: typeof v === "object" && "@type" in v &&
|
|
@@ -2526,6 +2533,7 @@ export class Object {
|
|
|
2526
2533
|
"https://www.w3.org/ns/activitystreams#Profile",
|
|
2527
2534
|
"https://www.w3.org/ns/activitystreams#Relationship",
|
|
2528
2535
|
"https://www.w3.org/ns/activitystreams#Service",
|
|
2536
|
+
"https://www.w3.org/ns/activitystreams#Tombstone",
|
|
2529
2537
|
].some((t) => v["@type"].includes(t))
|
|
2530
2538
|
? await _a.fromJsonLd(v, options)
|
|
2531
2539
|
: typeof v === "object" && "@type" in v &&
|
|
@@ -2593,6 +2601,7 @@ export class Object {
|
|
|
2593
2601
|
"https://www.w3.org/ns/activitystreams#Profile",
|
|
2594
2602
|
"https://www.w3.org/ns/activitystreams#Relationship",
|
|
2595
2603
|
"https://www.w3.org/ns/activitystreams#Service",
|
|
2604
|
+
"https://www.w3.org/ns/activitystreams#Tombstone",
|
|
2596
2605
|
].some((t) => v["@type"].includes(t))
|
|
2597
2606
|
? await _a.fromJsonLd(v, options)
|
|
2598
2607
|
: typeof v === "object" && "@type" in v &&
|
|
@@ -2668,6 +2677,7 @@ export class Object {
|
|
|
2668
2677
|
"https://www.w3.org/ns/activitystreams#Profile",
|
|
2669
2678
|
"https://www.w3.org/ns/activitystreams#Relationship",
|
|
2670
2679
|
"https://www.w3.org/ns/activitystreams#Service",
|
|
2680
|
+
"https://www.w3.org/ns/activitystreams#Tombstone",
|
|
2671
2681
|
].some((t) => v["@type"].includes(t))
|
|
2672
2682
|
? await _a.fromJsonLd(v, options)
|
|
2673
2683
|
: undefined;
|
|
@@ -2770,6 +2780,7 @@ export class Object {
|
|
|
2770
2780
|
"https://www.w3.org/ns/activitystreams#Profile",
|
|
2771
2781
|
"https://www.w3.org/ns/activitystreams#Relationship",
|
|
2772
2782
|
"https://www.w3.org/ns/activitystreams#Service",
|
|
2783
|
+
"https://www.w3.org/ns/activitystreams#Tombstone",
|
|
2773
2784
|
].some((t) => v["@type"].includes(t))
|
|
2774
2785
|
? await _a.fromJsonLd(v, options)
|
|
2775
2786
|
: typeof v === "object" && "@type" in v &&
|
|
@@ -7058,6 +7069,7 @@ export class Collection extends Object {
|
|
|
7058
7069
|
"https://www.w3.org/ns/activitystreams#Profile",
|
|
7059
7070
|
"https://www.w3.org/ns/activitystreams#Relationship",
|
|
7060
7071
|
"https://www.w3.org/ns/activitystreams#Service",
|
|
7072
|
+
"https://www.w3.org/ns/activitystreams#Tombstone",
|
|
7061
7073
|
].some((t) => v["@type"].includes(t))
|
|
7062
7074
|
? await Object.fromJsonLd(v, options)
|
|
7063
7075
|
: typeof v === "object" && "@type" in v &&
|
|
@@ -10246,6 +10258,7 @@ export class Link {
|
|
|
10246
10258
|
"https://www.w3.org/ns/activitystreams#Profile",
|
|
10247
10259
|
"https://www.w3.org/ns/activitystreams#Relationship",
|
|
10248
10260
|
"https://www.w3.org/ns/activitystreams#Service",
|
|
10261
|
+
"https://www.w3.org/ns/activitystreams#Tombstone",
|
|
10249
10262
|
].some((t) => v["@type"].includes(t))
|
|
10250
10263
|
? await Object.fromJsonLd(v, options)
|
|
10251
10264
|
: undefined;
|
|
@@ -15912,6 +15925,158 @@ export class Service extends Object {
|
|
|
15912
15925
|
return "Service " + inspect(proxy, options);
|
|
15913
15926
|
}
|
|
15914
15927
|
}
|
|
15928
|
+
/** A `Tombstone` represents a content object that has been deleted.
|
|
15929
|
+
* It can be used in {@link Collection}s to signify that there used to be
|
|
15930
|
+
* an object at this position, but it has been deleted.
|
|
15931
|
+
*/
|
|
15932
|
+
export class Tombstone extends Object {
|
|
15933
|
+
/**
|
|
15934
|
+
* The type URI of {@link Tombstone}: `https://www.w3.org/ns/activitystreams#Tombstone`.
|
|
15935
|
+
*/
|
|
15936
|
+
static get typeId() {
|
|
15937
|
+
return new URL("https://www.w3.org/ns/activitystreams#Tombstone");
|
|
15938
|
+
}
|
|
15939
|
+
#_8g8g4LiVMhFTXskuDEqx4ascxUr = [];
|
|
15940
|
+
/**
|
|
15941
|
+
* Constructs a new instance of Tombstone with the given values.
|
|
15942
|
+
* @param values The values to initialize the instance with.
|
|
15943
|
+
* @param options The options to use for initialization.
|
|
15944
|
+
*/
|
|
15945
|
+
constructor(values, { documentLoader, contextLoader, } = {}) {
|
|
15946
|
+
super(values, { documentLoader, contextLoader });
|
|
15947
|
+
if ("deleted" in values && values.deleted != null) {
|
|
15948
|
+
this.#_8g8g4LiVMhFTXskuDEqx4ascxUr = [values.deleted];
|
|
15949
|
+
}
|
|
15950
|
+
}
|
|
15951
|
+
/**
|
|
15952
|
+
* Clones this instance, optionally updating it with the given values.
|
|
15953
|
+
* @param values The values to update the clone with.
|
|
15954
|
+
* @options The options to use for cloning.
|
|
15955
|
+
* @returns The cloned instance.
|
|
15956
|
+
*/
|
|
15957
|
+
clone(values = {}, options = {}) {
|
|
15958
|
+
const clone = super.clone(values, options);
|
|
15959
|
+
clone.#_8g8g4LiVMhFTXskuDEqx4ascxUr = this.#_8g8g4LiVMhFTXskuDEqx4ascxUr;
|
|
15960
|
+
if ("deleted" in values && values.deleted != null) {
|
|
15961
|
+
clone.#_8g8g4LiVMhFTXskuDEqx4ascxUr = [values.deleted];
|
|
15962
|
+
}
|
|
15963
|
+
return clone;
|
|
15964
|
+
}
|
|
15965
|
+
/** On a `Tombstone` object, the `deleted` property is a timestamp for when
|
|
15966
|
+
* the object was deleted.
|
|
15967
|
+
*/
|
|
15968
|
+
get deleted() {
|
|
15969
|
+
if (this.#_8g8g4LiVMhFTXskuDEqx4ascxUr.length < 1)
|
|
15970
|
+
return null;
|
|
15971
|
+
return this.#_8g8g4LiVMhFTXskuDEqx4ascxUr[0];
|
|
15972
|
+
}
|
|
15973
|
+
/**
|
|
15974
|
+
* Converts this object to a JSON-LD structure.
|
|
15975
|
+
* @returns The JSON-LD representation of this object.
|
|
15976
|
+
*/
|
|
15977
|
+
async toJsonLd(options = {}) {
|
|
15978
|
+
options = {
|
|
15979
|
+
...options,
|
|
15980
|
+
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
|
15981
|
+
};
|
|
15982
|
+
// deno-lint-ignore no-unused-vars prefer-const
|
|
15983
|
+
let array;
|
|
15984
|
+
const baseValues = await super.toJsonLd({
|
|
15985
|
+
...options,
|
|
15986
|
+
expand: true,
|
|
15987
|
+
});
|
|
15988
|
+
const values = baseValues[0];
|
|
15989
|
+
array = [];
|
|
15990
|
+
for (const v of this.#_8g8g4LiVMhFTXskuDEqx4ascxUr) {
|
|
15991
|
+
array.push({
|
|
15992
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime",
|
|
15993
|
+
"@value": v.toString(),
|
|
15994
|
+
});
|
|
15995
|
+
}
|
|
15996
|
+
if (array.length > 0) {
|
|
15997
|
+
values["https://www.w3.org/ns/activitystreams#deleted"] = array;
|
|
15998
|
+
}
|
|
15999
|
+
values["@type"] = ["https://www.w3.org/ns/activitystreams#Tombstone"];
|
|
16000
|
+
if (this.id)
|
|
16001
|
+
values["@id"] = this.id.href;
|
|
16002
|
+
if (options.expand) {
|
|
16003
|
+
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
|
16004
|
+
}
|
|
16005
|
+
return await jsonld.compact(values, "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
|
|
16006
|
+
}
|
|
16007
|
+
/**
|
|
16008
|
+
* Converts a JSON-LD structure to an object of this type.
|
|
16009
|
+
* @param json The JSON-LD structure to convert.
|
|
16010
|
+
* @returns The object of this type.
|
|
16011
|
+
* @throws {TypeError} If the given `json` is invalid.
|
|
16012
|
+
*/
|
|
16013
|
+
static async fromJsonLd(json, options = {}) {
|
|
16014
|
+
if (typeof json === "undefined") {
|
|
16015
|
+
throw new TypeError("Invalid JSON-LD: undefined.");
|
|
16016
|
+
}
|
|
16017
|
+
else if (json === null)
|
|
16018
|
+
throw new TypeError("Invalid JSON-LD: null.");
|
|
16019
|
+
options = {
|
|
16020
|
+
...options,
|
|
16021
|
+
documentLoader: options.documentLoader ?? fetchDocumentLoader,
|
|
16022
|
+
contextLoader: options.contextLoader ?? fetchDocumentLoader,
|
|
16023
|
+
};
|
|
16024
|
+
// deno-lint-ignore no-explicit-any
|
|
16025
|
+
let values;
|
|
16026
|
+
if (globalThis.Object.keys(json).length == 0) {
|
|
16027
|
+
values = {};
|
|
16028
|
+
}
|
|
16029
|
+
else {
|
|
16030
|
+
const expanded = await jsonld.expand(json, {
|
|
16031
|
+
documentLoader: options.contextLoader,
|
|
16032
|
+
keepFreeFloatingNodes: true,
|
|
16033
|
+
});
|
|
16034
|
+
values =
|
|
16035
|
+
// deno-lint-ignore no-explicit-any
|
|
16036
|
+
(expanded[0] ?? {});
|
|
16037
|
+
}
|
|
16038
|
+
if ("@type" in values) {
|
|
16039
|
+
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Tombstone")) {
|
|
16040
|
+
throw new TypeError("Invalid type: " + values["@type"]);
|
|
16041
|
+
}
|
|
16042
|
+
}
|
|
16043
|
+
const instance = await super.fromJsonLd(values, options);
|
|
16044
|
+
if (!(instance instanceof Tombstone)) {
|
|
16045
|
+
throw new TypeError("Unexpected type: " + instance.constructor.name);
|
|
16046
|
+
}
|
|
16047
|
+
const _8g8g4LiVMhFTXskuDEqx4ascxUr = [];
|
|
16048
|
+
for (const v of values["https://www.w3.org/ns/activitystreams#deleted"] ?? []) {
|
|
16049
|
+
if (v == null)
|
|
16050
|
+
continue;
|
|
16051
|
+
_8g8g4LiVMhFTXskuDEqx4ascxUr.push(dntShim.Temporal.Instant.from(v["@value"]));
|
|
16052
|
+
}
|
|
16053
|
+
instance.#_8g8g4LiVMhFTXskuDEqx4ascxUr = _8g8g4LiVMhFTXskuDEqx4ascxUr;
|
|
16054
|
+
return instance;
|
|
16055
|
+
}
|
|
16056
|
+
_getCustomInspectProxy() {
|
|
16057
|
+
const proxy = super._getCustomInspectProxy();
|
|
16058
|
+
const _8g8g4LiVMhFTXskuDEqx4ascxUr = this.#_8g8g4LiVMhFTXskuDEqx4ascxUr
|
|
16059
|
+
// deno-lint-ignore no-explicit-any
|
|
16060
|
+
.map((v) => v instanceof URL
|
|
16061
|
+
? {
|
|
16062
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
16063
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options),
|
|
16064
|
+
}
|
|
16065
|
+
: v);
|
|
16066
|
+
if (_8g8g4LiVMhFTXskuDEqx4ascxUr.length == 1) {
|
|
16067
|
+
proxy.deleted = _8g8g4LiVMhFTXskuDEqx4ascxUr[0];
|
|
16068
|
+
}
|
|
16069
|
+
return proxy;
|
|
16070
|
+
}
|
|
16071
|
+
[Symbol.for("Deno.customInspect")](inspect, options) {
|
|
16072
|
+
const proxy = this._getCustomInspectProxy();
|
|
16073
|
+
return "Tombstone " + inspect(proxy, options);
|
|
16074
|
+
}
|
|
16075
|
+
[Symbol.for("nodejs.util.inspect.custom")](_depth, options, inspect) {
|
|
16076
|
+
const proxy = this._getCustomInspectProxy();
|
|
16077
|
+
return "Tombstone " + inspect(proxy, options);
|
|
16078
|
+
}
|
|
16079
|
+
}
|
|
15915
16080
|
/** Indicates that the `actor` is undoing the `object`. In most cases,
|
|
15916
16081
|
* the `object` will be an {@link Activity} describing some previously performed
|
|
15917
16082
|
* action (for instance, a person may have previously "liked" an article but,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/fedify",
|
|
3
|
-
"version": "0.9.0-dev.
|
|
3
|
+
"version": "0.9.0-dev.181+d5e0642c",
|
|
4
4
|
"description": "An ActivityPub server framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ActivityPub",
|
|
@@ -53,6 +53,12 @@
|
|
|
53
53
|
"default": "./esm/runtime/mod.js"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
+
"./sig": {
|
|
57
|
+
"import": {
|
|
58
|
+
"types": "./types/sig/mod.d.ts",
|
|
59
|
+
"default": "./esm/sig/mod.js"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
56
62
|
"./vocab": {
|
|
57
63
|
"import": {
|
|
58
64
|
"types": "./types/vocab/mod.d.ts",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.225.3/assert.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,SAAK,GAAG,OAAO,CAAC,IAAI,CAI5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertion_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/0.225.3/assertion_error.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,iCAAiC;gBACrB,OAAO,EAAE,MAAM;CAI5B"}
|
package/types/deps/jsr.io/@std/encoding/{0.224.2/_util.d.ts → 0.224.3/_validate_binary_like.d.ts}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare function validateBinaryLike(source: unknown): Uint8Array;
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=_validate_binary_like.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_validate_binary_like.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/encoding/0.224.3/_validate_binary_like.ts"],"names":[],"mappings":"AAeA,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,UAAU,CAa9D"}
|