@fedify/vocab 2.4.0-dev.1567 → 2.4.0-dev.1570
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/deno.json +1 -1
- package/dist/mod.cjs +9909 -13825
- package/dist/mod.d.cts +676 -1629
- package/dist/mod.d.ts +676 -1629
- package/dist/mod.js +9911 -13823
- package/dist-tests/{actor-CrOFIIiE.mjs → actor-BTMC-aMT.mjs} +2 -2
- package/dist-tests/actor.test.mjs +2 -2
- package/dist-tests/application.yaml +0 -13
- package/dist-tests/group.yaml +0 -13
- package/dist-tests/interactionpolicy.yaml +1 -16
- package/dist-tests/lookup.test.mjs +5 -7
- package/dist-tests/organization.yaml +0 -13
- package/dist-tests/person.yaml +0 -13
- package/dist-tests/service.yaml +0 -13
- package/dist-tests/type.test.mjs +1 -1
- package/dist-tests/{vocab-DOHLQ4UQ.mjs → vocab-XnSGFOqq.mjs} +9908 -13822
- package/dist-tests/vocab.test.mjs +1 -986
- package/package.json +4 -4
- package/src/__snapshots__/vocab.test.ts.snap +0 -609
- package/src/application.yaml +0 -13
- package/src/group.yaml +0 -13
- package/src/interactionpolicy.yaml +1 -16
- package/src/lookup.ts +2 -6
- package/src/organization.yaml +0 -13
- package/src/person.yaml +0 -13
- package/src/service.yaml +0 -13
- package/src/vocab.test.ts +121 -1539
- package/dist-tests/featureauthorization.yaml +0 -33
- package/dist-tests/featuredcollection.yaml +0 -41
- package/dist-tests/featureditem.yaml +0 -34
- package/dist-tests/featurerequest.yaml +0 -21
- package/src/featureauthorization.yaml +0 -33
- package/src/featuredcollection.yaml +0 -41
- package/src/featureditem.yaml +0 -34
- package/src/featurerequest.yaml +0 -21
package/src/application.yaml
CHANGED
|
@@ -12,13 +12,9 @@ defaultContext:
|
|
|
12
12
|
- "https://www.w3.org/ns/did/v1"
|
|
13
13
|
- "https://w3id.org/security/multikey/v1"
|
|
14
14
|
- "https://gotosocial.org/ns"
|
|
15
|
-
- "https://w3id.org/fep/7aa9"
|
|
16
15
|
- alsoKnownAs:
|
|
17
16
|
"@id": "as:alsoKnownAs"
|
|
18
17
|
"@type": "@id"
|
|
19
|
-
featuredCollections:
|
|
20
|
-
"@id": "https://w3id.org/fep/7aa9#featuredCollections"
|
|
21
|
-
"@type": "@id"
|
|
22
18
|
manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
|
|
23
19
|
movedTo:
|
|
24
20
|
"@id": "as:movedTo"
|
|
@@ -200,15 +196,6 @@ properties:
|
|
|
200
196
|
range:
|
|
201
197
|
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
202
198
|
|
|
203
|
-
- singularName: featuredCollections
|
|
204
|
-
functional: true
|
|
205
|
-
compactName: featuredCollections
|
|
206
|
-
uri: "https://w3id.org/fep/7aa9#featuredCollections"
|
|
207
|
-
description: |
|
|
208
|
-
A collection of {@link FeaturedCollection}s created by this actor.
|
|
209
|
-
range:
|
|
210
|
-
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
211
|
-
|
|
212
199
|
- pluralName: streams
|
|
213
200
|
singularName: stream
|
|
214
201
|
singularAccessor: false
|
package/src/group.yaml
CHANGED
|
@@ -12,13 +12,9 @@ defaultContext:
|
|
|
12
12
|
- "https://www.w3.org/ns/did/v1"
|
|
13
13
|
- "https://w3id.org/security/multikey/v1"
|
|
14
14
|
- "https://gotosocial.org/ns"
|
|
15
|
-
- "https://w3id.org/fep/7aa9"
|
|
16
15
|
- alsoKnownAs:
|
|
17
16
|
"@id": "as:alsoKnownAs"
|
|
18
17
|
"@type": "@id"
|
|
19
|
-
featuredCollections:
|
|
20
|
-
"@id": "https://w3id.org/fep/7aa9#featuredCollections"
|
|
21
|
-
"@type": "@id"
|
|
22
18
|
manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
|
|
23
19
|
movedTo:
|
|
24
20
|
"@id": "as:movedTo"
|
|
@@ -200,15 +196,6 @@ properties:
|
|
|
200
196
|
range:
|
|
201
197
|
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
202
198
|
|
|
203
|
-
- singularName: featuredCollections
|
|
204
|
-
functional: true
|
|
205
|
-
compactName: featuredCollections
|
|
206
|
-
uri: "https://w3id.org/fep/7aa9#featuredCollections"
|
|
207
|
-
description: |
|
|
208
|
-
A collection of {@link FeaturedCollection}s created by this actor.
|
|
209
|
-
range:
|
|
210
|
-
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
211
|
-
|
|
212
199
|
- pluralName: streams
|
|
213
200
|
singularName: stream
|
|
214
201
|
singularAccessor: false
|
|
@@ -12,24 +12,9 @@ description: |
|
|
|
12
12
|
|
|
13
13
|
See [GoToSocial interaction controls](https://docs.gotosocial.org/en/latest/federation/interaction_controls/)
|
|
14
14
|
for details.
|
|
15
|
-
defaultContext:
|
|
16
|
-
- "https://gotosocial.org/ns"
|
|
17
|
-
- "https://w3id.org/fep/7aa9"
|
|
15
|
+
defaultContext: "https://gotosocial.org/ns"
|
|
18
16
|
|
|
19
17
|
properties:
|
|
20
|
-
- singularName: canFeature
|
|
21
|
-
functional: true
|
|
22
|
-
compactName: canFeature
|
|
23
|
-
uri: "https://w3id.org/fep/7aa9#canFeature"
|
|
24
|
-
untyped: true
|
|
25
|
-
description: |
|
|
26
|
-
The sub-policy specifying who can feature the actor in a
|
|
27
|
-
{@link FeaturedCollection}.
|
|
28
|
-
|
|
29
|
-
See [FEP-7aa9](https://w3id.org/fep/7aa9) for details.
|
|
30
|
-
range:
|
|
31
|
-
- "https://gotosocial.org/ns#InteractionRule"
|
|
32
|
-
|
|
33
18
|
- singularName: canLike
|
|
34
19
|
functional: true
|
|
35
20
|
compactName: canLike
|
package/src/lookup.ts
CHANGED
|
@@ -2,8 +2,6 @@ import type { GetUserAgentOptions } from "@fedify/vocab-runtime";
|
|
|
2
2
|
import {
|
|
3
3
|
type DocumentLoader,
|
|
4
4
|
getDocumentLoader,
|
|
5
|
-
haveSameIriOrigin,
|
|
6
|
-
parseIri,
|
|
7
5
|
type RemoteDocument,
|
|
8
6
|
} from "@fedify/vocab-runtime";
|
|
9
7
|
import { lookupWebFinger } from "@fedify/webfinger";
|
|
@@ -314,14 +312,12 @@ async function lookupObjectInternal(
|
|
|
314
312
|
}
|
|
315
313
|
if (remoteDoc == null) return null;
|
|
316
314
|
let object: Object;
|
|
317
|
-
let documentUrl: URL;
|
|
318
315
|
try {
|
|
319
|
-
documentUrl = parseIri(remoteDoc.documentUrl);
|
|
320
316
|
object = await Object.fromJsonLd(remoteDoc.document, {
|
|
321
317
|
documentLoader,
|
|
322
318
|
contextLoader: options.contextLoader,
|
|
323
319
|
tracerProvider: options.tracerProvider,
|
|
324
|
-
baseUrl: documentUrl,
|
|
320
|
+
baseUrl: new URL(remoteDoc.documentUrl),
|
|
325
321
|
});
|
|
326
322
|
} catch (error) {
|
|
327
323
|
if (error instanceof TypeError) {
|
|
@@ -335,7 +331,7 @@ async function lookupObjectInternal(
|
|
|
335
331
|
}
|
|
336
332
|
if (
|
|
337
333
|
options.crossOrigin !== "trust" && object.id != null &&
|
|
338
|
-
|
|
334
|
+
object.id.origin !== new URL(remoteDoc.documentUrl).origin
|
|
339
335
|
) {
|
|
340
336
|
if (options.crossOrigin === "throw") {
|
|
341
337
|
throw new Error(
|
package/src/organization.yaml
CHANGED
|
@@ -12,13 +12,9 @@ defaultContext:
|
|
|
12
12
|
- "https://www.w3.org/ns/did/v1"
|
|
13
13
|
- "https://w3id.org/security/multikey/v1"
|
|
14
14
|
- "https://gotosocial.org/ns"
|
|
15
|
-
- "https://w3id.org/fep/7aa9"
|
|
16
15
|
- alsoKnownAs:
|
|
17
16
|
"@id": "as:alsoKnownAs"
|
|
18
17
|
"@type": "@id"
|
|
19
|
-
featuredCollections:
|
|
20
|
-
"@id": "https://w3id.org/fep/7aa9#featuredCollections"
|
|
21
|
-
"@type": "@id"
|
|
22
18
|
manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
|
|
23
19
|
movedTo:
|
|
24
20
|
"@id": "as:movedTo"
|
|
@@ -200,15 +196,6 @@ properties:
|
|
|
200
196
|
range:
|
|
201
197
|
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
202
198
|
|
|
203
|
-
- singularName: featuredCollections
|
|
204
|
-
functional: true
|
|
205
|
-
compactName: featuredCollections
|
|
206
|
-
uri: "https://w3id.org/fep/7aa9#featuredCollections"
|
|
207
|
-
description: |
|
|
208
|
-
A collection of {@link FeaturedCollection}s created by this actor.
|
|
209
|
-
range:
|
|
210
|
-
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
211
|
-
|
|
212
199
|
- pluralName: streams
|
|
213
200
|
singularName: stream
|
|
214
201
|
singularAccessor: false
|
package/src/person.yaml
CHANGED
|
@@ -12,13 +12,9 @@ defaultContext:
|
|
|
12
12
|
- "https://www.w3.org/ns/did/v1"
|
|
13
13
|
- "https://w3id.org/security/multikey/v1"
|
|
14
14
|
- "https://gotosocial.org/ns"
|
|
15
|
-
- "https://w3id.org/fep/7aa9"
|
|
16
15
|
- alsoKnownAs:
|
|
17
16
|
"@id": "as:alsoKnownAs"
|
|
18
17
|
"@type": "@id"
|
|
19
|
-
featuredCollections:
|
|
20
|
-
"@id": "https://w3id.org/fep/7aa9#featuredCollections"
|
|
21
|
-
"@type": "@id"
|
|
22
18
|
manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
|
|
23
19
|
movedTo:
|
|
24
20
|
"@id": "as:movedTo"
|
|
@@ -200,15 +196,6 @@ properties:
|
|
|
200
196
|
range:
|
|
201
197
|
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
202
198
|
|
|
203
|
-
- singularName: featuredCollections
|
|
204
|
-
functional: true
|
|
205
|
-
compactName: featuredCollections
|
|
206
|
-
uri: "https://w3id.org/fep/7aa9#featuredCollections"
|
|
207
|
-
description: |
|
|
208
|
-
A collection of {@link FeaturedCollection}s created by this actor.
|
|
209
|
-
range:
|
|
210
|
-
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
211
|
-
|
|
212
199
|
- pluralName: streams
|
|
213
200
|
singularName: stream
|
|
214
201
|
singularAccessor: false
|
package/src/service.yaml
CHANGED
|
@@ -12,13 +12,9 @@ defaultContext:
|
|
|
12
12
|
- "https://www.w3.org/ns/did/v1"
|
|
13
13
|
- "https://w3id.org/security/multikey/v1"
|
|
14
14
|
- "https://gotosocial.org/ns"
|
|
15
|
-
- "https://w3id.org/fep/7aa9"
|
|
16
15
|
- alsoKnownAs:
|
|
17
16
|
"@id": "as:alsoKnownAs"
|
|
18
17
|
"@type": "@id"
|
|
19
|
-
featuredCollections:
|
|
20
|
-
"@id": "https://w3id.org/fep/7aa9#featuredCollections"
|
|
21
|
-
"@type": "@id"
|
|
22
18
|
manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
|
|
23
19
|
movedTo:
|
|
24
20
|
"@id": "as:movedTo"
|
|
@@ -200,15 +196,6 @@ properties:
|
|
|
200
196
|
range:
|
|
201
197
|
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
202
198
|
|
|
203
|
-
- singularName: featuredCollections
|
|
204
|
-
functional: true
|
|
205
|
-
compactName: featuredCollections
|
|
206
|
-
uri: "https://w3id.org/fep/7aa9#featuredCollections"
|
|
207
|
-
description: |
|
|
208
|
-
A collection of {@link FeaturedCollection}s created by this actor.
|
|
209
|
-
range:
|
|
210
|
-
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
211
|
-
|
|
212
199
|
- pluralName: streams
|
|
213
200
|
singularName: stream
|
|
214
201
|
singularAccessor: false
|