@fedify/fedify 1.4.0-dev.623 → 1.4.0-dev.625

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 (83) hide show
  1. package/CHANGES.md +2 -0
  2. package/esm/deno.js +1 -1
  3. package/esm/deps/jsr.io/@std/bytes/1.0.5/_types.js +2 -0
  4. package/esm/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/concat.js +1 -1
  5. package/esm/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/copy.js +1 -1
  6. package/esm/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/ends_with.js +1 -1
  7. package/esm/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/equals.js +1 -1
  8. package/esm/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/includes_needle.js +1 -1
  9. package/esm/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/index_of_needle.js +1 -1
  10. package/esm/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/last_index_of_needle.js +1 -1
  11. package/esm/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/mod.js +1 -1
  12. package/esm/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/repeat.js +1 -1
  13. package/esm/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/starts_with.js +1 -1
  14. package/esm/deps/jsr.io/@std/encoding/1.0.7/_types.js +2 -0
  15. package/esm/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/_validate_binary_like.js +1 -1
  16. package/esm/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/base64.js +1 -1
  17. package/esm/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/base64url.js +1 -1
  18. package/esm/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/hex.js +1 -1
  19. package/esm/deps/jsr.io/@std/http/{1.0.12 → 1.0.13}/_negotiation/common.js +1 -1
  20. package/esm/deps/jsr.io/@std/http/{1.0.12 → 1.0.13}/_negotiation/encoding.js +1 -1
  21. package/esm/deps/jsr.io/@std/http/{1.0.12 → 1.0.13}/_negotiation/language.js +1 -1
  22. package/esm/deps/jsr.io/@std/http/{1.0.12 → 1.0.13}/_negotiation/media_type.js +1 -1
  23. package/esm/deps/jsr.io/@std/http/{1.0.12 → 1.0.13}/negotiation.js +1 -1
  24. package/esm/federation/collection.js +1 -1
  25. package/esm/federation/handler.js +1 -1
  26. package/esm/federation/middleware.js +16 -0
  27. package/esm/runtime/key.js +4 -4
  28. package/esm/sig/http.js +3 -3
  29. package/esm/sig/ld.js +2 -2
  30. package/esm/sig/proof.js +1 -1
  31. package/esm/vocab/vocab.js +176 -176
  32. package/package.json +1 -1
  33. package/types/deps/jsr.io/@std/bytes/1.0.5/_types.d.ts +9 -0
  34. package/types/deps/jsr.io/@std/bytes/1.0.5/_types.d.ts.map +1 -0
  35. package/types/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/concat.d.ts +3 -1
  36. package/types/deps/jsr.io/@std/bytes/1.0.5/concat.d.ts.map +1 -0
  37. package/types/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/copy.d.ts.map +1 -1
  38. package/types/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/ends_with.d.ts.map +1 -1
  39. package/types/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/equals.d.ts.map +1 -1
  40. package/types/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/includes_needle.d.ts.map +1 -1
  41. package/types/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/index_of_needle.d.ts.map +1 -1
  42. package/types/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/last_index_of_needle.d.ts.map +1 -1
  43. package/types/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/mod.d.ts.map +1 -1
  44. package/types/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/repeat.d.ts +3 -1
  45. package/types/deps/jsr.io/@std/bytes/1.0.5/repeat.d.ts.map +1 -0
  46. package/types/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/starts_with.d.ts.map +1 -1
  47. package/types/deps/jsr.io/@std/encoding/1.0.7/_types.d.ts +9 -0
  48. package/types/deps/jsr.io/@std/encoding/1.0.7/_types.d.ts.map +1 -0
  49. package/types/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/_validate_binary_like.d.ts.map +1 -1
  50. package/types/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/base64.d.ts +3 -1
  51. package/types/deps/jsr.io/@std/encoding/1.0.7/base64.d.ts.map +1 -0
  52. package/types/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/base64url.d.ts +3 -1
  53. package/types/deps/jsr.io/@std/encoding/1.0.7/base64url.d.ts.map +1 -0
  54. package/types/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/hex.d.ts +3 -1
  55. package/types/deps/jsr.io/@std/encoding/1.0.7/hex.d.ts.map +1 -0
  56. package/types/deps/jsr.io/@std/http/{1.0.12 → 1.0.13}/_negotiation/common.d.ts.map +1 -1
  57. package/types/deps/jsr.io/@std/http/{1.0.12 → 1.0.13}/_negotiation/encoding.d.ts.map +1 -1
  58. package/types/deps/jsr.io/@std/http/{1.0.12 → 1.0.13}/_negotiation/language.d.ts.map +1 -1
  59. package/types/deps/jsr.io/@std/http/{1.0.12 → 1.0.13}/_negotiation/media_type.d.ts.map +1 -1
  60. package/types/deps/jsr.io/@std/http/{1.0.12 → 1.0.13}/negotiation.d.ts.map +1 -1
  61. package/types/federation/context.d.ts +32 -0
  62. package/types/federation/context.d.ts.map +1 -1
  63. package/types/federation/middleware.d.ts +8 -0
  64. package/types/federation/middleware.d.ts.map +1 -1
  65. package/types/deps/jsr.io/@std/bytes/1.0.4/concat.d.ts.map +0 -1
  66. package/types/deps/jsr.io/@std/bytes/1.0.4/repeat.d.ts.map +0 -1
  67. package/types/deps/jsr.io/@std/encoding/1.0.6/base64.d.ts.map +0 -1
  68. package/types/deps/jsr.io/@std/encoding/1.0.6/base64url.d.ts.map +0 -1
  69. package/types/deps/jsr.io/@std/encoding/1.0.6/hex.d.ts.map +0 -1
  70. /package/types/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/copy.d.ts +0 -0
  71. /package/types/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/ends_with.d.ts +0 -0
  72. /package/types/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/equals.d.ts +0 -0
  73. /package/types/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/includes_needle.d.ts +0 -0
  74. /package/types/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/index_of_needle.d.ts +0 -0
  75. /package/types/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/last_index_of_needle.d.ts +0 -0
  76. /package/types/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/mod.d.ts +0 -0
  77. /package/types/deps/jsr.io/@std/bytes/{1.0.4 → 1.0.5}/starts_with.d.ts +0 -0
  78. /package/types/deps/jsr.io/@std/encoding/{1.0.6 → 1.0.7}/_validate_binary_like.d.ts +0 -0
  79. /package/types/deps/jsr.io/@std/http/{1.0.12 → 1.0.13}/_negotiation/common.d.ts +0 -0
  80. /package/types/deps/jsr.io/@std/http/{1.0.12 → 1.0.13}/_negotiation/encoding.d.ts +0 -0
  81. /package/types/deps/jsr.io/@std/http/{1.0.12 → 1.0.13}/_negotiation/language.d.ts +0 -0
  82. /package/types/deps/jsr.io/@std/http/{1.0.12 → 1.0.13}/_negotiation/media_type.d.ts +0 -0
  83. /package/types/deps/jsr.io/@std/http/{1.0.12 → 1.0.13}/negotiation.d.ts +0 -0
package/CHANGES.md CHANGED
@@ -17,6 +17,8 @@ To be released.
17
17
  - Added `ActorCallbackSetters.mapAlias()` method.
18
18
  - Added `ActorAliasMapper` type.
19
19
 
20
+ - Added `Context.getNodeInfo()` method. [[#203]]
21
+
20
22
  - Added `shares` property to `Object` class in Activity Vocabulary API.
21
23
 
22
24
  - Added `Object.sharesId` property.
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "@fedify/fedify",
3
- "version": "1.4.0-dev.623+74652529",
3
+ "version": "1.4.0-dev.625+79fe9402",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./mod.ts",
@@ -0,0 +1,2 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ export {};
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  /**
4
4
  * Concatenate an array of byte slices into a single slice.
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  /**
4
4
  * Copy bytes from the source array to the destination array and returns the
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  /**
4
4
  * Returns `true` if the suffix array appears at the end of the source array,
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  /**
4
4
  * Check whether byte slices are equal to each other using 8-bit comparisons.
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { indexOfNeedle } from "./index_of_needle.js";
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  /**
4
4
  * Returns the index of the first occurrence of the needle array in the source
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  /**
4
4
  * Returns the index of the last occurrence of the needle array in the source
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  /**
4
4
  * Helper functions for working with
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { copy } from "./copy.js";
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  /**
4
4
  * Returns `true` if the prefix array appears at the start of the source array,
@@ -0,0 +1,2 @@
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
+ export {};
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  const encoder = new TextEncoder();
3
3
  function getTypeName(value) {
4
4
  const type = typeof value;
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  /**
4
4
  * Utilities for
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  /**
4
4
  * Utilities for
@@ -1,6 +1,6 @@
1
1
  // Copyright 2009 The Go Authors. All rights reserved.
2
2
  // https://github.com/golang/go/blob/master/LICENSE
3
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
+ // Copyright 2018-2025 the Deno authors. MIT license.
4
4
  // This module is browser compatible.
5
5
  /**
6
6
  * Port of the Go
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  /*!
3
3
  * Adapted directly from negotiator at https://github.com/jshttp/negotiator/
4
4
  * which is licensed as follows:
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  /*!
3
3
  * Adapted directly from negotiator at https://github.com/jshttp/negotiator/
4
4
  * which is licensed as follows:
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  /*!
3
3
  * Adapted directly from negotiator at https://github.com/jshttp/negotiator/
4
4
  * which is licensed as follows:
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  /*!
3
3
  * Adapted directly from negotiator at https://github.com/jshttp/negotiator/
4
4
  * which is licensed as follows:
@@ -1,4 +1,4 @@
1
- // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
1
+ // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  /**
4
4
  * Contains the functions {@linkcode accepts}, {@linkcode acceptsEncodings}, and
@@ -1,5 +1,5 @@
1
1
  import * as dntShim from "../_dnt.shims.js";
2
- import { encodeHex } from "../deps/jsr.io/@std/encoding/1.0.6/hex.js";
2
+ import { encodeHex } from "../deps/jsr.io/@std/encoding/1.0.7/hex.js";
3
3
  /**
4
4
  * Calculates the [partial follower collection digest][1].
5
5
  *
@@ -1,6 +1,6 @@
1
1
  import { getLogger } from "@logtape/logtape";
2
2
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
3
- import { accepts } from "../deps/jsr.io/@std/http/1.0.12/negotiation.js";
3
+ import { accepts } from "../deps/jsr.io/@std/http/1.0.13/negotiation.js";
4
4
  import metadata from "../deno.js";
5
5
  import { verifyRequest } from "../sig/http.js";
6
6
  import { detachSignature, verifyJsonLd } from "../sig/ld.js";
@@ -4,6 +4,7 @@ import { getLogger, withContext } from "@logtape/logtape";
4
4
  import { context, propagation, SpanKind, SpanStatusCode, trace, } from "@opentelemetry/api";
5
5
  import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_HEADER, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_URL_FULL, } from "@opentelemetry/semantic-conventions";
6
6
  import metadata from "../deno.js";
7
+ import { getNodeInfo } from "../nodeinfo/client.js";
7
8
  import { handleNodeInfo, handleNodeInfoJrd } from "../nodeinfo/handler.js";
8
9
  import { getAuthenticatedDocumentLoader, getDocumentLoader, kvCache, } from "../runtime/docloader.js";
9
10
  import { verifyRequest } from "../sig/http.js";
@@ -1824,6 +1825,7 @@ export class ContextImpl {
1824
1825
  }
1825
1826
  lookupObject(identifier, options = {}) {
1826
1827
  return lookupObject(identifier, {
1828
+ ...options,
1827
1829
  documentLoader: options.documentLoader ?? this.documentLoader,
1828
1830
  contextLoader: options.contextLoader ?? this.contextLoader,
1829
1831
  userAgent: options.userAgent ?? this.federation.userAgent,
@@ -1834,10 +1836,24 @@ export class ContextImpl {
1834
1836
  }
1835
1837
  traverseCollection(collection, options = {}) {
1836
1838
  return traverseCollection(collection, {
1839
+ ...options,
1837
1840
  documentLoader: options.documentLoader ?? this.documentLoader,
1838
1841
  contextLoader: options.contextLoader ?? this.contextLoader,
1839
1842
  });
1840
1843
  }
1844
+ lookupNodeInfo(url, options = {}) {
1845
+ return options.parse === "none"
1846
+ ? getNodeInfo(url, {
1847
+ parse: "none",
1848
+ direct: options.direct,
1849
+ userAgent: options?.userAgent ?? this.federation.userAgent,
1850
+ })
1851
+ : getNodeInfo(url, {
1852
+ parse: options.parse,
1853
+ direct: options.direct,
1854
+ userAgent: options?.userAgent ?? this.federation.userAgent,
1855
+ });
1856
+ }
1841
1857
  sendActivity(sender, recipients, activity, options = {}) {
1842
1858
  const tracer = this.tracerProvider.getTracer(metadata.name, metadata.version);
1843
1859
  return tracer.startActiveSpan("activitypub.outbox", {
@@ -1,9 +1,9 @@
1
1
  import * as dntShim from "../_dnt.shims.js";
2
2
  import { createPublicKey } from "node:crypto";
3
- import { concat } from "../deps/jsr.io/@std/bytes/1.0.4/concat.js";
4
- import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/1.0.6/base64.js";
5
- import { decodeBase64Url } from "../deps/jsr.io/@std/encoding/1.0.6/base64url.js";
6
- import { decodeHex } from "../deps/jsr.io/@std/encoding/1.0.6/hex.js";
3
+ import { concat } from "../deps/jsr.io/@std/bytes/1.0.5/concat.js";
4
+ import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/1.0.7/base64.js";
5
+ import { decodeBase64Url } from "../deps/jsr.io/@std/encoding/1.0.7/base64url.js";
6
+ import { decodeHex } from "../deps/jsr.io/@std/encoding/1.0.7/hex.js";
7
7
  import { Integer, Sequence } from "asn1js";
8
8
  import { decode, encode } from "multibase";
9
9
  import { addPrefix, getCodeFromData, rmPrefix } from "multicodec";
package/esm/sig/http.js CHANGED
@@ -2,9 +2,9 @@ import * as dntShim from "../_dnt.shims.js";
2
2
  import { getLogger } from "@logtape/logtape";
3
3
  import { SpanStatusCode, trace, } from "@opentelemetry/api";
4
4
  import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL, } from "@opentelemetry/semantic-conventions";
5
- import { equals } from "../deps/jsr.io/@std/bytes/1.0.4/mod.js";
6
- import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/1.0.6/base64.js";
7
- import { encodeHex } from "../deps/jsr.io/@std/encoding/1.0.6/hex.js";
5
+ import { equals } from "../deps/jsr.io/@std/bytes/1.0.5/mod.js";
6
+ import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/1.0.7/base64.js";
7
+ import { encodeHex } from "../deps/jsr.io/@std/encoding/1.0.7/hex.js";
8
8
  import metadata from "../deno.js";
9
9
  import { CryptographicKey } from "../vocab/vocab.js";
10
10
  import { fetchKey, validateCryptoKey } from "./key.js";
package/esm/sig/ld.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as dntShim from "../_dnt.shims.js";
2
2
  import { getLogger } from "@logtape/logtape";
3
3
  import { SpanStatusCode, trace } from "@opentelemetry/api";
4
- import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/1.0.6/base64.js";
5
- import { encodeHex } from "../deps/jsr.io/@std/encoding/1.0.6/hex.js";
4
+ import { decodeBase64, encodeBase64 } from "../deps/jsr.io/@std/encoding/1.0.7/base64.js";
5
+ import { encodeHex } from "../deps/jsr.io/@std/encoding/1.0.7/hex.js";
6
6
  // @ts-ignore TS7016
7
7
  import jsonld from "jsonld";
8
8
  import metadata from "../deno.js";
package/esm/sig/proof.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as dntShim from "../_dnt.shims.js";
2
2
  import { getLogger } from "@logtape/logtape";
3
3
  import { SpanStatusCode, trace } from "@opentelemetry/api";
4
- import { encodeHex } from "../deps/jsr.io/@std/encoding/1.0.6/hex.js";
4
+ import { encodeHex } from "../deps/jsr.io/@std/encoding/1.0.7/hex.js";
5
5
  // @ts-ignore: json-canon is not typed
6
6
  import serialize from "json-canon";
7
7
  import metadata from "../deno.js";