@fedify/vocab-runtime 2.0.12 → 2.0.14

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/vocab-runtime",
3
- "version": "2.0.12",
3
+ "version": "2.0.14",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./src/mod.ts",
package/dist/mod.cjs CHANGED
@@ -13,6 +13,36 @@ let node_crypto = require("node:crypto");
13
13
  let pkijs = require("pkijs");
14
14
  let _multiformats_base_x = require("@multiformats/base-x");
15
15
  _multiformats_base_x = require_chunk.__toESM(_multiformats_base_x);
16
+ //#region src/contexts/join-lemmy.json
17
+ var join_lemmy_default = { "@context": ["https://w3id.org/security/v1", {
18
+ "as": "https://www.w3.org/ns/activitystreams#",
19
+ "lemmy": "https://join-lemmy.org/ns#",
20
+ "litepub": "http://litepub.social/ns#",
21
+ "pt": "https://joinpeertube.org/ns#",
22
+ "sc": "http://schema.org/",
23
+ "mastodon": "http://joinmastodon.org/ns#",
24
+ "ChatMessage": "litepub:ChatMessage",
25
+ "commentsEnabled": "pt:commentsEnabled",
26
+ "sensitive": "as:sensitive",
27
+ "matrixUserId": "lemmy:matrixUserId",
28
+ "postingRestrictedToMods": "lemmy:postingRestrictedToMods",
29
+ "removeData": "lemmy:removeData",
30
+ "stickied": "lemmy:stickied",
31
+ "moderators": {
32
+ "@type": "@id",
33
+ "@id": "lemmy:moderators"
34
+ },
35
+ "expires": "as:endTime",
36
+ "distinguished": "lemmy:distinguished",
37
+ "language": "sc:inLanguage",
38
+ "identifier": "sc:identifier",
39
+ "Hashtag": "as:Hashtag",
40
+ "featured": {
41
+ "@type": "@id",
42
+ "@id": "mastodon:featured"
43
+ }
44
+ }] };
45
+ //#endregion
16
46
  //#region src/contexts.ts
17
47
  const preloadedContexts = {
18
48
  "https://www.w3.org/ns/activitystreams": { "@context": {
@@ -4233,6 +4263,7 @@ const preloadedContexts = {
4233
4263
  "@type": "@id"
4234
4264
  }
4235
4265
  } },
4266
+ "https://join-lemmy.org/context.json": join_lemmy_default,
4236
4267
  "http://joinmastodon.org/ns": { "@context": {
4237
4268
  "toot": "http://joinmastodon.org/ns#",
4238
4269
  "Emoji": "toot:Emoji",
@@ -4263,7 +4294,7 @@ const preloadedContexts = {
4263
4294
  //#endregion
4264
4295
  //#region deno.json
4265
4296
  var name = "@fedify/vocab-runtime";
4266
- var version = "2.0.12";
4297
+ var version = "2.0.14";
4267
4298
  //#endregion
4268
4299
  //#region src/link.ts
4269
4300
  const parametersNeedLowerCase = ["rel", "type"];
package/dist/mod.js CHANGED
@@ -9,6 +9,36 @@ import { decodeBase64Url } from "byte-encodings/base64url";
9
9
  import { createPublicKey } from "node:crypto";
10
10
  import { PublicKeyInfo } from "pkijs";
11
11
  import baseX from "@multiformats/base-x";
12
+ //#region src/contexts/join-lemmy.json
13
+ var join_lemmy_default = { "@context": ["https://w3id.org/security/v1", {
14
+ "as": "https://www.w3.org/ns/activitystreams#",
15
+ "lemmy": "https://join-lemmy.org/ns#",
16
+ "litepub": "http://litepub.social/ns#",
17
+ "pt": "https://joinpeertube.org/ns#",
18
+ "sc": "http://schema.org/",
19
+ "mastodon": "http://joinmastodon.org/ns#",
20
+ "ChatMessage": "litepub:ChatMessage",
21
+ "commentsEnabled": "pt:commentsEnabled",
22
+ "sensitive": "as:sensitive",
23
+ "matrixUserId": "lemmy:matrixUserId",
24
+ "postingRestrictedToMods": "lemmy:postingRestrictedToMods",
25
+ "removeData": "lemmy:removeData",
26
+ "stickied": "lemmy:stickied",
27
+ "moderators": {
28
+ "@type": "@id",
29
+ "@id": "lemmy:moderators"
30
+ },
31
+ "expires": "as:endTime",
32
+ "distinguished": "lemmy:distinguished",
33
+ "language": "sc:inLanguage",
34
+ "identifier": "sc:identifier",
35
+ "Hashtag": "as:Hashtag",
36
+ "featured": {
37
+ "@type": "@id",
38
+ "@id": "mastodon:featured"
39
+ }
40
+ }] };
41
+ //#endregion
12
42
  //#region src/contexts.ts
13
43
  const preloadedContexts = {
14
44
  "https://www.w3.org/ns/activitystreams": { "@context": {
@@ -4229,6 +4259,7 @@ const preloadedContexts = {
4229
4259
  "@type": "@id"
4230
4260
  }
4231
4261
  } },
4262
+ "https://join-lemmy.org/context.json": join_lemmy_default,
4232
4263
  "http://joinmastodon.org/ns": { "@context": {
4233
4264
  "toot": "http://joinmastodon.org/ns#",
4234
4265
  "Emoji": "toot:Emoji",
@@ -4259,7 +4290,7 @@ const preloadedContexts = {
4259
4290
  //#endregion
4260
4291
  //#region deno.json
4261
4292
  var name = "@fedify/vocab-runtime";
4262
- var version = "2.0.12";
4293
+ var version = "2.0.14";
4263
4294
  //#endregion
4264
4295
  //#region src/link.ts
4265
4296
  const parametersNeedLowerCase = ["rel", "type"];
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Do9eywBl.cjs");
2
- const require_request = require("./request-Dnca7vWT.cjs");
2
+ const require_request = require("./request-D8IQCWTV.cjs");
3
3
  const require_link = require("./link-B6ZWBZhf.cjs");
4
4
  const require_url = require("./url-Cr2K-wzd.cjs");
5
5
  let node_assert = require("node:assert");
@@ -1207,6 +1207,36 @@ var esm_default = new class FetchMock {
1207
1207
  }
1208
1208
  }({ ...defaultFetchMockConfig });
1209
1209
  //#endregion
1210
+ //#region src/contexts/join-lemmy.json
1211
+ var join_lemmy_default = { "@context": ["https://w3id.org/security/v1", {
1212
+ "as": "https://www.w3.org/ns/activitystreams#",
1213
+ "lemmy": "https://join-lemmy.org/ns#",
1214
+ "litepub": "http://litepub.social/ns#",
1215
+ "pt": "https://joinpeertube.org/ns#",
1216
+ "sc": "http://schema.org/",
1217
+ "mastodon": "http://joinmastodon.org/ns#",
1218
+ "ChatMessage": "litepub:ChatMessage",
1219
+ "commentsEnabled": "pt:commentsEnabled",
1220
+ "sensitive": "as:sensitive",
1221
+ "matrixUserId": "lemmy:matrixUserId",
1222
+ "postingRestrictedToMods": "lemmy:postingRestrictedToMods",
1223
+ "removeData": "lemmy:removeData",
1224
+ "stickied": "lemmy:stickied",
1225
+ "moderators": {
1226
+ "@type": "@id",
1227
+ "@id": "lemmy:moderators"
1228
+ },
1229
+ "expires": "as:endTime",
1230
+ "distinguished": "lemmy:distinguished",
1231
+ "language": "sc:inLanguage",
1232
+ "identifier": "sc:identifier",
1233
+ "Hashtag": "as:Hashtag",
1234
+ "featured": {
1235
+ "@type": "@id",
1236
+ "@id": "mastodon:featured"
1237
+ }
1238
+ }] };
1239
+ //#endregion
1210
1240
  //#region src/contexts.ts
1211
1241
  const preloadedContexts = {
1212
1242
  "https://www.w3.org/ns/activitystreams": { "@context": {
@@ -5427,6 +5457,7 @@ const preloadedContexts = {
5427
5457
  "@type": "@id"
5428
5458
  }
5429
5459
  } },
5460
+ "https://join-lemmy.org/context.json": join_lemmy_default,
5430
5461
  "http://joinmastodon.org/ns": { "@context": {
5431
5462
  "toot": "http://joinmastodon.org/ns#",
5432
5463
  "Emoji": "toot:Emoji",
@@ -1,4 +1,4 @@
1
- import { a as name, i as logRequest, n as createActivityPubRequest, o as version, t as FetchError } from "./request-Caxc5H6c.mjs";
1
+ import { a as name, i as logRequest, n as createActivityPubRequest, o as version, t as FetchError } from "./request-D2beZ378.mjs";
2
2
  import { t as HttpHeaderLink } from "./link-B8JGXSS2.mjs";
3
3
  import { a as validatePublicUrl, t as UrlError } from "./url-Djghaq0m.mjs";
4
4
  import { deepStrictEqual, ok, rejects } from "node:assert";
@@ -1226,6 +1226,36 @@ var esm_default = new class FetchMock {
1226
1226
  }
1227
1227
  }({ ...defaultFetchMockConfig });
1228
1228
  //#endregion
1229
+ //#region src/contexts/join-lemmy.json
1230
+ var join_lemmy_default = { "@context": ["https://w3id.org/security/v1", {
1231
+ "as": "https://www.w3.org/ns/activitystreams#",
1232
+ "lemmy": "https://join-lemmy.org/ns#",
1233
+ "litepub": "http://litepub.social/ns#",
1234
+ "pt": "https://joinpeertube.org/ns#",
1235
+ "sc": "http://schema.org/",
1236
+ "mastodon": "http://joinmastodon.org/ns#",
1237
+ "ChatMessage": "litepub:ChatMessage",
1238
+ "commentsEnabled": "pt:commentsEnabled",
1239
+ "sensitive": "as:sensitive",
1240
+ "matrixUserId": "lemmy:matrixUserId",
1241
+ "postingRestrictedToMods": "lemmy:postingRestrictedToMods",
1242
+ "removeData": "lemmy:removeData",
1243
+ "stickied": "lemmy:stickied",
1244
+ "moderators": {
1245
+ "@type": "@id",
1246
+ "@id": "lemmy:moderators"
1247
+ },
1248
+ "expires": "as:endTime",
1249
+ "distinguished": "lemmy:distinguished",
1250
+ "language": "sc:inLanguage",
1251
+ "identifier": "sc:identifier",
1252
+ "Hashtag": "as:Hashtag",
1253
+ "featured": {
1254
+ "@type": "@id",
1255
+ "@id": "mastodon:featured"
1256
+ }
1257
+ }] };
1258
+ //#endregion
1229
1259
  //#region src/contexts.ts
1230
1260
  const preloadedContexts = {
1231
1261
  "https://www.w3.org/ns/activitystreams": { "@context": {
@@ -5446,6 +5476,7 @@ const preloadedContexts = {
5446
5476
  "@type": "@id"
5447
5477
  }
5448
5478
  } },
5479
+ "https://join-lemmy.org/context.json": join_lemmy_default,
5449
5480
  "http://joinmastodon.org/ns": { "@context": {
5450
5481
  "toot": "http://joinmastodon.org/ns#",
5451
5482
  "Emoji": "toot:Emoji",
@@ -1,7 +1,7 @@
1
1
  import process from "node:process";
2
2
  //#region deno.json
3
3
  var name = "@fedify/vocab-runtime";
4
- var version = "2.0.12";
4
+ var version = "2.0.14";
5
5
  //#endregion
6
6
  //#region src/request.ts
7
7
  /**
@@ -3,7 +3,7 @@ let node_process = require("node:process");
3
3
  node_process = require_chunk.__toESM(node_process);
4
4
  //#region deno.json
5
5
  var name = "@fedify/vocab-runtime";
6
- var version = "2.0.12";
6
+ var version = "2.0.14";
7
7
  //#endregion
8
8
  //#region src/request.ts
9
9
  /**
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Do9eywBl.cjs");
2
- const require_request = require("./request-Dnca7vWT.cjs");
2
+ const require_request = require("./request-D8IQCWTV.cjs");
3
3
  let node_assert = require("node:assert");
4
4
  let node_test = require("node:test");
5
5
  let node_process = require("node:process");
@@ -1,4 +1,4 @@
1
- import { o as version, r as getUserAgent } from "./request-Caxc5H6c.mjs";
1
+ import { o as version, r as getUserAgent } from "./request-D2beZ378.mjs";
2
2
  import { deepStrictEqual } from "node:assert";
3
3
  import { test } from "node:test";
4
4
  import process from "node:process";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/vocab-runtime",
3
- "version": "2.0.12",
3
+ "version": "2.0.14",
4
4
  "homepage": "https://fedify.dev/",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,33 @@
1
+ {
2
+ "@context": [
3
+ "https://w3id.org/security/v1",
4
+ {
5
+ "as": "https://www.w3.org/ns/activitystreams#",
6
+ "lemmy": "https://join-lemmy.org/ns#",
7
+ "litepub": "http://litepub.social/ns#",
8
+ "pt": "https://joinpeertube.org/ns#",
9
+ "sc": "http://schema.org/",
10
+ "mastodon": "http://joinmastodon.org/ns#",
11
+ "ChatMessage": "litepub:ChatMessage",
12
+ "commentsEnabled": "pt:commentsEnabled",
13
+ "sensitive": "as:sensitive",
14
+ "matrixUserId": "lemmy:matrixUserId",
15
+ "postingRestrictedToMods": "lemmy:postingRestrictedToMods",
16
+ "removeData": "lemmy:removeData",
17
+ "stickied": "lemmy:stickied",
18
+ "moderators": {
19
+ "@type": "@id",
20
+ "@id": "lemmy:moderators"
21
+ },
22
+ "expires": "as:endTime",
23
+ "distinguished": "lemmy:distinguished",
24
+ "language": "sc:inLanguage",
25
+ "identifier": "sc:identifier",
26
+ "Hashtag": "as:Hashtag",
27
+ "featured": {
28
+ "@type": "@id",
29
+ "@id": "mastodon:featured"
30
+ }
31
+ }
32
+ ]
33
+ }
package/src/contexts.ts CHANGED
@@ -2,6 +2,8 @@
2
2
  // https://github.com/fedify-dev/fedify/issues/74
3
3
  // cSpell: disable
4
4
 
5
+ import joinLemmyContext from "./contexts/join-lemmy.json" with { type: "json" };
6
+
5
7
  const preloadedContexts: Record<string, unknown> = {
6
8
  "https://www.w3.org/ns/activitystreams": {
7
9
  "@context": {
@@ -4315,6 +4317,15 @@ const preloadedContexts: Record<string, unknown> = {
4315
4317
  },
4316
4318
  },
4317
4319
 
4320
+ // Lemmy's context document is served as application/json without the JSON-LD
4321
+ // context Link header. The default document loader treats that as a regular
4322
+ // JSON response instead of a JSON-LD context, so every Lemmy activity that
4323
+ // references this URL fails before application handlers run. We ship a
4324
+ // built-in copy here so Fedify can parse Lemmy-originated activities without
4325
+ // application-level document loader workarounds.
4326
+ // See: https://github.com/fedify-dev/fedify/issues/714
4327
+ "https://join-lemmy.org/context.json": joinLemmyContext,
4328
+
4318
4329
  // Mastodon's "toot:" namespace. The URL http://joinmastodon.org/ns has
4319
4330
  // *never* served a real JSON-LD context document—Mastodon has always inlined
4320
4331
  // these term definitions directly in every outgoing @context array. However,