@fedify/fedify 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. package/CHANGES.md +36 -1
  2. package/esm/federation/handler.js +1 -1
  3. package/esm/runtime/contexts.js +3367 -0
  4. package/esm/runtime/docloader.js +4 -3
  5. package/esm/vocab/lookup.js +1 -1
  6. package/package.json +1 -1
  7. package/types/deps/jsr.io/@std/async/{1.0.6 → 1.0.7}/delay.d.ts.map +1 -1
  8. package/types/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/common.d.ts.map +1 -1
  9. package/types/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/encoding.d.ts.map +1 -1
  10. package/types/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/language.d.ts.map +1 -1
  11. package/types/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/media_type.d.ts.map +1 -1
  12. package/types/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/negotiation.d.ts.map +1 -1
  13. package/types/runtime/contexts.d.ts.map +1 -1
  14. package/types/runtime/docloader.d.ts.map +1 -1
  15. /package/esm/deps/jsr.io/@std/async/{1.0.6 → 1.0.7}/delay.js +0 -0
  16. /package/esm/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/common.js +0 -0
  17. /package/esm/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/encoding.js +0 -0
  18. /package/esm/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/language.js +0 -0
  19. /package/esm/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/media_type.js +0 -0
  20. /package/esm/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/negotiation.js +0 -0
  21. /package/types/deps/jsr.io/@std/async/{1.0.6 → 1.0.7}/delay.d.ts +0 -0
  22. /package/types/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/common.d.ts +0 -0
  23. /package/types/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/encoding.d.ts +0 -0
  24. /package/types/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/language.d.ts +0 -0
  25. /package/types/deps/jsr.io/@std/http/{1.0.8 → 1.0.9}/_negotiation/media_type.d.ts +0 -0
  26. /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
  }
@@ -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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/fedify",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "An ActivityPub server framework",
5
5
  "keywords": [
6
6
  "ActivityPub",
@@ -1 +1 @@
1
- {"version":3,"file":"delay.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/async/1.0.6/delay.ts"],"names":[],"mappings":";AAMA,MAAM,WAAW,YAAY;IAC3B,sCAAsC;IACtC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2B3E"}
1
+ {"version":3,"file":"delay.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/async/1.0.7/delay.ts"],"names":[],"mappings":";AAMA,MAAM,WAAW,YAAY;IAC3B,sCAAsC;IACtC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2B3E"}
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/http/1.0.8/_negotiation/common.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvB;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,MAAM,CAQnE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAEpD"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/http/1.0.9/_negotiation/common.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACvB;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,MAAM,CAQnE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAEpD"}
@@ -1 +1 @@
1
- {"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/http/1.0.8/_negotiation/encoding.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AA8GH;;qCAEqC;AACrC,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,MAAM,EAAE,GAClB,MAAM,EAAE,CAkBV"}
1
+ {"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/http/1.0.9/_negotiation/encoding.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AA8GH;;qCAEqC;AACrC,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,MAAM,EAAE,GAClB,MAAM,EAAE,CAkBV"}
@@ -1 +1 @@
1
- {"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/http/1.0.8/_negotiation/language.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAkGH,wBAAgB,kBAAkB,CAChC,MAAM,SAAM,EACZ,QAAQ,CAAC,EAAE,MAAM,EAAE,GAClB,MAAM,EAAE,CAiBV"}
1
+ {"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/http/1.0.9/_negotiation/language.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAkGH,wBAAgB,kBAAkB,CAChC,MAAM,SAAM,EACZ,QAAQ,CAAC,EAAE,MAAM,EAAE,GAClB,MAAM,EAAE,CAiBV"}
@@ -1 +1 @@
1
- {"version":3,"file":"media_type.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/http/1.0.8/_negotiation/media_type.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAiJH,wBAAgB,mBAAmB,CACjC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,EACtB,QAAQ,CAAC,EAAE,MAAM,EAAE,GAClB,MAAM,EAAE,CAkBV"}
1
+ {"version":3,"file":"media_type.d.ts","sourceRoot":"","sources":["../../../../../../../src/deps/jsr.io/@std/http/1.0.9/_negotiation/media_type.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAiJH,wBAAgB,mBAAmB,CACjC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,EACtB,QAAQ,CAAC,EAAE,MAAM,EAAE,GAClB,MAAM,EAAE,CAkBV"}
@@ -1 +1 @@
1
- {"version":3,"file":"negotiation.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/http/1.0.8/negotiation.ts"],"names":[],"mappings":";AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,MAAM,EAAE,CAAC;AACrE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,OAAO,CACrB,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,EACjC,G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C,GAAG,MAAM,EAAE,CAAC;AAC9E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,EACjC,GAAG,SAAS,EAAE,MAAM,EAAE,GACrB,MAAM,GAAG,SAAS,CAAC;AAetB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,GAAG,MAAM,EAAE,CAAC;AAC9E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,EACjC,GAAG,KAAK,EAAE,MAAM,EAAE,GACjB,MAAM,GAAG,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../../src/runtime/contexts.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAwxB9C,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../../src/runtime/contexts.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAikI9C,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"docloader.d.ts","sourceRoot":"","sources":["../../src/runtime/docloader.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAG5C,OAAO,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAQ1D;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,QAA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