@fedify/fedify 1.3.0-dev.484 → 1.3.0-dev.487

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,13 +1,14 @@
1
1
  import { getLogger } from "@logtape/logtape";
2
- import { getUserAgent } from "../runtime/docloader.js";
2
+ import { getUserAgent, } from "../runtime/docloader.js";
3
3
  const logger = getLogger(["fedify", "webfinger", "lookup"]);
4
4
  /**
5
5
  * Looks up a WebFinger resource.
6
6
  * @param resource The resource URL to look up.
7
+ * @param options Extra options for looking up the resource.
7
8
  * @returns The resource descriptor, or `null` if not found.
8
9
  * @since 0.2.0
9
10
  */
10
- export async function lookupWebFinger(resource) {
11
+ export async function lookupWebFinger(resource, options = {}) {
11
12
  if (typeof resource === "string")
12
13
  resource = new URL(resource);
13
14
  let protocol = "https:";
@@ -33,7 +34,9 @@ export async function lookupWebFinger(resource) {
33
34
  response = await fetch(url, {
34
35
  headers: {
35
36
  Accept: "application/jrd+json",
36
- "User-Agent": getUserAgent(),
37
+ "User-Agent": typeof options.userAgent === "string"
38
+ ? options.userAgent
39
+ : getUserAgent(options.userAgent),
37
40
  },
38
41
  redirect: "manual",
39
42
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/fedify",
3
- "version": "1.3.0-dev.484+e6a416f0",
3
+ "version": "1.3.0-dev.487+599b5a7b",
4
4
  "description": "An ActivityPub server framework",
5
5
  "keywords": [
6
6
  "ActivityPub",
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
3
  import * as dntShim from "../_dnt.shims.js";
4
- import { type AuthenticatedDocumentLoaderFactory, type DocumentLoader } from "../runtime/docloader.js";
4
+ import { type AuthenticatedDocumentLoaderFactory, type DocumentLoader, type GetUserAgentOptions } from "../runtime/docloader.js";
5
5
  import type { Actor, Recipient } from "../vocab/actor.js";
6
6
  import { type LookupObjectOptions, type TraverseCollectionOptions } from "../vocab/lookup.js";
7
7
  import { Activity, type Collection, type Hashtag, type Like, type Link, type Object } from "../vocab/vocab.js";
@@ -78,6 +78,13 @@ export interface CreateFederationOptions {
78
78
  * Turned off by default.
79
79
  */
80
80
  allowPrivateAddress?: boolean;
81
+ /**
82
+ * Options for making `User-Agent` strings for HTTP requests.
83
+ * If a string is provided, it is used as the `User-Agent` header.
84
+ * If an object is provided, it is passed to the {@link getUserAgent}
85
+ * function.
86
+ */
87
+ userAgent?: GetUserAgentOptions | string;
81
88
  /**
82
89
  * A callback that handles errors during outbox processing. Note that this
83
90
  * callback can be called multiple times for the same activity, because
@@ -181,6 +188,7 @@ export declare class FederationImpl<TContextData> implements Federation<TContext
181
188
  documentLoader: DocumentLoader;
182
189
  contextLoader: DocumentLoader;
183
190
  authenticatedDocumentLoaderFactory: AuthenticatedDocumentLoaderFactory;
191
+ userAgent?: GetUserAgentOptions | string;
184
192
  onOutboxError?: OutboxErrorHandler;
185
193
  signatureTimeWindow: dntShim.Temporal.Duration | dntShim.Temporal.DurationLike | false;
186
194
  skipSignatureVerification: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../src/federation/middleware.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EACL,KAAK,kCAAkC,EACvC,KAAK,cAAc,EAIpB,MAAM,yBAAyB,CAAC;AAMjC,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAEL,KAAK,mBAAmB,EAExB,KAAK,yBAAyB,EAC/B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,QAAQ,EACR,KAAK,UAAU,EAEf,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,IAAI,EAET,KAAK,MAAM,EACZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAGlB,oBAAoB,EACpB,iBAAiB,EAEjB,kBAAk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cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,YAAY,CAAC;CAC3B"}
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ import { type GetUserAgentOptions } from "../runtime/docloader.js";
2
3
  import type { InboundService, JsonValue, NodeInfo, OutboundService, Protocol, Services, Software, Usage } from "./types.js";
3
4
  /**
4
5
  * Options for {@link getNodeInfo} function.
@@ -24,6 +25,14 @@ export interface GetNodeInfoOptions {
24
25
  * the raw JSON value.
25
26
  */
26
27
  parse?: "strict" | "best-effort" | "none";
28
+ /**
29
+ * The options for making `User-Agent` header.
30
+ * If a string is given, it is used as the `User-Agent` header value.
31
+ * If an object is given, it is passed to {@link getUserAgent} to generate
32
+ * the `User-Agent` header value.
33
+ * @since 1.3.0
34
+ */
35
+ userAgent?: GetUserAgentOptions | string;
27
36
  }
28
37
  /**
29
38
  * Fetches a NodeInfo document from the given URL.
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/nodeinfo/client.ts"],"names":[],"mappings":";AAIA,OAAO,KAAK,EACV,cAAc,EACd,SAAS,EACT,QAAQ,EACR,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAK,EACN,MAAM,YAAY,CAAC;AAIpB;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,aAAa,GAAG,MAAM,CAAC;CAC3C;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,WAAW,CAC/B,GAAG,EAAE,GAAG,GAAG,MAAM,EACjB,OAAO,CAAC,EAAE,kBAAkB,GAAG;IAAE,KAAK,CAAC,EAAE,QAAQ,GAAG,aAAa,CAAA;CAAE,GAClE,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;AAEjC;;;;;;;;;;;GAWG;AACH,wBAAsB,W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CAAC,IAAI,EAAE,OAAO,GAAG,eAAe,GAAG,IAAI,CAkB1E;AAED,wBAAgB,UAAU,CACxB,IAAI,EAAE,OAAO,EACb,OAAO,GAAE,oBAAyB,GACjC,KAAK,GAAG,IAAI,CAiEd"}
@@ -54,6 +54,45 @@ export declare class FetchError extends Error {
54
54
  */
55
55
  constructor(url: URL | string, message?: string);
56
56
  }
57
+ /**
58
+ * Options for {@link getDocumentLoader}.
59
+ * @since 1.3.0
60
+ */
61
+ export interface GetDocumentLoaderOptions {
62
+ /**
63
+ * Whether to allow fetching private network addresses.
64
+ * Turned off by default.
65
+ */
66
+ allowPrivateAddress?: boolean;
67
+ /**
68
+ * Options for making `User-Agent` string.
69
+ * If a string is given, it is used as the `User-Agent` header value.
70
+ * If an object is given, it is passed to {@link getUserAgent} function.
71
+ */
72
+ userAgent?: GetUserAgentOptions | string;
73
+ /**
74
+ * Whether to preload the frequently used contexts.
75
+ */
76
+ skipPreloadedContexts?: boolean;
77
+ }
78
+ /**
79
+ * Creates a JSON-LD document loader that utilizes the browser's `fetch` API.
80
+ *
81
+ * The created loader preloads the below frequently used contexts by default
82
+ * (unless `options.ignorePreloadedContexts` is set to `true`):
83
+ *
84
+ * - <https://www.w3.org/ns/activitystreams>
85
+ * - <https://w3id.org/security/v1>
86
+ * - <https://w3id.org/security/data-integrity/v1>
87
+ * - <https://www.w3.org/ns/did/v1>
88
+ * - <https://w3id.org/security/multikey/v1>
89
+ * - <https://purl.archive.org/socialweb/webfinger>
90
+ * - <http://schema.org/>
91
+ * @param options Options for the document loader.
92
+ * @returns The document loader.
93
+ * @since 1.3.0
94
+ */
95
+ export declare function getDocumentLoader({ allowPrivateAddress, skipPreloadedContexts, userAgent }?: GetDocumentLoaderOptions): DocumentLoader;
57
96
  /**
58
97
  * A JSON-LD document loader that utilizes the browser's `fetch` API.
59
98
  *
@@ -64,20 +103,39 @@ export declare class FetchError extends Error {
64
103
  * - <https://w3id.org/security/data-integrity/v1>
65
104
  * - <https://www.w3.org/ns/did/v1>
66
105
  * - <https://w3id.org/security/multikey/v1>
106
+ * - <https://purl.archive.org/socialweb/webfinger>
107
+ * - <http://schema.org/>
67
108
  * @param url The URL of the document to load.
68
109
  * @param allowPrivateAddress Whether to allow fetching private network
69
110
  * addresses. Turned off by default.
70
111
  * @returns The remote document.
112
+ * @deprecated Use {@link getDocumentLoader} instead.
71
113
  */
72
114
  export declare function fetchDocumentLoader(url: string, allowPrivateAddress?: boolean): Promise<RemoteDocument>;
115
+ /**
116
+ * Options for {@link getAuthenticatedDocumentLoader}.
117
+ * @since 1.3.0
118
+ */
119
+ export interface GetAuthenticatedDocumentLoaderOptions {
120
+ /**
121
+ * Whether to allow fetching private network addresses.
122
+ * Turned off by default.
123
+ */
124
+ allowPrivateAddress?: boolean;
125
+ /**
126
+ * Options for making `User-Agent` string.
127
+ * If a string is given, it is used as the `User-Agent` header value.
128
+ * If an object is given, it is passed to {@link getUserAgent} function.
129
+ */
130
+ userAgent?: GetUserAgentOptions | string;
131
+ }
73
132
  /**
74
133
  * Gets an authenticated {@link DocumentLoader} for the given identity.
75
134
  * Note that an authenticated document loader intentionally does not cache
76
135
  * the fetched documents.
77
136
  * @param identity The identity to get the document loader for.
78
137
  * The actor's key pair.
79
- * @param allowPrivateAddress Whether to allow fetching private network
80
- * addresses. Turned off by default.
138
+ * @param options The options for the document loader.
81
139
  * @returns The authenticated document loader.
82
140
  * @throws {TypeError} If the key is invalid or unsupported.
83
141
  * @since 0.4.0
@@ -85,7 +143,7 @@ export declare function fetchDocumentLoader(url: string, allowPrivateAddress?: b
85
143
  export declare function getAuthenticatedDocumentLoader(identity: {
86
144
  keyId: URL;
87
145
  privateKey: dntShim.CryptoKey;
88
- }, allowPrivateAddress?: boolean): DocumentLoader;
146
+ }, { allowPrivateAddress, userAgent }?: GetAuthenticatedDocumentLoaderOptions): DocumentLoader;
89
147
  /**
90
148
  * The parameters for {@link kvCache} function.
91
149
  */
@@ -119,13 +177,27 @@ export interface KvCacheParameters {
119
177
  * @returns The decorated document loader which is cache-enabled.
120
178
  */
121
179
  export declare function kvCache({ loader, kv, prefix, rules }: KvCacheParameters): DocumentLoader;
180
+ /**
181
+ * Options for making `User-Agent` string.
182
+ * @see {@link getUserAgent}
183
+ * @since 1.3.0
184
+ */
185
+ export interface GetUserAgentOptions {
186
+ /**
187
+ * An optional software name and version, e.g., `"Hollo/1.0.0"`.
188
+ */
189
+ software?: string | null;
190
+ /**
191
+ * An optional URL to append to the user agent string.
192
+ * Usually the URL of the ActivityPub instance.
193
+ */
194
+ url?: string | URL | null;
195
+ }
122
196
  /**
123
197
  * Gets the user agent string for the given application and URL.
124
- * @param app An optional application name and version, e.g., `"Hollo/1.0.0"`.
125
- * @param url An optional URL to append to the user agent string.
126
- * Usually the URL of the ActivityPub instance.
198
+ * @param options The options for making the user agent string.
127
199
  * @returns The user agent string.
128
200
  * @since 1.3.0
129
201
  */
130
- export declare function getUserAgent(app?: string | null, url?: string | URL | null): string;
202
+ export declare function getUserAgent({ software, url }?: GetUserAgentOptions): string;
131
203
  //# sourceMappingURL=docloader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"docloader.d.ts","sourceRoot":"","sources":["../../src/runtime/docloader.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAK5C,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,QAAQ,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;AAEtE;;;;;;;;GAQG;AACH,MAAM,MAAM,kCAAkC,GAAG,CAC/C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
1
  /// <reference types="node" />
2
+ import type { GetUserAgentOptions } from "../runtime/docloader.js";
2
3
  import { Application, Group, Organization, Person, Service } from "./vocab.js";
3
4
  /**
4
5
  * Actor types are {@link Object} types that are capable of performing
@@ -27,6 +28,20 @@ export declare function getActorTypeName(actor: Actor): ActorTypeName;
27
28
  * @returns The actor class by the given type name.
28
29
  */
29
30
  export declare function getActorClassByTypeName(typeName: ActorTypeName): typeof Application | typeof Group | typeof Organization | typeof Person | typeof Service;
31
+ /**
32
+ * Options for {@link getActorHandle}.
33
+ * @since 1.3.0
34
+ */
35
+ export interface GetActorHandleOptions extends NormalizeActorHandleOptions {
36
+ /**
37
+ * The options for making `User-Agent` header.
38
+ * If a string is given, it is used as the `User-Agent` header value.
39
+ * If an object is given, it is passed to {@link getUserAgent} to generate
40
+ * the `User-Agent` header value.
41
+ * @since 1.3.0
42
+ */
43
+ userAgent?: GetUserAgentOptions | string;
44
+ }
30
45
  /**
31
46
  * Gets the actor handle, of the form `@username@domain`, from the given actor
32
47
  * or an actor URI.
@@ -43,7 +58,7 @@ export declare function getActorClassByTypeName(typeName: ActorTypeName): typeof
43
58
  * ```
44
59
  *
45
60
  * @param actor The actor or actor URI to get the handle from.
46
- * @param options The options for normalizing the actor handle.
61
+ * @param options The extra options for getting the actor handle.
47
62
  * @returns The actor handle. It starts with `@` and is followed by the
48
63
  * username and domain, separated by `@` by default (it can be
49
64
  * customized with the options).
@@ -51,7 +66,7 @@ export declare function getActorClassByTypeName(typeName: ActorTypeName): typeof
51
66
  * handle.
52
67
  * @since 0.4.0
53
68
  */
54
- export declare function getActorHandle(actor: Actor | URL, options?: NormalizeActorHandleOptions): Promise<`@${string}@${string}` | `${string}@${string}`>;
69
+ export declare function getActorHandle(actor: Actor | URL, options?: GetActorHandleOptions): Promise<`@${string}@${string}` | `${string}@${string}`>;
55
70
  /**
56
71
  * Options for {@link normalizeActorHandle}.
57
72
  * @since 0.9.0
@@ -1 +1 @@
1
- {"version":3,"file":"actor.d.ts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ClC,KAAK,EAAE,KAAK,GAAG,GAAG,EAClB,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,IAAI,MAAM,IAAI,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC,CAwCzD;AAeD;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,2BAAgC,GACxC,IAAI,MAAM,IAAI,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAahD;AAED;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,GAAG,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE;QACnB;;WAEG;QACH,WAAW,EAAE,GAAG,GAAG,IAAI,CAAC;KACzB,GAAG,IAAI,CAAC;CACV"}
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import * as dntShim from "../_dnt.shims.js";
3
- import { type DocumentLoader } from "../runtime/docloader.js";
3
+ import { type DocumentLoader, type GetUserAgentOptions } from "../runtime/docloader.js";
4
4
  import { type Collection, type Link, Object } from "./vocab.js";
5
5
  /**
6
6
  * Options for the {@link lookupObject} function.
@@ -17,6 +17,14 @@ export interface LookupObjectOptions {
17
17
  * @since 0.8.0
18
18
  */
19
19
  contextLoader?: DocumentLoader;
20
+ /**
21
+ * The options for making `User-Agent` header.
22
+ * If a string is given, it is used as the `User-Agent` header value.
23
+ * If an object is given, it is passed to {@link getUserAgent} to generate
24
+ * the `User-Agent` header value.
25
+ * @since 1.3.0
26
+ */
27
+ userAgent?: GetUserAgentOptions | string;
20
28
  }
21
29
  /**
22
30
  * Looks up an ActivityStreams object by its URI (including `acct:` URIs)
@@ -1 +1 @@
1
- {"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../src/vocab/lookup.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EACL,KAAK,cAAc,EAEpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,IAAI,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAIhE;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC;;;OAGG;IACH,aAAa,CAAC,EAAE,cAAc,CAAC;CAChC;AAKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,YAAY,CAChC,UAAU,EAAE,MAAM,GAAG,GAAG,EACxB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAoDxB;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC;;OAEG;IACH,aAAa,CAAC,EAAE,cAAc,CAAC;IAE/B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;CACtE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAuB,kBAAkB,CACvC,UAAU,EAAE,UAAU,EACtB,OAAO,GAAE,yBAA8B,GACtC,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC,CAiB9B"}
1
+ {"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../src/vocab/lookup.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,IAAI,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAIhE;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC;;;OAGG;IACH,aAAa,CAAC,EAAE,cAAc,CAAC;IAE/B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAAC;CAC1C;AAKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,YAAY,CAChC,UAAU,EAAE,MAAM,GAAG,GAAG,EACxB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAuDxB;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAEhC;;OAEG;IACH,aAAa,CAAC,EAAE,cAAc,CAAC;IAE/B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;CACtE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAuB,kBAAkB,CACvC,UAAU,EAAE,UAAU,EACtB,OAAO,GAAE,yBAA8B,GACtC,aAAa,CAAC,MAAM,GAAG,IAAI,CAAC,CAiB9B"}
@@ -1,10 +1,25 @@
1
1
  /// <reference types="node" />
2
+ import { type GetUserAgentOptions } from "../runtime/docloader.js";
2
3
  import type { ResourceDescriptor } from "./jrd.js";
4
+ /**
5
+ * Options for {@link lookupWebFinger}.
6
+ * @since 1.3.0
7
+ */
8
+ export interface LookupWebFingerOptions {
9
+ /**
10
+ * The options for making `User-Agent` header.
11
+ * If a string is given, it is used as the `User-Agent` header value.
12
+ * If an object is given, it is passed to {@link getUserAgent} to generate
13
+ * the `User-Agent` header value.
14
+ */
15
+ userAgent?: GetUserAgentOptions | string;
16
+ }
3
17
  /**
4
18
  * Looks up a WebFinger resource.
5
19
  * @param resource The resource URL to look up.
20
+ * @param options Extra options for looking up the resource.
6
21
  * @returns The resource descriptor, or `null` if not found.
7
22
  * @since 0.2.0
8
23
  */
9
- export declare function lookupWebFinger(resource: URL | string): Promise<ResourceDescriptor | null>;
24
+ export declare function lookupWebFinger(resource: URL | string, options?: LookupWebFingerOptions): Promise<ResourceDescriptor | null>;
10
25
  //# sourceMappingURL=lookup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../src/webfinger/lookup.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAInD;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,QAAQ,EAAE,GAAG,GAAG,MAAM,GACrB,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAmEpC"}
1
+ {"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../src/webfinger/lookup.ts"],"names":[],"mappings":";AACA,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAInD;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAAC;CAC1C;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CACnC,QAAQ,EAAE,GAAG,GAAG,MAAM,EACtB,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAqEpC"}