@fedify/vocab 2.5.0-dev.2339 → 2.5.0-dev.2355
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 +851 -2
- package/dist/mod.d.cts +227 -0
- package/dist/mod.d.ts +227 -0
- package/dist/mod.js +851 -2
- package/dist-tests/{actor-qViYned_.mjs → actor-BbIjMjNa.mjs} +2 -2
- package/dist-tests/actor.test.mjs +3 -3
- package/dist-tests/application.yaml +15 -0
- package/dist-tests/{esm-Cncdk-Cm.mjs → esm-rg6f9oLR.mjs} +1 -1
- package/dist-tests/gateway.test.mjs +3 -3
- package/dist-tests/group.yaml +15 -0
- package/dist-tests/license.test.mjs +538 -0
- package/dist-tests/link.yaml +25 -0
- package/dist-tests/{lookup-DHfL6oZO.mjs → lookup-DKLMyPMJ.mjs} +2 -2
- package/dist-tests/lookup.test.mjs +3 -3
- package/dist-tests/object.yaml +30 -0
- package/dist-tests/organization.yaml +15 -0
- package/dist-tests/person.yaml +15 -0
- package/dist-tests/portable-lookup.test.mjs +4 -4
- package/dist-tests/service.yaml +15 -0
- package/dist-tests/signed-representation.test.mjs +1 -1
- package/dist-tests/src-DVk5F9Ik.mjs +9 -0
- package/dist-tests/translation.test.mjs +3 -6
- package/dist-tests/type.test.mjs +1 -1
- package/dist-tests/{vocab-EFWWufqL.mjs → vocab-Cg2PG-xH.mjs} +851 -2
- package/dist-tests/vocab.test.mjs +9 -3
- package/package.json +4 -4
- package/src/__snapshots__/vocab.test.ts.snap +480 -33
- package/src/application.yaml +15 -0
- package/src/group.yaml +15 -0
- package/src/license.test.ts +588 -0
- package/src/link.yaml +25 -0
- package/src/object.yaml +30 -0
- package/src/organization.yaml +15 -0
- package/src/person.yaml +15 -0
- package/src/service.yaml +15 -0
- package/src/vocab.test.ts +18 -6
- package/LICENSE +0 -20
package/src/organization.yaml
CHANGED
|
@@ -351,3 +351,18 @@ properties:
|
|
|
351
351
|
attached in some clients.
|
|
352
352
|
range:
|
|
353
353
|
- "http://www.w3.org/2001/XMLSchema#boolean"
|
|
354
|
+
|
|
355
|
+
- singularName: preferredLicense
|
|
356
|
+
functional: true
|
|
357
|
+
compactName: preferredLicense
|
|
358
|
+
uri: "https://w3id.org/fep/6757#preferredLicense"
|
|
359
|
+
extraContext: "https://w3id.org/fep/6757"
|
|
360
|
+
description: |
|
|
361
|
+
The URI of the license this actor prefers for the new objects it creates,
|
|
362
|
+
as defined by [FEP-6757](https://w3id.org/fep/6757). A client can use it
|
|
363
|
+
as the default `license` of a new object and let the user choose another.
|
|
364
|
+
|
|
365
|
+
This is not a fallback license: an object without its own `license` is not
|
|
366
|
+
licensed under its author's preferred license.
|
|
367
|
+
range:
|
|
368
|
+
- "fedify:absoluteIri"
|
package/src/person.yaml
CHANGED
|
@@ -351,3 +351,18 @@ properties:
|
|
|
351
351
|
attached in some clients.
|
|
352
352
|
range:
|
|
353
353
|
- "http://www.w3.org/2001/XMLSchema#boolean"
|
|
354
|
+
|
|
355
|
+
- singularName: preferredLicense
|
|
356
|
+
functional: true
|
|
357
|
+
compactName: preferredLicense
|
|
358
|
+
uri: "https://w3id.org/fep/6757#preferredLicense"
|
|
359
|
+
extraContext: "https://w3id.org/fep/6757"
|
|
360
|
+
description: |
|
|
361
|
+
The URI of the license this actor prefers for the new objects it creates,
|
|
362
|
+
as defined by [FEP-6757](https://w3id.org/fep/6757). A client can use it
|
|
363
|
+
as the default `license` of a new object and let the user choose another.
|
|
364
|
+
|
|
365
|
+
This is not a fallback license: an object without its own `license` is not
|
|
366
|
+
licensed under its author's preferred license.
|
|
367
|
+
range:
|
|
368
|
+
- "fedify:absoluteIri"
|
package/src/service.yaml
CHANGED
|
@@ -351,3 +351,18 @@ properties:
|
|
|
351
351
|
attached in some clients.
|
|
352
352
|
range:
|
|
353
353
|
- "http://www.w3.org/2001/XMLSchema#boolean"
|
|
354
|
+
|
|
355
|
+
- singularName: preferredLicense
|
|
356
|
+
functional: true
|
|
357
|
+
compactName: preferredLicense
|
|
358
|
+
uri: "https://w3id.org/fep/6757#preferredLicense"
|
|
359
|
+
extraContext: "https://w3id.org/fep/6757"
|
|
360
|
+
description: |
|
|
361
|
+
The URI of the license this actor prefers for the new objects it creates,
|
|
362
|
+
as defined by [FEP-6757](https://w3id.org/fep/6757). A client can use it
|
|
363
|
+
as the default `license` of a new object and let the user choose another.
|
|
364
|
+
|
|
365
|
+
This is not a fallback license: an object without its own `license` is not
|
|
366
|
+
licensed under its author's preferred license.
|
|
367
|
+
range:
|
|
368
|
+
- "fedify:absoluteIri"
|
package/src/vocab.test.ts
CHANGED
|
@@ -5852,6 +5852,9 @@ const sampleValues: Record<string, any> = {
|
|
|
5852
5852
|
]),
|
|
5853
5853
|
"fedify:langTag": new Intl.Locale("en-Latn-US"),
|
|
5854
5854
|
"fedify:url": new URL("https://fedify.dev/"),
|
|
5855
|
+
"fedify:absoluteIri": new URL(
|
|
5856
|
+
"https://creativecommons.org/licenses/by/4.0/",
|
|
5857
|
+
),
|
|
5855
5858
|
"fedify:gatewayUrl": new URL("https://gateway.example/"),
|
|
5856
5859
|
"fedify:publicKey": rsaPublicKey.publicKey,
|
|
5857
5860
|
"fedify:multibaseKey": ed25519PublicKey.publicKey,
|
|
@@ -6221,12 +6224,21 @@ for (const typeUri in types) {
|
|
|
6221
6224
|
),
|
|
6222
6225
|
),
|
|
6223
6226
|
];
|
|
6224
|
-
|
|
6225
|
-
jsonLd["@context"],
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6227
|
+
if (extraContexts.length === 0) {
|
|
6228
|
+
deepStrictEqual(jsonLd["@context"], type.defaultContext);
|
|
6229
|
+
} else {
|
|
6230
|
+
// Extra contexts follow the default ones in the order their terms are
|
|
6231
|
+
// found in the compacted document, not in the property order:
|
|
6232
|
+
const context = jsonLd["@context"] as unknown[];
|
|
6233
|
+
deepStrictEqual(
|
|
6234
|
+
context.slice(0, defaultContexts.length),
|
|
6235
|
+
defaultContexts,
|
|
6236
|
+
);
|
|
6237
|
+
deepStrictEqual(
|
|
6238
|
+
context.slice(defaultContexts.length).toSorted(),
|
|
6239
|
+
extraContexts.toSorted(),
|
|
6240
|
+
);
|
|
6241
|
+
}
|
|
6230
6242
|
if (type.entity) deepStrictEqual(jsonLd.id, "https://example.com/");
|
|
6231
6243
|
const restored = await cls.fromJsonLd(jsonLd, {
|
|
6232
6244
|
documentLoader: mockDocumentLoader,
|
package/LICENSE
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright 2024–2026 Hong Minhee
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
-
the Software without restriction, including without limitation the rights to
|
|
8
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
-
subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|