@fedify/fedify 1.2.0-dev.452 → 1.2.0-dev.462

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. package/CHANGES.md +81 -1
  2. package/esm/federation/handler.js +1 -1
  3. package/esm/runtime/contexts.js +3377 -0
  4. package/esm/runtime/docloader.js +4 -3
  5. package/esm/vocab/application.yaml +10 -0
  6. package/esm/vocab/group.yaml +10 -0
  7. package/esm/vocab/lookup.js +1 -1
  8. package/esm/vocab/organization.yaml +10 -0
  9. package/esm/vocab/person.yaml +10 -0
  10. package/esm/vocab/service.yaml +10 -0
  11. package/esm/vocab/update.yaml +17 -9
  12. package/esm/vocab/vocab.js +433 -9
  13. package/package.json +1 -1
  14. package/types/deps/jsr.io/@std/async/{1.0.6 → 1.0.7}/delay.d.ts.map +1 -1
  15. package/types/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/common.d.ts.map +1 -1
  16. package/types/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/encoding.d.ts.map +1 -1
  17. package/types/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/language.d.ts.map +1 -1
  18. package/types/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/media_type.d.ts.map +1 -1
  19. package/types/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/negotiation.d.ts.map +1 -1
  20. package/types/runtime/contexts.d.ts.map +1 -1
  21. package/types/runtime/docloader.d.ts.map +1 -1
  22. package/types/vocab/vocab.d.ts +25 -0
  23. package/types/vocab/vocab.d.ts.map +1 -1
  24. /package/esm/deps/jsr.io/@std/async/{1.0.6 → 1.0.7}/delay.js +0 -0
  25. /package/esm/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/common.js +0 -0
  26. /package/esm/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/encoding.js +0 -0
  27. /package/esm/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/language.js +0 -0
  28. /package/esm/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/media_type.js +0 -0
  29. /package/esm/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/negotiation.js +0 -0
  30. /package/types/deps/jsr.io/@std/async/{1.0.6 → 1.0.7}/delay.d.ts +0 -0
  31. /package/types/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/common.d.ts +0 -0
  32. /package/types/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/encoding.d.ts +0 -0
  33. /package/types/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/language.d.ts +0 -0
  34. /package/types/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/media_type.d.ts +0 -0
  35. /package/types/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/negotiation.d.ts +0 -0
@@ -74,13 +74,14 @@ async function getRemoteDocument(url, response, fetch) {
74
74
  else {
75
75
  const entries = link.getByRel("alternate");
76
76
  for (const [uri, params] of entries) {
77
+ const altUri = new URL(uri, docUrl);
77
78
  if ("type" in params &&
78
79
  (params.type === "application/activity+json" ||
79
80
  params.type === "application/ld+json" ||
80
81
  params.type.startsWith("application/ld+json;")) &&
81
- new URL(uri).href !== docUrl.href) {
82
- logger.debug("Found alternate document: {alternateUrl} from {url}", { alternateUrl: uri, url: documentUrl });
83
- return await fetch(uri);
82
+ altUri.href !== docUrl.href) {
83
+ logger.debug("Found alternate document: {alternateUrl} from {url}", { alternateUrl: altUri.href, url: documentUrl });
84
+ return await fetch(altUri.href);
84
85
  }
85
86
  }
86
87
  }
@@ -33,6 +33,7 @@ defaultContext:
33
33
  PropertyValue: "schema:PropertyValue"
34
34
  value: "schema:value"
35
35
  misskey: "https://misskey-hub.net/ns#"
36
+ _misskey_followedMessage: "misskey:_misskey_followedMessage"
36
37
  isCat: "misskey:isCat"
37
38
 
38
39
  properties:
@@ -298,6 +299,15 @@ properties:
298
299
  range:
299
300
  - "https://www.w3.org/ns/did#Service"
300
301
 
302
+ - singularName: followedMessage
303
+ functional: true
304
+ compactName: _misskey_followedMessage
305
+ uri: "https://misskey-hub.net/ns#_misskey_followedMessage"
306
+ description: |
307
+ This value is used for `Actor` type objects to show message on followed.
308
+ range:
309
+ - "http://www.w3.org/2001/XMLSchema#string"
310
+
301
311
  - singularName: cat
302
312
  functional: true
303
313
  compactName: isCat
@@ -33,6 +33,7 @@ defaultContext:
33
33
  PropertyValue: "schema:PropertyValue"
34
34
  value: "schema:value"
35
35
  misskey: "https://misskey-hub.net/ns#"
36
+ _misskey_followedMessage: "misskey:_misskey_followedMessage"
36
37
  isCat: "misskey:isCat"
37
38
 
38
39
  properties:
@@ -298,6 +299,15 @@ properties:
298
299
  range:
299
300
  - "https://www.w3.org/ns/did#Service"
300
301
 
302
+ - singularName: followedMessage
303
+ functional: true
304
+ compactName: _misskey_followedMessage
305
+ uri: "https://misskey-hub.net/ns#_misskey_followedMessage"
306
+ description: |
307
+ This value is used for `Actor` type objects to show message on followed.
308
+ range:
309
+ - "http://www.w3.org/2001/XMLSchema#string"
310
+
301
311
  - singularName: cat
302
312
  functional: true
303
313
  compactName: isCat
@@ -1,6 +1,6 @@
1
1
  import * as dntShim from "../_dnt.shims.js";
2
2
  import { getLogger } from "@logtape/logtape";
3
- import { delay } from "../deps/jsr.io/@std/async/1.0.6/delay.js";
3
+ import { delay } from "../deps/jsr.io/@std/async/1.0.7/delay.js";
4
4
  import { fetchDocumentLoader, } from "../runtime/docloader.js";
5
5
  import { lookupWebFinger } from "../webfinger/lookup.js";
6
6
  import { Object } from "./vocab.js";
@@ -33,6 +33,7 @@ defaultContext:
33
33
  PropertyValue: "schema:PropertyValue"
34
34
  value: "schema:value"
35
35
  misskey: "https://misskey-hub.net/ns#"
36
+ _misskey_followedMessage: "misskey:_misskey_followedMessage"
36
37
  isCat: "misskey:isCat"
37
38
 
38
39
  properties:
@@ -298,6 +299,15 @@ properties:
298
299
  range:
299
300
  - "https://www.w3.org/ns/did#Service"
300
301
 
302
+ - singularName: followedMessage
303
+ functional: true
304
+ compactName: _misskey_followedMessage
305
+ uri: "https://misskey-hub.net/ns#_misskey_followedMessage"
306
+ description: |
307
+ This value is used for `Actor` type objects to show message on followed.
308
+ range:
309
+ - "http://www.w3.org/2001/XMLSchema#string"
310
+
301
311
  - singularName: cat
302
312
  functional: true
303
313
  compactName: isCat
@@ -33,6 +33,7 @@ defaultContext:
33
33
  PropertyValue: "schema:PropertyValue"
34
34
  value: "schema:value"
35
35
  misskey: "https://misskey-hub.net/ns#"
36
+ _misskey_followedMessage: "misskey:_misskey_followedMessage"
36
37
  isCat: "misskey:isCat"
37
38
 
38
39
  properties:
@@ -298,6 +299,15 @@ properties:
298
299
  range:
299
300
  - "https://www.w3.org/ns/did#Service"
300
301
 
302
+ - singularName: followedMessage
303
+ functional: true
304
+ compactName: _misskey_followedMessage
305
+ uri: "https://misskey-hub.net/ns#_misskey_followedMessage"
306
+ description: |
307
+ This value is used for `Actor` type objects to show message on followed.
308
+ range:
309
+ - "http://www.w3.org/2001/XMLSchema#string"
310
+
301
311
  - singularName: cat
302
312
  functional: true
303
313
  compactName: isCat
@@ -33,6 +33,7 @@ defaultContext:
33
33
  PropertyValue: "schema:PropertyValue"
34
34
  value: "schema:value"
35
35
  misskey: "https://misskey-hub.net/ns#"
36
+ _misskey_followedMessage: "misskey:_misskey_followedMessage"
36
37
  isCat: "misskey:isCat"
37
38
 
38
39
  properties:
@@ -298,6 +299,15 @@ properties:
298
299
  range:
299
300
  - "https://www.w3.org/ns/did#Service"
300
301
 
302
+ - singularName: followedMessage
303
+ functional: true
304
+ compactName: _misskey_followedMessage
305
+ uri: "https://misskey-hub.net/ns#_misskey_followedMessage"
306
+ description: |
307
+ This value is used for `Actor` type objects to show message on followed.
308
+ range:
309
+ - "http://www.w3.org/2001/XMLSchema#string"
310
+
301
311
  - singularName: cat
302
312
  functional: true
303
313
  compactName: isCat
@@ -14,14 +14,16 @@ defaultContext:
14
14
  - "https://w3id.org/identity/v1"
15
15
  - "https://www.w3.org/ns/activitystreams"
16
16
  - "https://w3id.org/security/data-integrity/v1"
17
- - toot: "http://joinmastodon.org/ns#"
18
- schema: "http://schema.org#"
19
- misskey: "https://misskey-hub.net/ns#"
20
- fedibird: "http://fedibird.com/ns#"
21
- PropertyValue: "schema:PropertyValue"
22
- value: "schema:value"
17
+ - alsoKnownAs:
18
+ "@id": "as:alsoKnownAs"
19
+ "@type": "@id"
20
+ manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
23
21
  sensitive: "as:sensitive"
24
- votersCount: "toot:votersCount"
22
+ movedTo:
23
+ "@id": "as:movedTo"
24
+ "@type": "@id"
25
+ quoteUrl: "as:quoteUrl"
26
+ toot: "http://joinmastodon.org/ns#"
25
27
  featured:
26
28
  "@id": "toot:featured"
27
29
  "@type": "@id"
@@ -32,11 +34,17 @@ defaultContext:
32
34
  suspended: "toot:suspended"
33
35
  memorial: "toot:memorial"
34
36
  indexable: "toot:indexable"
37
+ votersCount: "toot:votersCount"
35
38
  Emoji: "toot:Emoji"
36
39
  Hashtag: "as:Hashtag"
40
+ schema: "http://schema.org#"
41
+ PropertyValue: "schema:PropertyValue"
42
+ value: "schema:value"
37
43
  ChatMessage: "http://litepub.social/ns#ChatMessage"
38
- quoteUrl: "as:quoteUrl"
39
- _misskey_quote: "misskey:_misskey_quote"
44
+ fedibird: "http://fedibird.com/ns#"
40
45
  quoteUri: "fedibird:quoteUri"
46
+ misskey: "https://misskey-hub.net/ns#"
47
+ _misskey_quote: "misskey:_misskey_quote"
48
+ _misskey_followedMessage: "misskey:_misskey_followedMessage"
41
49
  isCat: "misskey:isCat"
42
50
  properties: []