@fedify/fedify 0.15.0-dev.381 → 0.15.0-dev.383
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGES.md +27 -0
- package/README.md +3 -1
- package/esm/codegen/schema.yaml +21 -0
- package/esm/federation/middleware.js +4 -0
- package/esm/mod.js +2 -1
- package/esm/vocab/article.yaml +29 -1
- package/esm/vocab/chatmessage.yaml +29 -1
- package/esm/vocab/note.yaml +29 -1
- package/esm/vocab/question.yaml +28 -0
- package/esm/vocab/vocab.js +6520 -5326
- package/esm/webfinger/handler.js +27 -9
- package/package.json +1 -1
- package/types/federation/callback.d.ts +9 -0
- package/types/federation/callback.d.ts.map +1 -1
- package/types/federation/middleware.d.ts +10 -1
- package/types/federation/middleware.d.ts.map +1 -1
- package/types/mod.d.ts +2 -1
- package/types/mod.d.ts.map +1 -1
- package/types/vocab/vocab.d.ts +56 -0
- package/types/vocab/vocab.d.ts.map +1 -1
- package/types/webfinger/handler.d.ts +7 -2
- package/types/webfinger/handler.d.ts.map +1 -1
package/CHANGES.md
CHANGED
@@ -8,6 +8,29 @@ Version 0.15.0
|
|
8
8
|
|
9
9
|
To be released.
|
10
10
|
|
11
|
+
- Actors, collections, and objects now can have their URIs that do not consist
|
12
|
+
of a WebFinger username, which means actors can change their fediverse
|
13
|
+
handles.
|
14
|
+
|
15
|
+
- Added `ActorCallbackSetters.mapHandle()` method.
|
16
|
+
- Added `ActorHandleMapper` type.
|
17
|
+
|
18
|
+
- Added `quoteUrl` property to `Article`, `ChatMessage`, `Note`, and
|
19
|
+
`Question` classes in Activity Vocabulary API.
|
20
|
+
|
21
|
+
- Added `Article.quoteUrl` property.
|
22
|
+
- `new Article()` constructor now accepts `quoteUrl` option.
|
23
|
+
- `Article.clone()` method now accepts `quoteUrl` option.
|
24
|
+
- Added `ChatMessage.quoteUrl` property.
|
25
|
+
- `new ChatMessage()` constructor now accepts `quoteUrl` option.
|
26
|
+
- `ChatMessage.clone()` method now accepts `quoteUrl` option.
|
27
|
+
- Added `Note.quoteUrl` property.
|
28
|
+
- `new Note()` constructor now accepts `quoteUrl` option.
|
29
|
+
- `Note.clone()` method now accepts `quoteUrl` option.
|
30
|
+
- Added `Question.quoteUrl` property.
|
31
|
+
- `new Question()` constructor now accepts `quoteUrl` option.
|
32
|
+
- `Question.clone()` method now accepts `quoteUrl` option.
|
33
|
+
|
11
34
|
- Removed `expand` option of `Object.toJsonLd()` method, which was deprecated
|
12
35
|
in version 0.14.0. Use `format: "expand"` option instead.
|
13
36
|
|
@@ -22,6 +45,10 @@ To be released.
|
|
22
45
|
|
23
46
|
- Added `allowPrivateAddress` option to `CreateFederationOptions` interface.
|
24
47
|
|
48
|
+
- Fixed a bug where the WebFinger response had had a `subject` property
|
49
|
+
with an unmatched URI to the requested resource when a non-`acct:` URI
|
50
|
+
was given.
|
51
|
+
|
25
52
|
- Renamed the short option `-c` for `--compact` of `fedify lookup` command to
|
26
53
|
`-C` to avoid conflict with the short option `-c` for `--cache-dir`.
|
27
54
|
|
package/README.md
CHANGED
@@ -37,7 +37,9 @@ If you want to know more about the project, please take a look at the following
|
|
37
37
|
resources:
|
38
38
|
|
39
39
|
- [Installation](https://fedify.dev/install)
|
40
|
-
-
|
40
|
+
- Tutorials:
|
41
|
+
[Learning the basics](https://fedify.dev/tutorial/basics) &
|
42
|
+
[Creating a microblog](https://fedify.dev/tutorial/microblog)
|
41
43
|
- [API reference][JSR]
|
42
44
|
- [Examples](https://github.com/dahlia/fedify/tree/main/examples)
|
43
45
|
|
package/esm/codegen/schema.yaml
CHANGED
@@ -45,6 +45,27 @@ $defs:
|
|
45
45
|
functional:
|
46
46
|
description: *functional-description
|
47
47
|
const: true
|
48
|
+
redundantProperties::
|
49
|
+
description: >-
|
50
|
+
If it's present, those redundant properties are also filled with
|
51
|
+
the same value altogether when the object is serialized into
|
52
|
+
JSON-LD. When it's deserialized from JSON-LD, it tries to
|
53
|
+
parse the values of the specified properties in order.
|
54
|
+
type: array
|
55
|
+
items:
|
56
|
+
type: object
|
57
|
+
properties:
|
58
|
+
uri:
|
59
|
+
description: The qualified URI of the property.
|
60
|
+
type: string
|
61
|
+
format: uri
|
62
|
+
compactName:
|
63
|
+
description: >-
|
64
|
+
The property name used in the compacted JSON-LD document.
|
65
|
+
It is used as the key of the property.
|
66
|
+
type: string
|
67
|
+
required:
|
68
|
+
- uri
|
48
69
|
required:
|
49
70
|
- functional
|
50
71
|
|
@@ -473,6 +473,10 @@ class FederationImpl {
|
|
473
473
|
callbacks.keyPairsDispatcher = dispatcher;
|
474
474
|
return setters;
|
475
475
|
},
|
476
|
+
mapHandle(mapper) {
|
477
|
+
callbacks.handleMapper = mapper;
|
478
|
+
return setters;
|
479
|
+
},
|
476
480
|
authorize(predicate) {
|
477
481
|
callbacks.authorizePredicate = predicate;
|
478
482
|
return setters;
|
package/esm/mod.js
CHANGED
@@ -26,7 +26,8 @@
|
|
26
26
|
* following resources:
|
27
27
|
*
|
28
28
|
* - [GitHub](https://github.com/dahlia/fedify)
|
29
|
-
* - [
|
29
|
+
* - Tutorials: [Learning the basics](https://fedify.dev/tutorial/basics)
|
30
|
+
* & [Creating a microblog](https://fedify.dev/tutorial/microblog)
|
30
31
|
* - [Examples](https://github.com/dahlia/fedify/tree/main/examples)
|
31
32
|
*
|
32
33
|
* [ActivityPub]: https://www.w3.org/TR/activitypub/
|
package/esm/vocab/article.yaml
CHANGED
@@ -9,7 +9,35 @@ defaultContext:
|
|
9
9
|
- "https://www.w3.org/ns/activitystreams"
|
10
10
|
- "https://w3id.org/security/data-integrity/v1"
|
11
11
|
- toot: "http://joinmastodon.org/ns#"
|
12
|
+
misskey: "https://misskey-hub.net/ns#"
|
13
|
+
fedibird: "http://fedibird.com/ns#"
|
12
14
|
sensitive: "as:sensitive"
|
13
15
|
Emoji: "toot:Emoji"
|
14
16
|
Hashtag: "as:Hashtag"
|
15
|
-
|
17
|
+
quoteUrl: "as:quoteUrl"
|
18
|
+
_misskey_quote: "misskey:_misskey_quote"
|
19
|
+
quoteUri: "fedibird:quoteUri"
|
20
|
+
|
21
|
+
properties:
|
22
|
+
- singularName: quoteUrl
|
23
|
+
functional: true
|
24
|
+
compactName: quoteUrl
|
25
|
+
uri: "https://www.w3.org/ns/activitystreams#quoteUrl"
|
26
|
+
redundantProperties:
|
27
|
+
- compactName: _misskey_quote
|
28
|
+
uri: "https://misskey-hub.net/ns#_misskey_quote"
|
29
|
+
- compactName: quoteUri
|
30
|
+
uri: "http://fedibird.com/ns#quoteUri"
|
31
|
+
description: |
|
32
|
+
The URI of the ActivityStreams object that this object quotes.
|
33
|
+
|
34
|
+
This property sets three JSON-LD properties at once under the hood:
|
35
|
+
|
36
|
+
1. https://www.w3.org/ns/activitystreams#quoteUrl
|
37
|
+
2. https://misskey-hub.net/ns#_misskey_quote
|
38
|
+
3. http://fedibird.com/ns#quoteUri
|
39
|
+
|
40
|
+
When a JSON-LD object is parsed, this property is filled with one of
|
41
|
+
the values of those three properties in order.
|
42
|
+
range:
|
43
|
+
- "fedify:url"
|
@@ -14,6 +14,34 @@ defaultContext:
|
|
14
14
|
- "https://www.w3.org/ns/activitystreams"
|
15
15
|
- "https://w3id.org/security/data-integrity/v1"
|
16
16
|
- toot: "http://joinmastodon.org/ns#"
|
17
|
+
misskey: "https://misskey-hub.net/ns#"
|
18
|
+
fedibird: "http://fedibird.com/ns#"
|
17
19
|
Emoji: "toot:Emoji"
|
18
20
|
ChatMessage: "http://litepub.social/ns#ChatMessage"
|
19
|
-
|
21
|
+
quoteUrl: "as:quoteUrl"
|
22
|
+
_misskey_quote: "misskey:_misskey_quote"
|
23
|
+
quoteUri: "fedibird:quoteUri"
|
24
|
+
|
25
|
+
properties:
|
26
|
+
- singularName: quoteUrl
|
27
|
+
functional: true
|
28
|
+
compactName: quoteUrl
|
29
|
+
uri: "https://www.w3.org/ns/activitystreams#quoteUrl"
|
30
|
+
redundantProperties:
|
31
|
+
- compactName: _misskey_quote
|
32
|
+
uri: "https://misskey-hub.net/ns#_misskey_quote"
|
33
|
+
- compactName: quoteUri
|
34
|
+
uri: "http://fedibird.com/ns#quoteUri"
|
35
|
+
description: |
|
36
|
+
The URI of the ActivityStreams object that this object quotes.
|
37
|
+
|
38
|
+
This property sets three JSON-LD properties at once under the hood:
|
39
|
+
|
40
|
+
1. https://www.w3.org/ns/activitystreams#quoteUrl
|
41
|
+
2. https://misskey-hub.net/ns#_misskey_quote
|
42
|
+
3. http://fedibird.com/ns#quoteUri
|
43
|
+
|
44
|
+
When a JSON-LD object is parsed, this property is filled with one of
|
45
|
+
the values of those three properties in order.
|
46
|
+
range:
|
47
|
+
- "fedify:url"
|
package/esm/vocab/note.yaml
CHANGED
@@ -11,7 +11,35 @@ defaultContext:
|
|
11
11
|
- "https://www.w3.org/ns/activitystreams"
|
12
12
|
- "https://w3id.org/security/data-integrity/v1"
|
13
13
|
- toot: "http://joinmastodon.org/ns#"
|
14
|
+
misskey: "https://misskey-hub.net/ns#"
|
15
|
+
fedibird: "http://fedibird.com/ns#"
|
14
16
|
sensitive: "as:sensitive"
|
15
17
|
Emoji: "toot:Emoji"
|
16
18
|
Hashtag: "as:Hashtag"
|
17
|
-
|
19
|
+
quoteUrl: "as:quoteUrl"
|
20
|
+
_misskey_quote: "misskey:_misskey_quote"
|
21
|
+
quoteUri: "fedibird:quoteUri"
|
22
|
+
|
23
|
+
properties:
|
24
|
+
- singularName: quoteUrl
|
25
|
+
functional: true
|
26
|
+
compactName: quoteUrl
|
27
|
+
uri: "https://www.w3.org/ns/activitystreams#quoteUrl"
|
28
|
+
redundantProperties:
|
29
|
+
- compactName: _misskey_quote
|
30
|
+
uri: "https://misskey-hub.net/ns#_misskey_quote"
|
31
|
+
- compactName: quoteUri
|
32
|
+
uri: "http://fedibird.com/ns#quoteUri"
|
33
|
+
description: |
|
34
|
+
The URI of the ActivityStreams object that this object quotes.
|
35
|
+
|
36
|
+
This property sets three JSON-LD properties at once under the hood:
|
37
|
+
|
38
|
+
1. https://www.w3.org/ns/activitystreams#quoteUrl
|
39
|
+
2. https://misskey-hub.net/ns#_misskey_quote
|
40
|
+
3. http://fedibird.com/ns#quoteUri
|
41
|
+
|
42
|
+
When a JSON-LD object is parsed, this property is filled with one of
|
43
|
+
the values of those three properties in order.
|
44
|
+
range:
|
45
|
+
- "fedify:url"
|
package/esm/vocab/question.yaml
CHANGED
@@ -17,10 +17,15 @@ defaultContext:
|
|
17
17
|
- "https://www.w3.org/ns/activitystreams"
|
18
18
|
- "https://w3id.org/security/data-integrity/v1"
|
19
19
|
- toot: "http://joinmastodon.org/ns#"
|
20
|
+
misskey: "https://misskey-hub.net/ns#"
|
21
|
+
fedibird: "http://fedibird.com/ns#"
|
20
22
|
sensitive: "as:sensitive"
|
21
23
|
votersCount: "toot:votersCount"
|
22
24
|
Emoji: "toot:Emoji"
|
23
25
|
Hashtag: "as:Hashtag"
|
26
|
+
quoteUrl: "as:quoteUrl"
|
27
|
+
_misskey_quote: "misskey:_misskey_quote"
|
28
|
+
quoteUri: "fedibird:quoteUri"
|
24
29
|
|
25
30
|
properties:
|
26
31
|
- pluralName: exclusiveOptions
|
@@ -67,3 +72,26 @@ properties:
|
|
67
72
|
been cast (in the case of multiple-choice polls).
|
68
73
|
range:
|
69
74
|
- "http://www.w3.org/2001/XMLSchema#nonNegativeInteger"
|
75
|
+
|
76
|
+
- singularName: quoteUrl
|
77
|
+
functional: true
|
78
|
+
compactName: quoteUrl
|
79
|
+
uri: "https://www.w3.org/ns/activitystreams#quoteUrl"
|
80
|
+
redundantProperties:
|
81
|
+
- compactName: _misskey_quote
|
82
|
+
uri: "https://misskey-hub.net/ns#_misskey_quote"
|
83
|
+
- compactName: quoteUri
|
84
|
+
uri: "http://fedibird.com/ns#quoteUri"
|
85
|
+
description: |
|
86
|
+
The URI of the ActivityStreams object that this object quotes.
|
87
|
+
|
88
|
+
This property sets three JSON-LD properties at once under the hood:
|
89
|
+
|
90
|
+
1. https://www.w3.org/ns/activitystreams#quoteUrl
|
91
|
+
2. https://misskey-hub.net/ns#_misskey_quote
|
92
|
+
3. http://fedibird.com/ns#quoteUri
|
93
|
+
|
94
|
+
When a JSON-LD object is parsed, this property is filled with one of
|
95
|
+
the values of those three properties in order.
|
96
|
+
range:
|
97
|
+
- "fedify:url"
|