@fedify/relay 2.2.17 → 2.2.18

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.
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as exportSpki, r as getDocumentLoader, t as isRelayFollowerData } from "./types-COMSyumP.js";
4
+ import { n as exportSpki, r as getDocumentLoader, t as isRelayFollowerData } from "./types-DPCkOTiL.js";
5
5
  import { MemoryKvStore, signRequest } from "@fedify/fedify";
6
6
  import { createRelay } from "@fedify/relay";
7
7
  import { Accept, Announce, Create, Delete, Follow, Move, Note, Person, Undo, Update } from "@fedify/vocab";
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as exportSpki, r as getDocumentLoader, t as isRelayFollowerData } from "./types-COMSyumP.js";
4
+ import { n as exportSpki, r as getDocumentLoader, t as isRelayFollowerData } from "./types-DPCkOTiL.js";
5
5
  import { MemoryKvStore, signRequest } from "@fedify/fedify";
6
6
  import { createRelay } from "@fedify/relay";
7
7
  import { Create, Delete, Follow, Move, Note, Person, Undo, Update } from "@fedify/vocab";
@@ -25775,7 +25775,7 @@ const preloadedContexts = {
25775
25775
  "https://purl.archive.org/miscellany": miscellany_default
25776
25776
  };
25777
25777
  var name = "@fedify/vocab-runtime";
25778
- var version = "2.2.17";
25778
+ var version = "2.2.18";
25779
25779
  /**
25780
25780
  * Error thrown when fetching a JSON-LD document failed.
25781
25781
  */
@@ -26426,7 +26426,9 @@ function getDocumentLoader({ allowPrivateAddress, maxRedirection, skipPreloadedC
26426
26426
  const maximumRedirection = maxRedirection ?? DEFAULT_MAX_REDIRECTION;
26427
26427
  async function load(url, options, redirected = 0, visited = /* @__PURE__ */ new Set()) {
26428
26428
  options?.signal?.throwIfAborted();
26429
- const currentUrl = new URL(url).href;
26429
+ const parsedUrl = new URL(url);
26430
+ if (parsedUrl.protocol !== "http:" && parsedUrl.protocol !== "https:") throw new UrlError(`Unsupported protocol: ${parsedUrl.protocol}`);
26431
+ const currentUrl = parsedUrl.href;
26430
26432
  if (!skipPreloadedContexts && currentUrl in preloadedContexts) {
26431
26433
  logger.debug("Using preloaded context: {url}.", { url: currentUrl });
26432
26434
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/relay",
3
- "version": "2.2.17",
3
+ "version": "2.2.18",
4
4
  "description": "ActivityPub relay support for Fedify",
5
5
  "keywords": [
6
6
  "Fedify",
@@ -50,14 +50,14 @@
50
50
  "dependencies": {
51
51
  "@js-temporal/polyfill": "^0.5.1",
52
52
  "@logtape/logtape": "^2.0.5",
53
- "@fedify/fedify": "^2.2.17",
54
- "@fedify/vocab": "2.2.17"
53
+ "@fedify/fedify": "^2.2.18",
54
+ "@fedify/vocab": "2.2.18"
55
55
  },
56
56
  "devDependencies": {
57
57
  "tsdown": "^0.21.6",
58
58
  "typescript": "^6.0.0",
59
59
  "urlpattern-polyfill": "^10.1.0",
60
- "@fedify/vocab-runtime": "^2.2.17"
60
+ "@fedify/vocab-runtime": "^2.2.18"
61
61
  },
62
62
  "scripts": {
63
63
  "build:self": "tsdown",