@fedify/vocab-runtime 2.5.0-dev.2339 → 2.5.0-dev.2355
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 +1 -1
- package/dist/{docloader-BMHljyYb.d.cts → docloader-BBnBpbsG.d.cts} +34 -1
- package/dist/{docloader-BMHljyYb.d.ts → docloader-BBnBpbsG.d.ts} +34 -1
- package/dist/internal/jsonld-cache.d.cts +1 -1
- package/dist/internal/jsonld-cache.d.ts +1 -1
- package/dist/internal/portable-dereference.d.cts +2 -2
- package/dist/internal/portable-dereference.d.ts +2 -2
- package/dist/mod.cjs +86 -1
- package/dist/mod.d.cts +3 -3
- package/dist/mod.d.ts +3 -3
- package/dist/mod.js +86 -2
- package/dist/{portable-nkTiqH0w.d.ts → portable-BDydjp5H.d.ts} +1 -1
- package/dist/{portable-6Aj-7dZJ.d.cts → portable-Dfvcg_Wy.d.cts} +1 -1
- package/dist/tests/{body-CljcAHhk.cjs → body-BsbzxRBV.cjs} +1 -1
- package/dist/tests/{body-B3dGxaBV.mjs → body-CS1w_3TA.mjs} +1 -1
- package/dist/tests/body.test.cjs +1 -1
- package/dist/tests/body.test.mjs +1 -1
- package/dist/tests/decimal.test.cjs +3 -2
- package/dist/tests/decimal.test.mjs +3 -2
- package/dist/tests/{docloader-iFFvNZ4G.mjs → docloader-B23NKiGE.mjs} +3 -3
- package/dist/tests/{docloader-CMUtR3iO.cjs → docloader-D5LysMb_.cjs} +3 -3
- package/dist/tests/docloader.test.cjs +4 -4
- package/dist/tests/docloader.test.mjs +4 -4
- package/dist/tests/internal/portable-dereference.test.cjs +1 -1
- package/dist/tests/internal/portable-dereference.test.mjs +1 -1
- package/dist/tests/{portable-media-D-jFwVq0.mjs → portable-media-DvcYLpOn.mjs} +2 -2
- package/dist/tests/{portable-media-D4Ah_iys.cjs → portable-media-nBsL1fe6.cjs} +2 -2
- package/dist/tests/portable-media.test.cjs +1 -1
- package/dist/tests/portable-media.test.mjs +1 -1
- package/dist/tests/portable-workers.test.cjs +1 -1
- package/dist/tests/portable-workers.test.mjs +1 -1
- package/dist/tests/request-BWJ0Niez.mjs +167 -0
- package/dist/tests/request-DtExxXoM.cjs +210 -0
- package/dist/tests/request.test.cjs +58 -1
- package/dist/tests/request.test.mjs +58 -1
- package/package.json +1 -1
- package/src/mod.ts +1 -0
- package/src/request.test.ts +143 -1
- package/src/request.ts +113 -0
- package/dist/tests/request-BM1AsOPj.mjs +0 -82
- package/dist/tests/request-lSaiCxqI.cjs +0 -119
- package/dist/tests/{portable-dereference-qTLMqe2_.cjs → portable-dereference-DaTBBvCj.cjs} +1 -1
- package/dist/tests/{portable-dereference-DmTYDy2p.mjs → portable-dereference-sGRs_qdT.mjs} +1 -1
package/deno.json
CHANGED
|
@@ -24,6 +24,39 @@ declare class FetchError extends Error {
|
|
|
24
24
|
constructor(url: URL | string, message?: string, response?: Response);
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
+
* Guesses whether an error thrown by a document loader is transient,
|
|
28
|
+
* i.e., whether fetching the same document again later could succeed.
|
|
29
|
+
*
|
|
30
|
+
* This is a heuristic classification, not a guarantee. Callers that retry
|
|
31
|
+
* on transient errors should still bound the number of retries. The rules
|
|
32
|
+
* are:
|
|
33
|
+
*
|
|
34
|
+
* - A {@link UrlError} is transient only if its
|
|
35
|
+
* {@link UrlError.reason | reason} is `"dns"`; URLs disallowed by SSRF
|
|
36
|
+
* protection are permanent.
|
|
37
|
+
* - A {@link FetchError} with a {@link FetchError.response | response} is
|
|
38
|
+
* transient if the status is 5xx, 408 (Request Timeout), or 429 (Too Many
|
|
39
|
+
* Requests); other statuses such as 404 are permanent.
|
|
40
|
+
* - A {@link FetchError} without a response is classified by its `cause`,
|
|
41
|
+
* which is how timeouts are reported. Without a cause, it is permanent
|
|
42
|
+
* (e.g., redirect loops, too many redirections, or bodies that exceed the
|
|
43
|
+
* size limit).
|
|
44
|
+
* - A `TimeoutError` or `AbortError` is transient.
|
|
45
|
+
* - A `TypeError` from parsing an invalid URL is permanent; any other
|
|
46
|
+
* `TypeError` is transient, since `fetch()` reports network failures
|
|
47
|
+
* that way.
|
|
48
|
+
* - A `SyntaxError` (a malformed JSON body) is permanent.
|
|
49
|
+
* - An `AggregateError`, e.g., from trying several gateways, is transient
|
|
50
|
+
* if any of its errors is.
|
|
51
|
+
* - Any other error is treated as transient.
|
|
52
|
+
*
|
|
53
|
+
* @param error The error thrown by a document loader.
|
|
54
|
+
* @returns `true` if the error is likely transient, `false` if retrying is
|
|
55
|
+
* unlikely to help.
|
|
56
|
+
* @since 2.5.0
|
|
57
|
+
*/
|
|
58
|
+
declare function isTransientFetchError(error: unknown): boolean;
|
|
59
|
+
/**
|
|
27
60
|
* Options for creating a request.
|
|
28
61
|
* @internal
|
|
29
62
|
*/
|
|
@@ -267,4 +300,4 @@ declare function getDocumentLoader({
|
|
|
267
300
|
userAgent
|
|
268
301
|
}?: GetDocumentLoaderOptions): DocumentLoader;
|
|
269
302
|
//#endregion
|
|
270
|
-
export {
|
|
303
|
+
export { isTransientFetchError as _, DocumentLoaderOptions as a, getDocumentLoader as c, withDocumentLoaderTimeout as d, CreateRequestOptions as f, getUserAgent as g, createActivityPubRequest as h, DocumentLoaderFactoryOptions as i, getRemoteDocument as l, GetUserAgentOptions as m, DocumentLoader as n, GetDocumentLoaderOptions as o, FetchError as p, DocumentLoaderFactory as r, RemoteDocument as s, AuthenticatedDocumentLoaderFactory as t, resolveDocumentLoaderTimeout as u, logRequest as v };
|
|
@@ -24,6 +24,39 @@ declare class FetchError extends Error {
|
|
|
24
24
|
constructor(url: URL | string, message?: string, response?: Response);
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
+
* Guesses whether an error thrown by a document loader is transient,
|
|
28
|
+
* i.e., whether fetching the same document again later could succeed.
|
|
29
|
+
*
|
|
30
|
+
* This is a heuristic classification, not a guarantee. Callers that retry
|
|
31
|
+
* on transient errors should still bound the number of retries. The rules
|
|
32
|
+
* are:
|
|
33
|
+
*
|
|
34
|
+
* - A {@link UrlError} is transient only if its
|
|
35
|
+
* {@link UrlError.reason | reason} is `"dns"`; URLs disallowed by SSRF
|
|
36
|
+
* protection are permanent.
|
|
37
|
+
* - A {@link FetchError} with a {@link FetchError.response | response} is
|
|
38
|
+
* transient if the status is 5xx, 408 (Request Timeout), or 429 (Too Many
|
|
39
|
+
* Requests); other statuses such as 404 are permanent.
|
|
40
|
+
* - A {@link FetchError} without a response is classified by its `cause`,
|
|
41
|
+
* which is how timeouts are reported. Without a cause, it is permanent
|
|
42
|
+
* (e.g., redirect loops, too many redirections, or bodies that exceed the
|
|
43
|
+
* size limit).
|
|
44
|
+
* - A `TimeoutError` or `AbortError` is transient.
|
|
45
|
+
* - A `TypeError` from parsing an invalid URL is permanent; any other
|
|
46
|
+
* `TypeError` is transient, since `fetch()` reports network failures
|
|
47
|
+
* that way.
|
|
48
|
+
* - A `SyntaxError` (a malformed JSON body) is permanent.
|
|
49
|
+
* - An `AggregateError`, e.g., from trying several gateways, is transient
|
|
50
|
+
* if any of its errors is.
|
|
51
|
+
* - Any other error is treated as transient.
|
|
52
|
+
*
|
|
53
|
+
* @param error The error thrown by a document loader.
|
|
54
|
+
* @returns `true` if the error is likely transient, `false` if retrying is
|
|
55
|
+
* unlikely to help.
|
|
56
|
+
* @since 2.5.0
|
|
57
|
+
*/
|
|
58
|
+
declare function isTransientFetchError(error: unknown): boolean;
|
|
59
|
+
/**
|
|
27
60
|
* Options for creating a request.
|
|
28
61
|
* @internal
|
|
29
62
|
*/
|
|
@@ -267,4 +300,4 @@ declare function getDocumentLoader({
|
|
|
267
300
|
userAgent
|
|
268
301
|
}?: GetDocumentLoaderOptions): DocumentLoader;
|
|
269
302
|
//#endregion
|
|
270
|
-
export {
|
|
303
|
+
export { isTransientFetchError as _, DocumentLoaderOptions as a, getDocumentLoader as c, withDocumentLoaderTimeout as d, CreateRequestOptions as f, getUserAgent as g, createActivityPubRequest as h, DocumentLoaderFactoryOptions as i, getRemoteDocument as l, GetUserAgentOptions as m, DocumentLoader as n, GetDocumentLoaderOptions as o, FetchError as p, DocumentLoaderFactory as r, RemoteDocument as s, AuthenticatedDocumentLoaderFactory as t, resolveDocumentLoaderTimeout as u, logRequest as v };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { n as DocumentLoader, s as RemoteDocument } from "../docloader-
|
|
3
|
-
import { r as PortableObjectVerifier } from "../portable-
|
|
2
|
+
import { n as DocumentLoader, s as RemoteDocument } from "../docloader-BBnBpbsG.cjs";
|
|
3
|
+
import { r as PortableObjectVerifier } from "../portable-Dfvcg_Wy.cjs";
|
|
4
4
|
import { Span, TracerProvider } from "@opentelemetry/api";
|
|
5
5
|
|
|
6
6
|
//#region src/internal/portable-dereference.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { n as DocumentLoader, s as RemoteDocument } from "../docloader-
|
|
3
|
-
import { r as PortableObjectVerifier } from "../portable-
|
|
2
|
+
import { n as DocumentLoader, s as RemoteDocument } from "../docloader-BBnBpbsG.js";
|
|
3
|
+
import { r as PortableObjectVerifier } from "../portable-BDydjp5H.js";
|
|
4
4
|
import { Span, TracerProvider } from "@opentelemetry/api";
|
|
5
5
|
|
|
6
6
|
//#region src/internal/portable-dereference.d.ts
|
package/dist/mod.cjs
CHANGED
|
@@ -16,7 +16,7 @@ let _multiformats_base_x = require("@multiformats/base-x");
|
|
|
16
16
|
_multiformats_base_x = require_rolldown_runtime.__toESM(_multiformats_base_x, 1);
|
|
17
17
|
//#region deno.json
|
|
18
18
|
var name = "@fedify/vocab-runtime";
|
|
19
|
-
var version = "2.5.0-dev.
|
|
19
|
+
var version = "2.5.0-dev.2355+c92a1cb1";
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region src/request.ts
|
|
22
22
|
/**
|
|
@@ -45,6 +45,90 @@ var FetchError = class extends Error {
|
|
|
45
45
|
this.response = response;
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
+
const MAX_CAUSE_DEPTH = 8;
|
|
49
|
+
/**
|
|
50
|
+
* Guesses whether an error thrown by a document loader is transient,
|
|
51
|
+
* i.e., whether fetching the same document again later could succeed.
|
|
52
|
+
*
|
|
53
|
+
* This is a heuristic classification, not a guarantee. Callers that retry
|
|
54
|
+
* on transient errors should still bound the number of retries. The rules
|
|
55
|
+
* are:
|
|
56
|
+
*
|
|
57
|
+
* - A {@link UrlError} is transient only if its
|
|
58
|
+
* {@link UrlError.reason | reason} is `"dns"`; URLs disallowed by SSRF
|
|
59
|
+
* protection are permanent.
|
|
60
|
+
* - A {@link FetchError} with a {@link FetchError.response | response} is
|
|
61
|
+
* transient if the status is 5xx, 408 (Request Timeout), or 429 (Too Many
|
|
62
|
+
* Requests); other statuses such as 404 are permanent.
|
|
63
|
+
* - A {@link FetchError} without a response is classified by its `cause`,
|
|
64
|
+
* which is how timeouts are reported. Without a cause, it is permanent
|
|
65
|
+
* (e.g., redirect loops, too many redirections, or bodies that exceed the
|
|
66
|
+
* size limit).
|
|
67
|
+
* - A `TimeoutError` or `AbortError` is transient.
|
|
68
|
+
* - A `TypeError` from parsing an invalid URL is permanent; any other
|
|
69
|
+
* `TypeError` is transient, since `fetch()` reports network failures
|
|
70
|
+
* that way.
|
|
71
|
+
* - A `SyntaxError` (a malformed JSON body) is permanent.
|
|
72
|
+
* - An `AggregateError`, e.g., from trying several gateways, is transient
|
|
73
|
+
* if any of its errors is.
|
|
74
|
+
* - Any other error is treated as transient.
|
|
75
|
+
*
|
|
76
|
+
* @param error The error thrown by a document loader.
|
|
77
|
+
* @returns `true` if the error is likely transient, `false` if retrying is
|
|
78
|
+
* unlikely to help.
|
|
79
|
+
* @since 2.5.0
|
|
80
|
+
*/
|
|
81
|
+
function isTransientFetchError(error) {
|
|
82
|
+
return classifyFetchError(error, /* @__PURE__ */ new Set(), 0);
|
|
83
|
+
}
|
|
84
|
+
function classifyFetchError(error, path, depth) {
|
|
85
|
+
if (depth > MAX_CAUSE_DEPTH || path.has(error)) return true;
|
|
86
|
+
path.add(error);
|
|
87
|
+
try {
|
|
88
|
+
return classifyErrorShape(error, path, depth);
|
|
89
|
+
} finally {
|
|
90
|
+
path.delete(error);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function classifyErrorShape(error, path, depth) {
|
|
94
|
+
if (!(error instanceof Error) && !isNamedError(error)) return true;
|
|
95
|
+
const name = error.name;
|
|
96
|
+
if (error instanceof require_url.UrlError || name === "UrlError") return error.reason === "dns";
|
|
97
|
+
if (name === "BodyTooLargeError") return false;
|
|
98
|
+
if (error instanceof FetchError || name === "FetchError") {
|
|
99
|
+
const response = error.response;
|
|
100
|
+
if (isResponseLike(response)) {
|
|
101
|
+
const status = response.status;
|
|
102
|
+
return status >= 500 || status === 408 || status === 429;
|
|
103
|
+
}
|
|
104
|
+
const cause = error.cause;
|
|
105
|
+
if (cause == null) return false;
|
|
106
|
+
return classifyFetchError(cause, path, depth + 1);
|
|
107
|
+
}
|
|
108
|
+
if (error instanceof AggregateError || name === "AggregateError") {
|
|
109
|
+
const errors = error.errors;
|
|
110
|
+
if (!Array.isArray(errors) || errors.length < 1) return true;
|
|
111
|
+
return errors.some((e) => classifyFetchError(e, path, depth + 1));
|
|
112
|
+
}
|
|
113
|
+
if (name === "TimeoutError" || name === "AbortError") return true;
|
|
114
|
+
if (error instanceof TypeError || name === "TypeError") {
|
|
115
|
+
const cause = error.cause;
|
|
116
|
+
return !isInvalidUrlError(error) && !isInvalidUrlError(cause);
|
|
117
|
+
}
|
|
118
|
+
if (error instanceof SyntaxError || name === "SyntaxError") return false;
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
function isNamedError(error) {
|
|
122
|
+
return typeof error === "object" && error != null && typeof error.name === "string";
|
|
123
|
+
}
|
|
124
|
+
function isResponseLike(value) {
|
|
125
|
+
return typeof value === "object" && value != null && typeof value.status === "number";
|
|
126
|
+
}
|
|
127
|
+
function isInvalidUrlError(error) {
|
|
128
|
+
if (typeof error !== "object" || error == null) return false;
|
|
129
|
+
const { code, message } = error;
|
|
130
|
+
return code === "ERR_INVALID_URL" || typeof message === "string" && message.startsWith("Invalid URL");
|
|
131
|
+
}
|
|
48
132
|
/**
|
|
49
133
|
* The `Accept` header value for fetching ActivityPub objects. ActivityPub
|
|
50
134
|
* and FEP-ef61 gateways require the ActivityStreams profile on the JSON-LD
|
|
@@ -1800,6 +1884,7 @@ exports.importPkcs1 = importPkcs1;
|
|
|
1800
1884
|
exports.importSpki = importSpki;
|
|
1801
1885
|
exports.isDecimal = isDecimal;
|
|
1802
1886
|
exports.isGatewayUrl = require_url.isGatewayUrl;
|
|
1887
|
+
exports.isTransientFetchError = isTransientFetchError;
|
|
1803
1888
|
exports.isValidPublicIPv4Address = require_url.isValidPublicIPv4Address;
|
|
1804
1889
|
exports.isValidPublicIPv6Address = require_url.isValidPublicIPv6Address;
|
|
1805
1890
|
exports.logRequest = logRequest;
|
package/dist/mod.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { _ as
|
|
3
|
-
import { i as PortableObjectVerifierOptions, n as PortableObjectVerification, r as PortableObjectVerifier, t as PortableObjectReferrer } from "./portable-
|
|
2
|
+
import { _ as isTransientFetchError, a as DocumentLoaderOptions, c as getDocumentLoader, d as withDocumentLoaderTimeout, f as CreateRequestOptions, g as getUserAgent, h as createActivityPubRequest, i as DocumentLoaderFactoryOptions, l as getRemoteDocument, m as GetUserAgentOptions, n as DocumentLoader, o as GetDocumentLoaderOptions, p as FetchError, r as DocumentLoaderFactory, s as RemoteDocument, t as AuthenticatedDocumentLoaderFactory, u as resolveDocumentLoaderTimeout, v as logRequest } from "./docloader-BBnBpbsG.cjs";
|
|
3
|
+
import { i as PortableObjectVerifierOptions, n as PortableObjectVerification, r as PortableObjectVerifier, t as PortableObjectReferrer } from "./portable-Dfvcg_Wy.cjs";
|
|
4
4
|
import { TracerProvider } from "@opentelemetry/api";
|
|
5
5
|
|
|
6
6
|
//#region src/contexts.d.ts
|
|
@@ -803,4 +803,4 @@ declare function isValidPublicIPv4Address(address: string): boolean;
|
|
|
803
803
|
declare function isValidPublicIPv6Address(address: string): boolean;
|
|
804
804
|
declare function expandIPv6Address(address: string): string;
|
|
805
805
|
//#endregion
|
|
806
|
-
export { type AuthenticatedDocumentLoaderFactory, type CreateRequestOptions, type Decimal, type DidKeyVerificationMethod, type DocumentLoader, type DocumentLoaderFactory, type DocumentLoaderFactoryOptions, type DocumentLoaderOptions, FetchError, type FetchPortableMediaOptions, type GetDocumentLoaderOptions, type GetUserAgentOptions, type Json, LanguageString, type ParsedDigestMultibase, type ParsedHashlink, type PortableMedia, type PortableObjectReferrer, type PortableObjectVerification, type PortableObjectVerifier, type PortableObjectVerifierOptions, type PropertyPreprocessor, type PropertyPreprocessorContext, type RemoteDocument, UrlError, arePortableUrisEqual, canParseDecimal, canonicalizePortableUri, computeDigestMultibase, createActivityPubRequest, createHashlink, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportDidKey, exportMultibaseKey, exportSpki, fetchPortableMedia, formatIri, fromCompatibleEf61Id, getDocumentLoader, getFe34Origin, getGatewayHints, getRemoteDocument, getUserAgent, haveSameFe34Origin, haveSameIriOrigin, importDidKey, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isGatewayUrl, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, normalizeLanguageTag, parseDecimal, parseDidKeyVerificationMethod, parseDigestMultibase, parseGatewayUrl, parseHashlink, parseIri, parseJsonLdId, preloadedContexts, resolveDocumentLoaderTimeout, toCompatibleEf61Id, validatePublicUrl, verifyDigestMultibase, verifyHashlink, withDocumentLoaderTimeout, withGatewayHints, withoutGatewayHints };
|
|
806
|
+
export { type AuthenticatedDocumentLoaderFactory, type CreateRequestOptions, type Decimal, type DidKeyVerificationMethod, type DocumentLoader, type DocumentLoaderFactory, type DocumentLoaderFactoryOptions, type DocumentLoaderOptions, FetchError, type FetchPortableMediaOptions, type GetDocumentLoaderOptions, type GetUserAgentOptions, type Json, LanguageString, type ParsedDigestMultibase, type ParsedHashlink, type PortableMedia, type PortableObjectReferrer, type PortableObjectVerification, type PortableObjectVerifier, type PortableObjectVerifierOptions, type PropertyPreprocessor, type PropertyPreprocessorContext, type RemoteDocument, UrlError, arePortableUrisEqual, canParseDecimal, canonicalizePortableUri, computeDigestMultibase, createActivityPubRequest, createHashlink, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportDidKey, exportMultibaseKey, exportSpki, fetchPortableMedia, formatIri, fromCompatibleEf61Id, getDocumentLoader, getFe34Origin, getGatewayHints, getRemoteDocument, getUserAgent, haveSameFe34Origin, haveSameIriOrigin, importDidKey, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isGatewayUrl, isTransientFetchError, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, normalizeLanguageTag, parseDecimal, parseDidKeyVerificationMethod, parseDigestMultibase, parseGatewayUrl, parseHashlink, parseIri, parseJsonLdId, preloadedContexts, resolveDocumentLoaderTimeout, toCompatibleEf61Id, validatePublicUrl, verifyDigestMultibase, verifyHashlink, withDocumentLoaderTimeout, withGatewayHints, withoutGatewayHints };
|
package/dist/mod.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { _ as
|
|
3
|
-
import { i as PortableObjectVerifierOptions, n as PortableObjectVerification, r as PortableObjectVerifier, t as PortableObjectReferrer } from "./portable-
|
|
2
|
+
import { _ as isTransientFetchError, a as DocumentLoaderOptions, c as getDocumentLoader, d as withDocumentLoaderTimeout, f as CreateRequestOptions, g as getUserAgent, h as createActivityPubRequest, i as DocumentLoaderFactoryOptions, l as getRemoteDocument, m as GetUserAgentOptions, n as DocumentLoader, o as GetDocumentLoaderOptions, p as FetchError, r as DocumentLoaderFactory, s as RemoteDocument, t as AuthenticatedDocumentLoaderFactory, u as resolveDocumentLoaderTimeout, v as logRequest } from "./docloader-BBnBpbsG.js";
|
|
3
|
+
import { i as PortableObjectVerifierOptions, n as PortableObjectVerification, r as PortableObjectVerifier, t as PortableObjectReferrer } from "./portable-BDydjp5H.js";
|
|
4
4
|
import { TracerProvider } from "@opentelemetry/api";
|
|
5
5
|
//#region src/contexts.d.ts
|
|
6
6
|
declare const preloadedContexts: Record<string, unknown>;
|
|
@@ -802,4 +802,4 @@ declare function isValidPublicIPv4Address(address: string): boolean;
|
|
|
802
802
|
declare function isValidPublicIPv6Address(address: string): boolean;
|
|
803
803
|
declare function expandIPv6Address(address: string): string;
|
|
804
804
|
//#endregion
|
|
805
|
-
export { type AuthenticatedDocumentLoaderFactory, type CreateRequestOptions, type Decimal, type DidKeyVerificationMethod, type DocumentLoader, type DocumentLoaderFactory, type DocumentLoaderFactoryOptions, type DocumentLoaderOptions, FetchError, type FetchPortableMediaOptions, type GetDocumentLoaderOptions, type GetUserAgentOptions, type Json, LanguageString, type ParsedDigestMultibase, type ParsedHashlink, type PortableMedia, type PortableObjectReferrer, type PortableObjectVerification, type PortableObjectVerifier, type PortableObjectVerifierOptions, type PropertyPreprocessor, type PropertyPreprocessorContext, type RemoteDocument, UrlError, arePortableUrisEqual, canParseDecimal, canonicalizePortableUri, computeDigestMultibase, createActivityPubRequest, createHashlink, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportDidKey, exportMultibaseKey, exportSpki, fetchPortableMedia, formatIri, fromCompatibleEf61Id, getDocumentLoader, getFe34Origin, getGatewayHints, getRemoteDocument, getUserAgent, haveSameFe34Origin, haveSameIriOrigin, importDidKey, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isGatewayUrl, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, normalizeLanguageTag, parseDecimal, parseDidKeyVerificationMethod, parseDigestMultibase, parseGatewayUrl, parseHashlink, parseIri, parseJsonLdId, preloadedContexts, resolveDocumentLoaderTimeout, toCompatibleEf61Id, validatePublicUrl, verifyDigestMultibase, verifyHashlink, withDocumentLoaderTimeout, withGatewayHints, withoutGatewayHints };
|
|
805
|
+
export { type AuthenticatedDocumentLoaderFactory, type CreateRequestOptions, type Decimal, type DidKeyVerificationMethod, type DocumentLoader, type DocumentLoaderFactory, type DocumentLoaderFactoryOptions, type DocumentLoaderOptions, FetchError, type FetchPortableMediaOptions, type GetDocumentLoaderOptions, type GetUserAgentOptions, type Json, LanguageString, type ParsedDigestMultibase, type ParsedHashlink, type PortableMedia, type PortableObjectReferrer, type PortableObjectVerification, type PortableObjectVerifier, type PortableObjectVerifierOptions, type PropertyPreprocessor, type PropertyPreprocessorContext, type RemoteDocument, UrlError, arePortableUrisEqual, canParseDecimal, canonicalizePortableUri, computeDigestMultibase, createActivityPubRequest, createHashlink, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportDidKey, exportMultibaseKey, exportSpki, fetchPortableMedia, formatIri, fromCompatibleEf61Id, getDocumentLoader, getFe34Origin, getGatewayHints, getRemoteDocument, getUserAgent, haveSameFe34Origin, haveSameIriOrigin, importDidKey, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isGatewayUrl, isTransientFetchError, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, normalizeLanguageTag, parseDecimal, parseDidKeyVerificationMethod, parseDigestMultibase, parseGatewayUrl, parseHashlink, parseIri, parseJsonLdId, preloadedContexts, resolveDocumentLoaderTimeout, toCompatibleEf61Id, validatePublicUrl, verifyDigestMultibase, verifyHashlink, withDocumentLoaderTimeout, withGatewayHints, withoutGatewayHints };
|
package/dist/mod.js
CHANGED
|
@@ -12,7 +12,7 @@ import { PublicKeyInfo } from "pkijs";
|
|
|
12
12
|
import baseX from "@multiformats/base-x";
|
|
13
13
|
//#region deno.json
|
|
14
14
|
var name = "@fedify/vocab-runtime";
|
|
15
|
-
var version = "2.5.0-dev.
|
|
15
|
+
var version = "2.5.0-dev.2355+c92a1cb1";
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/request.ts
|
|
18
18
|
/**
|
|
@@ -41,6 +41,90 @@ var FetchError = class extends Error {
|
|
|
41
41
|
this.response = response;
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
+
const MAX_CAUSE_DEPTH = 8;
|
|
45
|
+
/**
|
|
46
|
+
* Guesses whether an error thrown by a document loader is transient,
|
|
47
|
+
* i.e., whether fetching the same document again later could succeed.
|
|
48
|
+
*
|
|
49
|
+
* This is a heuristic classification, not a guarantee. Callers that retry
|
|
50
|
+
* on transient errors should still bound the number of retries. The rules
|
|
51
|
+
* are:
|
|
52
|
+
*
|
|
53
|
+
* - A {@link UrlError} is transient only if its
|
|
54
|
+
* {@link UrlError.reason | reason} is `"dns"`; URLs disallowed by SSRF
|
|
55
|
+
* protection are permanent.
|
|
56
|
+
* - A {@link FetchError} with a {@link FetchError.response | response} is
|
|
57
|
+
* transient if the status is 5xx, 408 (Request Timeout), or 429 (Too Many
|
|
58
|
+
* Requests); other statuses such as 404 are permanent.
|
|
59
|
+
* - A {@link FetchError} without a response is classified by its `cause`,
|
|
60
|
+
* which is how timeouts are reported. Without a cause, it is permanent
|
|
61
|
+
* (e.g., redirect loops, too many redirections, or bodies that exceed the
|
|
62
|
+
* size limit).
|
|
63
|
+
* - A `TimeoutError` or `AbortError` is transient.
|
|
64
|
+
* - A `TypeError` from parsing an invalid URL is permanent; any other
|
|
65
|
+
* `TypeError` is transient, since `fetch()` reports network failures
|
|
66
|
+
* that way.
|
|
67
|
+
* - A `SyntaxError` (a malformed JSON body) is permanent.
|
|
68
|
+
* - An `AggregateError`, e.g., from trying several gateways, is transient
|
|
69
|
+
* if any of its errors is.
|
|
70
|
+
* - Any other error is treated as transient.
|
|
71
|
+
*
|
|
72
|
+
* @param error The error thrown by a document loader.
|
|
73
|
+
* @returns `true` if the error is likely transient, `false` if retrying is
|
|
74
|
+
* unlikely to help.
|
|
75
|
+
* @since 2.5.0
|
|
76
|
+
*/
|
|
77
|
+
function isTransientFetchError(error) {
|
|
78
|
+
return classifyFetchError(error, /* @__PURE__ */ new Set(), 0);
|
|
79
|
+
}
|
|
80
|
+
function classifyFetchError(error, path, depth) {
|
|
81
|
+
if (depth > MAX_CAUSE_DEPTH || path.has(error)) return true;
|
|
82
|
+
path.add(error);
|
|
83
|
+
try {
|
|
84
|
+
return classifyErrorShape(error, path, depth);
|
|
85
|
+
} finally {
|
|
86
|
+
path.delete(error);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function classifyErrorShape(error, path, depth) {
|
|
90
|
+
if (!(error instanceof Error) && !isNamedError(error)) return true;
|
|
91
|
+
const name = error.name;
|
|
92
|
+
if (error instanceof UrlError || name === "UrlError") return error.reason === "dns";
|
|
93
|
+
if (name === "BodyTooLargeError") return false;
|
|
94
|
+
if (error instanceof FetchError || name === "FetchError") {
|
|
95
|
+
const response = error.response;
|
|
96
|
+
if (isResponseLike(response)) {
|
|
97
|
+
const status = response.status;
|
|
98
|
+
return status >= 500 || status === 408 || status === 429;
|
|
99
|
+
}
|
|
100
|
+
const cause = error.cause;
|
|
101
|
+
if (cause == null) return false;
|
|
102
|
+
return classifyFetchError(cause, path, depth + 1);
|
|
103
|
+
}
|
|
104
|
+
if (error instanceof AggregateError || name === "AggregateError") {
|
|
105
|
+
const errors = error.errors;
|
|
106
|
+
if (!Array.isArray(errors) || errors.length < 1) return true;
|
|
107
|
+
return errors.some((e) => classifyFetchError(e, path, depth + 1));
|
|
108
|
+
}
|
|
109
|
+
if (name === "TimeoutError" || name === "AbortError") return true;
|
|
110
|
+
if (error instanceof TypeError || name === "TypeError") {
|
|
111
|
+
const cause = error.cause;
|
|
112
|
+
return !isInvalidUrlError(error) && !isInvalidUrlError(cause);
|
|
113
|
+
}
|
|
114
|
+
if (error instanceof SyntaxError || name === "SyntaxError") return false;
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
function isNamedError(error) {
|
|
118
|
+
return typeof error === "object" && error != null && typeof error.name === "string";
|
|
119
|
+
}
|
|
120
|
+
function isResponseLike(value) {
|
|
121
|
+
return typeof value === "object" && value != null && typeof value.status === "number";
|
|
122
|
+
}
|
|
123
|
+
function isInvalidUrlError(error) {
|
|
124
|
+
if (typeof error !== "object" || error == null) return false;
|
|
125
|
+
const { code, message } = error;
|
|
126
|
+
return code === "ERR_INVALID_URL" || typeof message === "string" && message.startsWith("Invalid URL");
|
|
127
|
+
}
|
|
44
128
|
/**
|
|
45
129
|
* The `Accept` header value for fetching ActivityPub objects. ActivityPub
|
|
46
130
|
* and FEP-ef61 gateways require the ActivityStreams profile on the JSON-LD
|
|
@@ -1763,4 +1847,4 @@ async function fetchPortableMedia(media, options = {}) {
|
|
|
1763
1847
|
}, options.signal, timeout);
|
|
1764
1848
|
}
|
|
1765
1849
|
//#endregion
|
|
1766
|
-
export { FetchError, LanguageString, UrlError, arePortableUrisEqual, canParseDecimal, canonicalizePortableUri, computeDigestMultibase, createActivityPubRequest, createHashlink, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportDidKey, exportMultibaseKey, exportSpki, fetchPortableMedia, formatIri, fromCompatibleEf61Id, getDocumentLoader, getFe34Origin, getGatewayHints, getRemoteDocument, getUserAgent, haveSameFe34Origin, haveSameIriOrigin, importDidKey, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isGatewayUrl, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, normalizeLanguageTag, parseDecimal, parseDidKeyVerificationMethod, parseDigestMultibase, parseGatewayUrl, parseHashlink, parseIri, parseJsonLdId, preloadedContexts, resolveDocumentLoaderTimeout, toCompatibleEf61Id, validatePublicUrl, verifyDigestMultibase, verifyHashlink, withDocumentLoaderTimeout, withGatewayHints, withoutGatewayHints };
|
|
1850
|
+
export { FetchError, LanguageString, UrlError, arePortableUrisEqual, canParseDecimal, canonicalizePortableUri, computeDigestMultibase, createActivityPubRequest, createHashlink, decodeMultibase, encodeMultibase, encodingFromBaseData, expandIPv6Address, exportDidKey, exportMultibaseKey, exportSpki, fetchPortableMedia, formatIri, fromCompatibleEf61Id, getDocumentLoader, getFe34Origin, getGatewayHints, getRemoteDocument, getUserAgent, haveSameFe34Origin, haveSameIriOrigin, importDidKey, importMultibaseKey, importPem, importPkcs1, importSpki, isDecimal, isGatewayUrl, isTransientFetchError, isValidPublicIPv4Address, isValidPublicIPv6Address, logRequest, normalizeLanguageTag, parseDecimal, parseDidKeyVerificationMethod, parseDigestMultibase, parseGatewayUrl, parseHashlink, parseIri, parseJsonLdId, preloadedContexts, resolveDocumentLoaderTimeout, toCompatibleEf61Id, validatePublicUrl, verifyDigestMultibase, verifyHashlink, withDocumentLoaderTimeout, withGatewayHints, withoutGatewayHints };
|
package/dist/tests/body.test.cjs
CHANGED
package/dist/tests/body.test.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as readBoundedText, t as BodyTooLargeError } from "./body-
|
|
1
|
+
import { i as readBoundedText, t as BodyTooLargeError } from "./body-CS1w_3TA.mjs";
|
|
2
2
|
import { deepStrictEqual, ok, rejects } from "node:assert/strict";
|
|
3
3
|
import { test } from "node:test";
|
|
4
4
|
import { gunzipSync, gzipSync } from "node:zlib";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
require("./request-DtExxXoM.cjs");
|
|
1
2
|
require("./url-BNakuZ8k.cjs");
|
|
2
|
-
require("./docloader-
|
|
3
|
+
require("./docloader-D5LysMb_.cjs");
|
|
3
4
|
require("./key-C-AYkdJJ.cjs");
|
|
4
5
|
require("./multibase-B5Mea7Ip.cjs");
|
|
5
6
|
require("./digest-3FeH2Y-Q.cjs");
|
|
6
7
|
require("./langtag-DASCPgl3.cjs");
|
|
7
8
|
require("./langstr-h89Kjekh.cjs");
|
|
8
|
-
require("./portable-media-
|
|
9
|
+
require("./portable-media-nBsL1fe6.cjs");
|
|
9
10
|
let node_test = require("node:test");
|
|
10
11
|
let node_assert = require("node:assert");
|
|
11
12
|
//#region src/decimal.ts
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import "./request-BWJ0Niez.mjs";
|
|
1
2
|
import "./url-DMxmp7ZG.mjs";
|
|
2
|
-
import "./docloader-
|
|
3
|
+
import "./docloader-B23NKiGE.mjs";
|
|
3
4
|
import "./key-C2Db_TAJ.mjs";
|
|
4
5
|
import "./multibase-BPnF_L4e.mjs";
|
|
5
6
|
import "./digest-COC7xDiQ.mjs";
|
|
6
7
|
import "./langtag-CD3zHKPN.mjs";
|
|
7
8
|
import "./langstr-Dw8IBDZl.mjs";
|
|
8
|
-
import "./portable-media-
|
|
9
|
+
import "./portable-media-DvcYLpOn.mjs";
|
|
9
10
|
import { test } from "node:test";
|
|
10
11
|
import { deepStrictEqual, throws } from "node:assert";
|
|
11
12
|
//#region src/decimal.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import {
|
|
1
|
+
import { a as logRequest, n as createActivityPubRequest, o as name, s as version, t as FetchError } from "./request-BWJ0Niez.mjs";
|
|
2
|
+
import { n as UrlError, x as validatePublicUrl } from "./url-DMxmp7ZG.mjs";
|
|
3
|
+
import { i as readBoundedText, n as MAX_BODY_SIZE, r as readBoundedBytes, t as BodyTooLargeError } from "./body-CS1w_3TA.mjs";
|
|
3
4
|
import { t as preloadedContexts } from "./contexts-duRA_dDC.mjs";
|
|
4
5
|
import { t as HttpHeaderLink } from "./link-Cevmc87v.mjs";
|
|
5
|
-
import { n as UrlError, x as validatePublicUrl } from "./url-DMxmp7ZG.mjs";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
//#region src/docloader.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_request = require("./request-
|
|
2
|
-
const
|
|
1
|
+
const require_request = require("./request-DtExxXoM.cjs");
|
|
2
|
+
const require_url = require("./url-BNakuZ8k.cjs");
|
|
3
|
+
const require_body = require("./body-BsbzxRBV.cjs");
|
|
3
4
|
const require_contexts = require("./contexts-C9Lj11SC.cjs");
|
|
4
5
|
const require_link = require("./link-DlKm8bEr.cjs");
|
|
5
|
-
const require_url = require("./url-BNakuZ8k.cjs");
|
|
6
6
|
let _logtape_logtape = require("@logtape/logtape");
|
|
7
7
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
8
8
|
//#region src/docloader.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.cjs");
|
|
2
|
-
const require_request = require("./request-
|
|
3
|
-
const require_contexts = require("./contexts-C9Lj11SC.cjs");
|
|
2
|
+
const require_request = require("./request-DtExxXoM.cjs");
|
|
4
3
|
const require_url = require("./url-BNakuZ8k.cjs");
|
|
5
|
-
const
|
|
4
|
+
const require_contexts = require("./contexts-C9Lj11SC.cjs");
|
|
5
|
+
const require_docloader = require("./docloader-D5LysMb_.cjs");
|
|
6
6
|
const require_jsonld = require("./jsonld-CmDhHNTx.cjs");
|
|
7
7
|
let node_zlib = require("node:zlib");
|
|
8
8
|
let _logtape_logtape = require("@logtape/logtape");
|
|
9
|
-
let node_assert = require("node:assert");
|
|
10
9
|
let node_dns_promises = require("node:dns/promises");
|
|
11
10
|
node_dns_promises = require_rolldown_runtime.__toESM(node_dns_promises, 1);
|
|
11
|
+
let node_assert = require("node:assert");
|
|
12
12
|
let _fedify_fixture = require("@fedify/fixture");
|
|
13
13
|
let node_http = require("node:http");
|
|
14
14
|
//#region ../../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as FetchError } from "./request-
|
|
2
|
-
import { n as cid_v1_default, t as preloadedContexts } from "./contexts-duRA_dDC.mjs";
|
|
1
|
+
import { t as FetchError } from "./request-BWJ0Niez.mjs";
|
|
3
2
|
import { n as UrlError } from "./url-DMxmp7ZG.mjs";
|
|
4
|
-
import {
|
|
3
|
+
import { n as cid_v1_default, t as preloadedContexts } from "./contexts-duRA_dDC.mjs";
|
|
4
|
+
import { i as withDocumentLoaderTimeout, n as getRemoteDocument, r as resolveDocumentLoaderTimeout, t as getDocumentLoader } from "./docloader-B23NKiGE.mjs";
|
|
5
5
|
import { t as jsonld_default } from "./jsonld-DweIJ07b.mjs";
|
|
6
6
|
import { gzipSync } from "node:zlib";
|
|
7
7
|
import { configure, reset } from "@logtape/logtape";
|
|
8
|
-
import { deepStrictEqual, ok, rejects, throws } from "node:assert";
|
|
9
8
|
import dns from "node:dns/promises";
|
|
9
|
+
import { deepStrictEqual, ok, rejects, throws } from "node:assert";
|
|
10
10
|
import { test } from "@fedify/fixture";
|
|
11
11
|
import { createServer } from "node:http";
|
|
12
12
|
//#region \0rolldown/runtime.js
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_url = require("../url-BNakuZ8k.cjs");
|
|
2
2
|
const require_jsonld_cache = require("../jsonld-cache-BEXiiM-V.cjs");
|
|
3
|
-
const require_portable_dereference = require("../portable-dereference-
|
|
3
|
+
const require_portable_dereference = require("../portable-dereference-DaTBBvCj.cjs");
|
|
4
4
|
let node_assert_strict = require("node:assert/strict");
|
|
5
5
|
let node_test = require("node:test");
|
|
6
6
|
//#region src/internal/portable-dereference.test.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { S as withGatewayHints, _ as parseIri } from "../url-DMxmp7ZG.mjs";
|
|
2
2
|
import { n as createScopedContextLoader } from "../jsonld-cache-DFnWsLuZ.mjs";
|
|
3
|
-
import { a as recordPortableReferrer, i as isPortableIri, n as getPortableGatewayCandidates, r as getReferrerGateways, t as createSnapshotContextLoader } from "../portable-dereference-
|
|
3
|
+
import { a as recordPortableReferrer, i as isPortableIri, n as getPortableGatewayCandidates, r as getReferrerGateways, t as createSnapshotContextLoader } from "../portable-dereference-sGRs_qdT.mjs";
|
|
4
4
|
import { deepStrictEqual, ok, throws } from "node:assert/strict";
|
|
5
5
|
import { test } from "node:test";
|
|
6
6
|
//#region src/internal/portable-dereference.test.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as getUserAgent } from "./request-
|
|
2
|
-
import { r as readBoundedBytes } from "./body-B3dGxaBV.mjs";
|
|
1
|
+
import { r as getUserAgent } from "./request-BWJ0Niez.mjs";
|
|
3
2
|
import { g as parseGatewayUrl, x as validatePublicUrl } from "./url-DMxmp7ZG.mjs";
|
|
3
|
+
import { r as readBoundedBytes } from "./body-CS1w_3TA.mjs";
|
|
4
4
|
import { a as verifyDigestMultibase, i as parseHashlink, r as parseDigestMultibase } from "./digest-COC7xDiQ.mjs";
|
|
5
5
|
//#region src/portable-media.ts
|
|
6
6
|
function resolveTimeout(value, fallback) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_request = require("./request-
|
|
2
|
-
const require_body = require("./body-CljcAHhk.cjs");
|
|
1
|
+
const require_request = require("./request-DtExxXoM.cjs");
|
|
3
2
|
const require_url = require("./url-BNakuZ8k.cjs");
|
|
3
|
+
const require_body = require("./body-BsbzxRBV.cjs");
|
|
4
4
|
const require_digest = require("./digest-3FeH2Y-Q.cjs");
|
|
5
5
|
//#region src/portable-media.ts
|
|
6
6
|
function resolveTimeout(value, fallback) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_digest = require("./digest-3FeH2Y-Q.cjs");
|
|
2
|
-
const require_portable_media = require("./portable-media-
|
|
2
|
+
const require_portable_media = require("./portable-media-nBsL1fe6.cjs");
|
|
3
3
|
let node_assert_strict = require("node:assert/strict");
|
|
4
4
|
let node_test = require("node:test");
|
|
5
5
|
let node_http = require("node:http");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as createHashlink, t as computeDigestMultibase } from "./digest-COC7xDiQ.mjs";
|
|
2
|
-
import { t as fetchPortableMedia } from "./portable-media-
|
|
2
|
+
import { t as fetchPortableMedia } from "./portable-media-DvcYLpOn.mjs";
|
|
3
3
|
import { deepStrictEqual, equal, rejects } from "node:assert/strict";
|
|
4
4
|
import { test } from "node:test";
|
|
5
5
|
import { createServer } from "node:http";
|
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_url = require("./url-BNakuZ8k.cjs");
|
|
3
3
|
const require_key = require("./key-C-AYkdJJ.cjs");
|
|
4
4
|
const require_digest = require("./digest-3FeH2Y-Q.cjs");
|
|
5
|
-
const require_portable_dereference = require("./portable-dereference-
|
|
5
|
+
const require_portable_dereference = require("./portable-dereference-DaTBBvCj.cjs");
|
|
6
6
|
let node_assert_strict = require("node:assert/strict");
|
|
7
7
|
let _fedify_fixture = require("@fedify/fixture");
|
|
8
8
|
//#region src/portable-workers.test.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as parseIri, i as canonicalizePortableUri, o as formatIri, s as fromCompatibleEf61Id, y as toCompatibleEf61Id } from "./url-DMxmp7ZG.mjs";
|
|
2
2
|
import { i as importDidKey, t as exportDidKey } from "./key-C2Db_TAJ.mjs";
|
|
3
3
|
import { n as createHashlink, o as verifyHashlink, t as computeDigestMultibase } from "./digest-COC7xDiQ.mjs";
|
|
4
|
-
import { n as getPortableGatewayCandidates } from "./portable-dereference-
|
|
4
|
+
import { n as getPortableGatewayCandidates } from "./portable-dereference-sGRs_qdT.mjs";
|
|
5
5
|
import { deepStrictEqual, equal } from "node:assert/strict";
|
|
6
6
|
import { test, testDefinitions } from "@fedify/fixture";
|
|
7
7
|
//#region src/portable-workers.test.ts
|