@fedify/vocab 2.5.0-dev.2332 → 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.
Files changed (38) hide show
  1. package/deno.json +1 -1
  2. package/dist/mod.cjs +851 -2
  3. package/dist/mod.d.cts +227 -0
  4. package/dist/mod.d.ts +227 -0
  5. package/dist/mod.js +851 -2
  6. package/dist-tests/{actor-DpNkhFU9.mjs → actor-BbIjMjNa.mjs} +2 -2
  7. package/dist-tests/actor.test.mjs +3 -3
  8. package/dist-tests/application.yaml +15 -0
  9. package/dist-tests/{esm-Cncdk-Cm.mjs → esm-rg6f9oLR.mjs} +1 -1
  10. package/dist-tests/gateway.test.mjs +3 -3
  11. package/dist-tests/group.yaml +15 -0
  12. package/dist-tests/license.test.mjs +538 -0
  13. package/dist-tests/link.yaml +25 -0
  14. package/dist-tests/{lookup-CIDHxy5l.mjs → lookup-DKLMyPMJ.mjs} +2 -2
  15. package/dist-tests/lookup.test.mjs +3 -3
  16. package/dist-tests/object.yaml +30 -0
  17. package/dist-tests/organization.yaml +15 -0
  18. package/dist-tests/person.yaml +15 -0
  19. package/dist-tests/portable-lookup.test.mjs +4 -4
  20. package/dist-tests/service.yaml +15 -0
  21. package/dist-tests/signed-representation.test.mjs +1 -1
  22. package/dist-tests/src-DVk5F9Ik.mjs +9 -0
  23. package/dist-tests/translation.test.mjs +3 -6
  24. package/dist-tests/type.test.mjs +1 -1
  25. package/dist-tests/{vocab-EFWWufqL.mjs → vocab-Cg2PG-xH.mjs} +851 -2
  26. package/dist-tests/vocab.test.mjs +9 -3
  27. package/package.json +4 -4
  28. package/src/__snapshots__/vocab.test.ts.snap +480 -33
  29. package/src/application.yaml +15 -0
  30. package/src/group.yaml +15 -0
  31. package/src/license.test.ts +588 -0
  32. package/src/link.yaml +25 -0
  33. package/src/object.yaml +30 -0
  34. package/src/organization.yaml +15 -0
  35. package/src/person.yaml +15 -0
  36. package/src/service.yaml +15 -0
  37. package/src/vocab.test.ts +18 -6
  38. package/LICENSE +0 -20
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "temporal-polyfill";
2
2
  globalThis.addEventListener = () => {};
3
- import { A as Object$1, B as QuoteAuthorization, C as Intent, D as Measure, E as Link, F as Person, G as Tombstone, H as Reject, I as Place, L as PropertyValue, N as OrderedCollectionPage, O as Multikey, P as Organization, R as Proposal, S as Image, T as InteractionRule, U as Service, V as QuoteRequest, W as Source, X as vocab_exports, _ as FeaturedCollection, a as Application, b as Group, d as CryptographicKey, f as Delete, g as FeatureRequest, h as FeatureAuthorization, i as Announce, j as Offer, k as Note, l as Commitment, m as Endpoints, n as Activity, p as Document, r as Agreement, s as Collection, t as Accept, u as Create, v as FeaturedItem, w as InteractionPolicy, x as Hashtag, y as Follow, z as Question } from "./vocab-EFWWufqL.mjs";
4
- import { t as esm_default } from "./esm-Cncdk-Cm.mjs";
3
+ import { A as Object$1, B as QuoteAuthorization, C as Intent, D as Measure, E as Link, F as Person, G as Tombstone, H as Reject, I as Place, L as PropertyValue, N as OrderedCollectionPage, O as Multikey, P as Organization, R as Proposal, S as Image, T as InteractionRule, U as Service, V as QuoteRequest, W as Source, Z as vocab_exports, _ as FeaturedCollection, a as Application, b as Group, d as CryptographicKey, f as Delete, g as FeatureRequest, h as FeatureAuthorization, i as Announce, j as Offer, k as Note, l as Commitment, m as Endpoints, n as Activity, p as Document, r as Agreement, s as Collection, t as Accept, u as Create, v as FeaturedItem, w as InteractionPolicy, x as Hashtag, y as Follow, z as Question } from "./vocab-Cg2PG-xH.mjs";
4
+ import { t as esm_default } from "./esm-rg6f9oLR.mjs";
5
5
  import { t as assertInstanceOf } from "./utils-Df2odC27.mjs";
6
6
  import { mockDocumentLoader, test } from "@fedify/fixture";
7
7
  import { deepStrictEqual, notDeepStrictEqual, ok, rejects, strictEqual, throws } from "node:assert/strict";
@@ -3968,6 +3968,7 @@ const sampleValues = {
3968
3968
  ]),
3969
3969
  "fedify:langTag": new Intl.Locale("en-Latn-US"),
3970
3970
  "fedify:url": new URL("https://fedify.dev/"),
3971
+ "fedify:absoluteIri": new URL("https://creativecommons.org/licenses/by/4.0/"),
3971
3972
  "fedify:gatewayUrl": new URL("https://gateway.example/"),
3972
3973
  "fedify:publicKey": rsaPublicKey.publicKey,
3973
3974
  "fedify:multibaseKey": ed25519PublicKey.publicKey,
@@ -4122,7 +4123,12 @@ for (const typeUri in types) {
4122
4123
  const jsonLd = await instance.toJsonLd({ contextLoader: mockDocumentLoader });
4123
4124
  const defaultContexts = Array.isArray(type.defaultContext) ? type.defaultContext : [type.defaultContext];
4124
4125
  const extraContexts = [...new Set(allProperties.flatMap((property) => property.extraContext == null || defaultContexts.some((context) => context === property.extraContext) ? [] : [property.extraContext]))];
4125
- deepStrictEqual(jsonLd["@context"], extraContexts.length === 0 ? type.defaultContext : [...defaultContexts, ...extraContexts]);
4126
+ if (extraContexts.length === 0) deepStrictEqual(jsonLd["@context"], type.defaultContext);
4127
+ else {
4128
+ const context = jsonLd["@context"];
4129
+ deepStrictEqual(context.slice(0, defaultContexts.length), defaultContexts);
4130
+ deepStrictEqual(context.slice(defaultContexts.length).toSorted(), extraContexts.toSorted());
4131
+ }
4126
4132
  if (type.entity) deepStrictEqual(jsonLd.id, "https://example.com/");
4127
4133
  const restored = await cls.fromJsonLd(jsonLd, {
4128
4134
  documentLoader: mockDocumentLoader,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/vocab",
3
- "version": "2.5.0-dev.2332+d4e3f91f",
3
+ "version": "2.5.0-dev.2355+c92a1cb1",
4
4
  "homepage": "https://fedify.dev/",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,9 +43,9 @@
43
43
  "jsonld": "^9.0.0",
44
44
  "pkijs": "^3.3.3",
45
45
  "temporal-polyfill": "^1.0.1",
46
- "@fedify/vocab-tools": "2.5.0-dev.2332+d4e3f91f",
47
- "@fedify/webfinger": "2.5.0-dev.2332+d4e3f91f",
48
- "@fedify/vocab-runtime": "2.5.0-dev.2332+d4e3f91f"
46
+ "@fedify/webfinger": "2.5.0-dev.2355+c92a1cb1",
47
+ "@fedify/vocab-tools": "2.5.0-dev.2355+c92a1cb1",
48
+ "@fedify/vocab-runtime": "2.5.0-dev.2355+c92a1cb1"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/node": "^24.12.2",