@fedify/fedify 1.4.0-dev.607 → 1.4.0-dev.610

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/CHANGES.md CHANGED
@@ -39,6 +39,8 @@ To be released.
39
39
  - `new Object()` constructor now accepts `emojiReactions` option.
40
40
  - `Object.clone()` method now accepts `emojiReactions` option.
41
41
 
42
+ - Added `allowPrivateAddress` option to `LookupWebFingerOptions` interface.
43
+
42
44
  - Added `-t`/`--traverse` option to the `fedify lookup` subcommand. [[#195]]
43
45
 
44
46
  - Added `-S`/`--suppress-errors` option to the `fedify lookup` subcommand.
@@ -48,6 +50,20 @@ To be released.
48
50
  [#195]: https://github.com/dahlia/fedify/issues/195
49
51
 
50
52
 
53
+ Version 1.3.5
54
+ -------------
55
+
56
+ Released on January 21, 2025.
57
+
58
+ - Fixed a bug where `CreateFederationOptions.allowPrivateAddress` option had
59
+ been ignored by the `Context.lookupObject()` method when it had taken
60
+ a fediverse handle.
61
+
62
+ - The `lookupWebFinger()` function became to silently return `null` when
63
+ it fails to fetch the WebFinger document due to accessing a private network
64
+ address, instead of throwing a `UrlError`.
65
+
66
+
51
67
  Version 1.3.4
52
68
  -------------
53
69
 
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "@fedify/fedify",
3
- "version": "1.4.0-dev.607+b9f34f48",
3
+ "version": "1.4.0-dev.610+beefd859",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./mod.ts",
@@ -58,6 +58,7 @@ export class FederationImpl {
58
58
  documentLoader;
59
59
  contextLoader;
60
60
  authenticatedDocumentLoaderFactory;
61
+ allowPrivateAddress;
61
62
  userAgent;
62
63
  onOutboxError;
63
64
  signatureTimeWindow;
@@ -112,6 +113,7 @@ export class FederationImpl {
112
113
  }
113
114
  }
114
115
  const { allowPrivateAddress, userAgent } = options;
116
+ this.allowPrivateAddress = allowPrivateAddress ?? false;
115
117
  this.documentLoader = options.documentLoader ?? kvCache({
116
118
  loader: getDocumentLoader({ allowPrivateAddress, userAgent }),
117
119
  kv: options.kv,
@@ -1826,6 +1828,8 @@ export class ContextImpl {
1826
1828
  contextLoader: options.contextLoader ?? this.contextLoader,
1827
1829
  userAgent: options.userAgent ?? this.federation.userAgent,
1828
1830
  tracerProvider: options.tracerProvider ?? this.tracerProvider,
1831
+ // @ts-ignore: `allowPrivateAddress` is not in the type definition.
1832
+ allowPrivateAddress: this.federation.allowPrivateAddress,
1829
1833
  });
1830
1834
  }
1831
1835
  traverseCollection(collection, options = {}) {
@@ -95,6 +95,8 @@ async function lookupObjectInternal(identifier, options = {}) {
95
95
  const jrd = await lookupWebFinger(identifier, {
96
96
  userAgent: options.userAgent,
97
97
  tracerProvider: options.tracerProvider,
98
+ allowPrivateAddress: "allowPrivateAddress" in options &&
99
+ options.allowPrivateAddress === true,
98
100
  });
99
101
  if (jrd?.links == null)
100
102
  return null;