@fedify/webfinger 2.5.0-dev.2664 → 2.5.0-dev.2687
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/deno.json +2 -2
- package/dist/lookup.test.cjs +1 -1
- package/dist/lookup.test.js +1 -1
- package/dist/mod.cjs +1 -1
- package/dist/mod.js +1 -1
- package/package.json +2 -2
- package/src/body.ts +19 -13
- package/src/lookup-impl.ts +33 -29
- package/src/lookup.test.ts +662 -717
- package/src/lookup.ts +6 -21
- package/tsconfig.check.json +1 -5
- package/tsdown.config.ts +3 -2
package/src/lookup.ts
CHANGED
|
@@ -51,20 +51,7 @@ interface WebFingerInstruments {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
const WEBFINGER_HISTOGRAM_BUCKETS: ReadonlyArray<number> = [
|
|
54
|
-
5,
|
|
55
|
-
10,
|
|
56
|
-
25,
|
|
57
|
-
50,
|
|
58
|
-
75,
|
|
59
|
-
100,
|
|
60
|
-
250,
|
|
61
|
-
500,
|
|
62
|
-
750,
|
|
63
|
-
1000,
|
|
64
|
-
2500,
|
|
65
|
-
5000,
|
|
66
|
-
7500,
|
|
67
|
-
10000,
|
|
54
|
+
5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000,
|
|
68
55
|
];
|
|
69
56
|
|
|
70
57
|
const webFingerInstruments = new WeakMap<MeterProvider, WebFingerInstruments>();
|
|
@@ -275,10 +262,7 @@ export async function lookupWebFingerWithDependencies(
|
|
|
275
262
|
deps: LookupWebFingerDependencies = {},
|
|
276
263
|
): Promise<ResourceDescriptor | null | WebFingerLookupOutcome> {
|
|
277
264
|
const tracerProvider = options.tracerProvider ?? trace.getTracerProvider();
|
|
278
|
-
const tracer = tracerProvider.getTracer(
|
|
279
|
-
metadata.name,
|
|
280
|
-
metadata.version,
|
|
281
|
-
);
|
|
265
|
+
const tracer = tracerProvider.getTracer(metadata.name, metadata.version);
|
|
282
266
|
const scheme = getResourceScheme(resource);
|
|
283
267
|
return await tracer.startActiveSpan(
|
|
284
268
|
"webfinger.lookup",
|
|
@@ -303,9 +287,10 @@ export async function lookupWebFingerWithDependencies(
|
|
|
303
287
|
try {
|
|
304
288
|
outcome = await lookupWebFingerInternal(resource, options, deps);
|
|
305
289
|
span.setStatus({
|
|
306
|
-
code:
|
|
307
|
-
|
|
308
|
-
|
|
290
|
+
code:
|
|
291
|
+
outcome.resource === null
|
|
292
|
+
? SpanStatusCode.ERROR
|
|
293
|
+
: SpanStatusCode.OK,
|
|
309
294
|
});
|
|
310
295
|
return options.withDiagnostics ? outcome : outcome.resource;
|
|
311
296
|
} catch (error) {
|
package/tsconfig.check.json
CHANGED
package/tsdown.config.ts
CHANGED
|
@@ -17,8 +17,9 @@ export default [
|
|
|
17
17
|
deps: { neverBundle: [/^node:/] },
|
|
18
18
|
}),
|
|
19
19
|
defineConfig({
|
|
20
|
-
entry: (await Array.fromAsync(glob(`src/**/*.test.ts`)))
|
|
21
|
-
|
|
20
|
+
entry: (await Array.fromAsync(glob(`src/**/*.test.ts`))).map((f) =>
|
|
21
|
+
f.replace(sep, "/"),
|
|
22
|
+
),
|
|
22
23
|
format: ["esm", "cjs"],
|
|
23
24
|
platform: "node",
|
|
24
25
|
outExtensions({ format }) {
|