@fedify/fedify 2.0.0-dev.383 → 2.0.0-dev.385
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/dist/{builder-DkG2p8kW.js → builder-Crn6DW5-.js} +3 -3
- package/dist/compat/mod.d.cts +2 -2
- package/dist/compat/mod.d.ts +2 -2
- package/dist/compat/transformers.test.js +11 -11
- package/dist/{context-Bo8rHkgD.d.cts → context-BdNW_8a3.d.cts} +4 -1
- package/dist/{context-CvI-m4eX.d.ts → context-C-GVKcJR.d.ts} +4 -1
- package/dist/{deno-BMByRQG1.js → deno-BjUkN8s-.js} +1 -1
- package/dist/{docloader-Cv6dJCEn.js → docloader-rDZ2DL9o.js} +2 -2
- package/dist/federation/builder.test.js +3 -3
- package/dist/federation/handler.test.js +11 -11
- package/dist/federation/idempotency.test.js +11 -11
- package/dist/federation/inbox.test.js +2 -2
- package/dist/federation/middleware.test.js +11 -11
- package/dist/federation/mod.cjs +4 -4
- package/dist/federation/mod.d.cts +2 -2
- package/dist/federation/mod.d.ts +2 -2
- package/dist/federation/mod.js +4 -4
- package/dist/federation/send.test.js +90 -5
- package/dist/federation/webfinger.test.js +11 -11
- package/dist/{http-CS8X3xL0.js → http-BMn0rKX2.js} +1 -1
- package/dist/{http-B0YbKKTj.cjs → http-Bvd_BGyN.cjs} +1 -1
- package/dist/{http-PEXEcZtQ.js → http-CbHnS3UI.js} +2 -2
- package/dist/{inbox-CFwEGHQb.js → inbox-bAHUiFm9.js} +1 -1
- package/dist/{key-BUMDcUn6.js → key-BhiALrBI.js} +1 -1
- package/dist/{kv-cache-ZWa24T45.cjs → kv-cache-D1eptI1n.cjs} +1 -1
- package/dist/{kv-cache-BM0l1pOW.js → kv-cache-DVChfAIM.js} +1 -1
- package/dist/{ld-Bx3Mw3bV.js → ld-D0_AzG_F.js} +2 -2
- package/dist/{middleware-YLWEKWvB.js → middleware-B08vM9fr.js} +4 -4
- package/dist/{middleware-CBHSPr-c.cjs → middleware-B0NuaTNY.cjs} +37 -6
- package/dist/{middleware-CJtnP-pV.js → middleware-BJ9cm-yL.js} +10 -10
- package/dist/middleware-CG8TdnUq.cjs +12 -0
- package/dist/{middleware-va7JD5xu.js → middleware-CZ_xnRAW.js} +11 -11
- package/dist/{middleware-D95ZWXIW.js → middleware-DTNhiMNN.js} +37 -6
- package/dist/{mod-jzy1r56s.d.cts → mod-5PNty1K9.d.cts} +1 -1
- package/dist/{mod-DyzMRG8B.d.cts → mod-BcpEGTWV.d.cts} +1 -1
- package/dist/{mod-hcb60sG1.d.ts → mod-CtO31FCx.d.ts} +1 -1
- package/dist/{mod-PmuFg9QD.d.ts → mod-Da9fNDyC.d.ts} +1 -1
- package/dist/mod.cjs +4 -4
- package/dist/mod.d.cts +3 -3
- package/dist/mod.d.ts +3 -3
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/handler.test.js +11 -11
- package/dist/{owner-Dr5tjio2.js → owner-MCLLoNbG.js} +1 -1
- package/dist/{proof-CWYlCvAq.js → proof-9qZ1mx-q.js} +2 -2
- package/dist/{proof-BJ2-EQwg.cjs → proof-C7UiDzR3.cjs} +1 -1
- package/dist/{proof-BkD7Ea3t.js → proof-bmLHpL0t.js} +1 -1
- package/dist/{send-BkIS8uHG.js → send-B6-e-9Y3.js} +35 -4
- package/dist/sig/http.test.js +3 -3
- package/dist/sig/key.test.js +2 -2
- package/dist/sig/ld.test.js +3 -3
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.js +3 -3
- package/dist/sig/proof.test.js +3 -3
- package/dist/testing/mod.d.ts +4 -1
- package/dist/utils/docloader.test.js +4 -4
- package/dist/utils/mod.cjs +2 -2
- package/dist/utils/mod.js +2 -2
- package/package.json +5 -5
- package/dist/middleware-UV55R7TD.cjs +0 -12
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
const require_chunk = require('./chunk-CGaQZ11T.cjs');
|
|
6
6
|
const require_transformers = require('./transformers-3g8GZwkZ.cjs');
|
|
7
|
-
const require_http = require('./http-
|
|
8
|
-
const require_proof = require('./proof-
|
|
7
|
+
const require_http = require('./http-Bvd_BGyN.cjs');
|
|
8
|
+
const require_proof = require('./proof-C7UiDzR3.cjs');
|
|
9
9
|
const require_types = require('./types-Cd_hszr_.cjs');
|
|
10
|
-
const require_kv_cache = require('./kv-cache-
|
|
10
|
+
const require_kv_cache = require('./kv-cache-D1eptI1n.cjs');
|
|
11
11
|
const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
|
12
12
|
const __fedify_vocab = require_chunk.__toESM(require("@fedify/vocab"));
|
|
13
13
|
const __opentelemetry_api = require_chunk.__toESM(require("@opentelemetry/api"));
|
|
@@ -339,7 +339,7 @@ var FederationBuilderImpl = class {
|
|
|
339
339
|
this.collectionTypeIds = {};
|
|
340
340
|
}
|
|
341
341
|
async build(options) {
|
|
342
|
-
const { FederationImpl: FederationImpl$1 } = await Promise.resolve().then(() => require("./middleware-
|
|
342
|
+
const { FederationImpl: FederationImpl$1 } = await Promise.resolve().then(() => require("./middleware-CG8TdnUq.cjs"));
|
|
343
343
|
const f = new FederationImpl$1(options);
|
|
344
344
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
345
345
|
f.router = this.router.clone();
|
|
@@ -2088,6 +2088,34 @@ function sendActivity(options) {
|
|
|
2088
2088
|
}
|
|
2089
2089
|
});
|
|
2090
2090
|
}
|
|
2091
|
+
const MAX_ERROR_RESPONSE_BODY_BYTES = 1024;
|
|
2092
|
+
async function readLimitedResponseBody(response, maxBytes) {
|
|
2093
|
+
if (response.body == null) return "";
|
|
2094
|
+
const reader = response.body.getReader();
|
|
2095
|
+
const decoder = new TextDecoder();
|
|
2096
|
+
const chunks = [];
|
|
2097
|
+
let totalBytes = 0;
|
|
2098
|
+
let truncated = false;
|
|
2099
|
+
try {
|
|
2100
|
+
while (true) {
|
|
2101
|
+
const { done, value } = await reader.read();
|
|
2102
|
+
if (done) break;
|
|
2103
|
+
if (totalBytes + value.length > maxBytes) {
|
|
2104
|
+
const remaining = maxBytes - totalBytes;
|
|
2105
|
+
if (remaining > 0) chunks.push(decoder.decode(value.slice(0, remaining), { stream: true }));
|
|
2106
|
+
truncated = true;
|
|
2107
|
+
break;
|
|
2108
|
+
}
|
|
2109
|
+
chunks.push(decoder.decode(value, { stream: true }));
|
|
2110
|
+
totalBytes += value.length;
|
|
2111
|
+
}
|
|
2112
|
+
} finally {
|
|
2113
|
+
reader.releaseLock();
|
|
2114
|
+
}
|
|
2115
|
+
let result = chunks.join("");
|
|
2116
|
+
if (truncated) result += "… (truncated)";
|
|
2117
|
+
return result;
|
|
2118
|
+
}
|
|
2091
2119
|
async function sendActivityInternal({ activity, activityId, keys, inbox, headers, specDeterminer, tracerProvider }, span) {
|
|
2092
2120
|
const logger$1 = (0, __logtape_logtape.getLogger)([
|
|
2093
2121
|
"fedify",
|
|
@@ -2130,7 +2158,7 @@ async function sendActivityInternal({ activity, activityId, keys, inbox, headers
|
|
|
2130
2158
|
if (!response.ok) {
|
|
2131
2159
|
let error;
|
|
2132
2160
|
try {
|
|
2133
|
-
error = await response
|
|
2161
|
+
error = await readLimitedResponseBody(response, MAX_ERROR_RESPONSE_BODY_BYTES);
|
|
2134
2162
|
} catch (_) {
|
|
2135
2163
|
error = "";
|
|
2136
2164
|
}
|
|
@@ -2165,7 +2193,10 @@ var SendActivityError = class extends Error {
|
|
|
2165
2193
|
*/
|
|
2166
2194
|
statusCode;
|
|
2167
2195
|
/**
|
|
2168
|
-
* The response body from the inbox, if any.
|
|
2196
|
+
* The response body from the inbox, if any. Note that this may be
|
|
2197
|
+
* truncated to a maximum of 1 KiB to prevent excessive memory consumption
|
|
2198
|
+
* when remote servers return large error pages (e.g., Cloudflare error pages).
|
|
2199
|
+
* If truncated, the string will end with `"… (truncated)"`.
|
|
2169
2200
|
*/
|
|
2170
2201
|
responseBody;
|
|
2171
2202
|
/**
|
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./deno-
|
|
6
|
+
import { deno_default } from "./deno-BjUkN8s-.js";
|
|
7
7
|
import { getNodeInfo } from "./client-Dg7OfUDA.js";
|
|
8
8
|
import { RouterError } from "./router-D9eI0s4b.js";
|
|
9
9
|
import { nodeInfoToJson } from "./types-CPz01LGH.js";
|
|
10
|
-
import { exportJwk, importJwk, validateCryptoKey } from "./key-
|
|
11
|
-
import { verifyRequest } from "./http-
|
|
12
|
-
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-
|
|
13
|
-
import { doesActorOwnKey, getKeyOwner } from "./owner-
|
|
14
|
-
import { signObject, verifyObject } from "./proof-
|
|
15
|
-
import { getAuthenticatedDocumentLoader } from "./docloader-
|
|
10
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-BhiALrBI.js";
|
|
11
|
+
import { verifyRequest } from "./http-CbHnS3UI.js";
|
|
12
|
+
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-D0_AzG_F.js";
|
|
13
|
+
import { doesActorOwnKey, getKeyOwner } from "./owner-MCLLoNbG.js";
|
|
14
|
+
import { signObject, verifyObject } from "./proof-9qZ1mx-q.js";
|
|
15
|
+
import { getAuthenticatedDocumentLoader } from "./docloader-rDZ2DL9o.js";
|
|
16
16
|
import { kvCache } from "./kv-cache-B__dHl7g.js";
|
|
17
|
-
import { routeActivity } from "./inbox-
|
|
18
|
-
import { FederationBuilderImpl } from "./builder-
|
|
17
|
+
import { routeActivity } from "./inbox-bAHUiFm9.js";
|
|
18
|
+
import { FederationBuilderImpl } from "./builder-Crn6DW5-.js";
|
|
19
19
|
import { buildCollectionSynchronizationHeader } from "./collection-CcnIw1qY.js";
|
|
20
20
|
import { KvKeyCache } from "./keycache-DRxpZ5r9.js";
|
|
21
21
|
import { acceptsJsonLd } from "./negotiation-5NPJL6zp.js";
|
|
22
22
|
import { createExponentialBackoffPolicy } from "./retry-D4GJ670a.js";
|
|
23
|
-
import { SendActivityError, extractInboxes, sendActivity } from "./send-
|
|
23
|
+
import { SendActivityError, extractInboxes, sendActivity } from "./send-B6-e-9Y3.js";
|
|
24
24
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
25
25
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
26
26
|
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
|
3
|
+
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
|
+
|
|
5
|
+
require('./transformers-3g8GZwkZ.cjs');
|
|
6
|
+
require('./http-Bvd_BGyN.cjs');
|
|
7
|
+
const require_middleware = require('./middleware-B0NuaTNY.cjs');
|
|
8
|
+
require('./proof-C7UiDzR3.cjs');
|
|
9
|
+
require('./types-Cd_hszr_.cjs');
|
|
10
|
+
require('./kv-cache-D1eptI1n.cjs');
|
|
11
|
+
|
|
12
|
+
exports.FederationImpl = require_middleware.FederationImpl;
|
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "./deno-
|
|
7
|
-
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-
|
|
6
|
+
import "./deno-BjUkN8s-.js";
|
|
7
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-BJ9cm-yL.js";
|
|
8
8
|
import "./client-Dg7OfUDA.js";
|
|
9
9
|
import "./router-D9eI0s4b.js";
|
|
10
10
|
import "./types-CPz01LGH.js";
|
|
11
|
-
import "./key-
|
|
12
|
-
import "./http-
|
|
13
|
-
import "./ld-
|
|
14
|
-
import "./owner-
|
|
15
|
-
import "./proof-
|
|
16
|
-
import "./docloader-
|
|
11
|
+
import "./key-BhiALrBI.js";
|
|
12
|
+
import "./http-CbHnS3UI.js";
|
|
13
|
+
import "./ld-D0_AzG_F.js";
|
|
14
|
+
import "./owner-MCLLoNbG.js";
|
|
15
|
+
import "./proof-9qZ1mx-q.js";
|
|
16
|
+
import "./docloader-rDZ2DL9o.js";
|
|
17
17
|
import "./kv-cache-B__dHl7g.js";
|
|
18
|
-
import "./inbox-
|
|
19
|
-
import "./builder-
|
|
18
|
+
import "./inbox-bAHUiFm9.js";
|
|
19
|
+
import "./builder-Crn6DW5-.js";
|
|
20
20
|
import "./collection-CcnIw1qY.js";
|
|
21
21
|
import "./keycache-DRxpZ5r9.js";
|
|
22
22
|
import "./negotiation-5NPJL6zp.js";
|
|
23
23
|
import "./retry-D4GJ670a.js";
|
|
24
|
-
import "./send-
|
|
24
|
+
import "./send-B6-e-9Y3.js";
|
|
25
25
|
|
|
26
26
|
export { FederationImpl };
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
5
|
import { getDefaultActivityTransformers } from "./transformers-C3FLHUd6.js";
|
|
6
|
-
import { deno_default, doubleKnock, exportJwk, importJwk, validateCryptoKey, verifyRequest } from "./http-
|
|
7
|
-
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-
|
|
6
|
+
import { deno_default, doubleKnock, exportJwk, importJwk, validateCryptoKey, verifyRequest } from "./http-BMn0rKX2.js";
|
|
7
|
+
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-bmLHpL0t.js";
|
|
8
8
|
import { getNodeInfo, nodeInfoToJson } from "./types-C93Ob9cU.js";
|
|
9
|
-
import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-
|
|
9
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-DVChfAIM.js";
|
|
10
10
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
11
11
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
12
12
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
@@ -338,7 +338,7 @@ var FederationBuilderImpl = class {
|
|
|
338
338
|
this.collectionTypeIds = {};
|
|
339
339
|
}
|
|
340
340
|
async build(options) {
|
|
341
|
-
const { FederationImpl: FederationImpl$1 } = await import("./middleware-
|
|
341
|
+
const { FederationImpl: FederationImpl$1 } = await import("./middleware-B08vM9fr.js");
|
|
342
342
|
const f = new FederationImpl$1(options);
|
|
343
343
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
344
344
|
f.router = this.router.clone();
|
|
@@ -2087,6 +2087,34 @@ function sendActivity(options) {
|
|
|
2087
2087
|
}
|
|
2088
2088
|
});
|
|
2089
2089
|
}
|
|
2090
|
+
const MAX_ERROR_RESPONSE_BODY_BYTES = 1024;
|
|
2091
|
+
async function readLimitedResponseBody(response, maxBytes) {
|
|
2092
|
+
if (response.body == null) return "";
|
|
2093
|
+
const reader = response.body.getReader();
|
|
2094
|
+
const decoder = new TextDecoder();
|
|
2095
|
+
const chunks = [];
|
|
2096
|
+
let totalBytes = 0;
|
|
2097
|
+
let truncated = false;
|
|
2098
|
+
try {
|
|
2099
|
+
while (true) {
|
|
2100
|
+
const { done, value } = await reader.read();
|
|
2101
|
+
if (done) break;
|
|
2102
|
+
if (totalBytes + value.length > maxBytes) {
|
|
2103
|
+
const remaining = maxBytes - totalBytes;
|
|
2104
|
+
if (remaining > 0) chunks.push(decoder.decode(value.slice(0, remaining), { stream: true }));
|
|
2105
|
+
truncated = true;
|
|
2106
|
+
break;
|
|
2107
|
+
}
|
|
2108
|
+
chunks.push(decoder.decode(value, { stream: true }));
|
|
2109
|
+
totalBytes += value.length;
|
|
2110
|
+
}
|
|
2111
|
+
} finally {
|
|
2112
|
+
reader.releaseLock();
|
|
2113
|
+
}
|
|
2114
|
+
let result = chunks.join("");
|
|
2115
|
+
if (truncated) result += "… (truncated)";
|
|
2116
|
+
return result;
|
|
2117
|
+
}
|
|
2090
2118
|
async function sendActivityInternal({ activity, activityId, keys, inbox, headers, specDeterminer, tracerProvider }, span) {
|
|
2091
2119
|
const logger$1 = getLogger([
|
|
2092
2120
|
"fedify",
|
|
@@ -2129,7 +2157,7 @@ async function sendActivityInternal({ activity, activityId, keys, inbox, headers
|
|
|
2129
2157
|
if (!response.ok) {
|
|
2130
2158
|
let error;
|
|
2131
2159
|
try {
|
|
2132
|
-
error = await response
|
|
2160
|
+
error = await readLimitedResponseBody(response, MAX_ERROR_RESPONSE_BODY_BYTES);
|
|
2133
2161
|
} catch (_) {
|
|
2134
2162
|
error = "";
|
|
2135
2163
|
}
|
|
@@ -2164,7 +2192,10 @@ var SendActivityError = class extends Error {
|
|
|
2164
2192
|
*/
|
|
2165
2193
|
statusCode;
|
|
2166
2194
|
/**
|
|
2167
|
-
* The response body from the inbox, if any.
|
|
2195
|
+
* The response body from the inbox, if any. Note that this may be
|
|
2196
|
+
* truncated to a maximum of 1 KiB to prevent excessive memory consumption
|
|
2197
|
+
* when remote servers return large error pages (e.g., Cloudflare error pages).
|
|
2198
|
+
* If truncated, the string will end with `"… (truncated)"`.
|
|
2168
2199
|
*/
|
|
2169
2200
|
responseBody;
|
|
2170
2201
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActorAliasMapper, ActorDispatcher, ActorHandleMapper, RequestContext, WebFingerLinksDispatcher } from "./context-
|
|
1
|
+
import { ActorAliasMapper, ActorDispatcher, ActorHandleMapper, RequestContext, WebFingerLinksDispatcher } from "./context-BdNW_8a3.cjs";
|
|
2
2
|
import { Span, Tracer } from "@opentelemetry/api";
|
|
3
3
|
|
|
4
4
|
//#region src/federation/webfinger.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { ActorAliasMapper, ActorDispatcher, ActorHandleMapper, RequestContext, WebFingerLinksDispatcher } from "./context-
|
|
3
|
+
import { ActorAliasMapper, ActorDispatcher, ActorHandleMapper, RequestContext, WebFingerLinksDispatcher } from "./context-C-GVKcJR.js";
|
|
4
4
|
import { Span, Tracer } from "@opentelemetry/api";
|
|
5
5
|
|
|
6
6
|
//#region src/federation/webfinger.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { ActivityTransformer, Context } from "./context-
|
|
3
|
+
import { ActivityTransformer, Context } from "./context-C-GVKcJR.js";
|
|
4
4
|
import { Activity } from "@fedify/vocab";
|
|
5
5
|
|
|
6
6
|
//#region src/compat/transformers.d.ts
|
package/dist/mod.cjs
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
const require_chunk = require('./chunk-CGaQZ11T.cjs');
|
|
6
6
|
const require_transformers = require('./transformers-3g8GZwkZ.cjs');
|
|
7
7
|
require('./compat-DmDDELst.cjs');
|
|
8
|
-
const require_http = require('./http-
|
|
9
|
-
const require_middleware = require('./middleware-
|
|
10
|
-
const require_proof = require('./proof-
|
|
8
|
+
const require_http = require('./http-Bvd_BGyN.cjs');
|
|
9
|
+
const require_middleware = require('./middleware-B0NuaTNY.cjs');
|
|
10
|
+
const require_proof = require('./proof-C7UiDzR3.cjs');
|
|
11
11
|
const require_federation = require('./federation-Bp3HI26G.cjs');
|
|
12
12
|
const require_types = require('./types-Cd_hszr_.cjs');
|
|
13
|
-
const require_kv_cache = require('./kv-cache-
|
|
13
|
+
const require_kv_cache = require('./kv-cache-D1eptI1n.cjs');
|
|
14
14
|
require('./nodeinfo-DuMYTpbZ.cjs');
|
|
15
15
|
const require_runtime = require('./runtime-c2Njxsry.cjs');
|
|
16
16
|
require('./sig-vX39WyWI.cjs');
|
package/dist/mod.d.cts
CHANGED
|
@@ -2,10 +2,10 @@ import { __export, __reExport, mod_d_exports } from "./mod-Bh8mqlYw.cjs";
|
|
|
2
2
|
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo } from "./client-CwkOPN13.cjs";
|
|
3
3
|
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-CCEu-x1_.cjs";
|
|
4
4
|
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-9yZ5Ibsb.cjs";
|
|
5
|
-
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-
|
|
5
|
+
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-BdNW_8a3.cjs";
|
|
6
6
|
import { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore } from "./kv-g9jFc34-.cjs";
|
|
7
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-
|
|
8
|
-
import { WebFingerHandlerParameters, handleWebFinger } from "./mod-
|
|
7
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-5PNty1K9.cjs";
|
|
8
|
+
import { WebFingerHandlerParameters, handleWebFinger } from "./mod-BcpEGTWV.cjs";
|
|
9
9
|
import "./mod-gq_Xfdz8.cjs";
|
|
10
10
|
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-COO7VMcm.cjs";
|
|
11
11
|
import { getAuthenticatedDocumentLoader, kvCache } from "./mod-ErTjUJs9.cjs";
|
package/dist/mod.d.ts
CHANGED
|
@@ -4,10 +4,10 @@ import { __export, __reExport } from "./chunk-DJNbSFdH.js";
|
|
|
4
4
|
import { GetNodeInfoOptions, InboundService, JsonValue, NodeInfo, OutboundService, ParseNodeInfoOptions, Protocol, Services, Software, Usage, getNodeInfo, nodeInfoToJson, parseNodeInfo } from "./client-a7NwzhA2.js";
|
|
5
5
|
import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, KeyCache, SignRequestOptions, VerifyRequestOptions, exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-CODSJcKx.js";
|
|
6
6
|
import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-DQYAbVmX.js";
|
|
7
|
-
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-
|
|
7
|
+
import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-C-GVKcJR.js";
|
|
8
8
|
import { KvKey, KvStore, KvStoreListEntry, KvStoreSetOptions, MemoryKvStore } from "./kv-jg_8SMc1.js";
|
|
9
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-
|
|
10
|
-
import { WebFingerHandlerParameters, handleWebFinger } from "./mod-
|
|
9
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-Da9fNDyC.js";
|
|
10
|
+
import { WebFingerHandlerParameters, handleWebFinger } from "./mod-CtO31FCx.js";
|
|
11
11
|
import "./mod-AGjRfPjT.js";
|
|
12
12
|
import { mod_d_exports } from "./mod-D6HodEq7.js";
|
|
13
13
|
import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-q2IR8UiH.js";
|
package/dist/mod.js
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
import { __export, __reExport } from "./chunk-DJNbSFdH.js";
|
|
6
6
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./transformers-C3FLHUd6.js";
|
|
7
7
|
import "./compat-Bb4NuTUO.js";
|
|
8
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-
|
|
9
|
-
import { Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-
|
|
10
|
-
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-
|
|
8
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-BMn0rKX2.js";
|
|
9
|
+
import { Router, RouterError, SendActivityError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, handleWebFinger, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-DTNhiMNN.js";
|
|
10
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-bmLHpL0t.js";
|
|
11
11
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-DaMfqRm4.js";
|
|
12
12
|
import { getNodeInfo, nodeInfoToJson, parseNodeInfo } from "./types-C93Ob9cU.js";
|
|
13
|
-
import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-
|
|
13
|
+
import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-DVChfAIM.js";
|
|
14
14
|
import "./nodeinfo-DoESQxq5.js";
|
|
15
15
|
import { runtime_exports } from "./runtime-poamPCMb.js";
|
|
16
16
|
import "./sig-BNhspNOf.js";
|
|
@@ -8,25 +8,25 @@ import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
|
8
8
|
import "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
10
|
import { MemoryKvStore } from "../kv-QzKcOQgP.js";
|
|
11
|
-
import "../deno-
|
|
12
|
-
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-
|
|
11
|
+
import "../deno-BjUkN8s-.js";
|
|
12
|
+
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-BJ9cm-yL.js";
|
|
13
13
|
import "../client-Dg7OfUDA.js";
|
|
14
14
|
import "../router-D9eI0s4b.js";
|
|
15
15
|
import "../types-CPz01LGH.js";
|
|
16
|
-
import "../key-
|
|
17
|
-
import "../http-
|
|
18
|
-
import "../ld-
|
|
19
|
-
import "../owner-
|
|
20
|
-
import "../proof-
|
|
21
|
-
import "../docloader-
|
|
16
|
+
import "../key-BhiALrBI.js";
|
|
17
|
+
import "../http-CbHnS3UI.js";
|
|
18
|
+
import "../ld-D0_AzG_F.js";
|
|
19
|
+
import "../owner-MCLLoNbG.js";
|
|
20
|
+
import "../proof-9qZ1mx-q.js";
|
|
21
|
+
import "../docloader-rDZ2DL9o.js";
|
|
22
22
|
import "../kv-cache-B__dHl7g.js";
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
23
|
+
import "../inbox-bAHUiFm9.js";
|
|
24
|
+
import "../builder-Crn6DW5-.js";
|
|
25
25
|
import "../collection-CcnIw1qY.js";
|
|
26
26
|
import "../keycache-DRxpZ5r9.js";
|
|
27
27
|
import "../negotiation-5NPJL6zp.js";
|
|
28
28
|
import "../retry-D4GJ670a.js";
|
|
29
|
-
import "../send-
|
|
29
|
+
import "../send-B6-e-9Y3.js";
|
|
30
30
|
import "../std__assert-DWivtrGR.js";
|
|
31
31
|
import "../assert_rejects-Ce45JcFg.js";
|
|
32
32
|
import "../assert_throws-BNXdRGWP.js";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./deno-
|
|
6
|
+
import { deno_default } from "./deno-BjUkN8s-.js";
|
|
7
7
|
import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
8
8
|
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./deno-
|
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
|
6
|
+
import { deno_default } from "./deno-BjUkN8s-.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-BhiALrBI.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
|
|
10
10
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
5
|
const require_chunk = require('./chunk-CGaQZ11T.cjs');
|
|
6
|
-
const require_http = require('./http-
|
|
6
|
+
const require_http = require('./http-Bvd_BGyN.cjs');
|
|
7
7
|
const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
|
8
8
|
const __fedify_vocab = require_chunk.__toESM(require("@fedify/vocab"));
|
|
9
9
|
const __opentelemetry_api = require_chunk.__toESM(require("@opentelemetry/api"));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { deno_default, fetchKey, validateCryptoKey } from "./http-
|
|
5
|
+
import { deno_default, fetchKey, validateCryptoKey } from "./http-BMn0rKX2.js";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "@fedify/vocab";
|
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { deno_default } from "./deno-
|
|
7
|
-
import { doubleKnock } from "./http-
|
|
6
|
+
import { deno_default } from "./deno-BjUkN8s-.js";
|
|
7
|
+
import { doubleKnock } from "./http-CbHnS3UI.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
|
|
@@ -67,6 +67,34 @@ function sendActivity(options) {
|
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
+
const MAX_ERROR_RESPONSE_BODY_BYTES = 1024;
|
|
71
|
+
async function readLimitedResponseBody(response, maxBytes) {
|
|
72
|
+
if (response.body == null) return "";
|
|
73
|
+
const reader = response.body.getReader();
|
|
74
|
+
const decoder = new TextDecoder();
|
|
75
|
+
const chunks = [];
|
|
76
|
+
let totalBytes = 0;
|
|
77
|
+
let truncated = false;
|
|
78
|
+
try {
|
|
79
|
+
while (true) {
|
|
80
|
+
const { done, value } = await reader.read();
|
|
81
|
+
if (done) break;
|
|
82
|
+
if (totalBytes + value.length > maxBytes) {
|
|
83
|
+
const remaining = maxBytes - totalBytes;
|
|
84
|
+
if (remaining > 0) chunks.push(decoder.decode(value.slice(0, remaining), { stream: true }));
|
|
85
|
+
truncated = true;
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
chunks.push(decoder.decode(value, { stream: true }));
|
|
89
|
+
totalBytes += value.length;
|
|
90
|
+
}
|
|
91
|
+
} finally {
|
|
92
|
+
reader.releaseLock();
|
|
93
|
+
}
|
|
94
|
+
let result = chunks.join("");
|
|
95
|
+
if (truncated) result += "… (truncated)";
|
|
96
|
+
return result;
|
|
97
|
+
}
|
|
70
98
|
async function sendActivityInternal({ activity, activityId, keys, inbox, headers, specDeterminer, tracerProvider }, span) {
|
|
71
99
|
const logger = getLogger([
|
|
72
100
|
"fedify",
|
|
@@ -109,7 +137,7 @@ async function sendActivityInternal({ activity, activityId, keys, inbox, headers
|
|
|
109
137
|
if (!response.ok) {
|
|
110
138
|
let error;
|
|
111
139
|
try {
|
|
112
|
-
error = await response
|
|
140
|
+
error = await readLimitedResponseBody(response, MAX_ERROR_RESPONSE_BODY_BYTES);
|
|
113
141
|
} catch (_) {
|
|
114
142
|
error = "";
|
|
115
143
|
}
|
|
@@ -144,7 +172,10 @@ var SendActivityError = class extends Error {
|
|
|
144
172
|
*/
|
|
145
173
|
statusCode;
|
|
146
174
|
/**
|
|
147
|
-
* The response body from the inbox, if any.
|
|
175
|
+
* The response body from the inbox, if any. Note that this may be
|
|
176
|
+
* truncated to a maximum of 1 KiB to prevent excessive memory consumption
|
|
177
|
+
* when remote servers return large error pages (e.g., Cloudflare error pages).
|
|
178
|
+
* If truncated, the string will end with `"… (truncated)"`.
|
|
148
179
|
*/
|
|
149
180
|
responseBody;
|
|
150
181
|
/**
|
package/dist/sig/http.test.js
CHANGED
|
@@ -7,9 +7,9 @@ import { mockDocumentLoader, test } from "../dist-B5f6a8Tt.js";
|
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import "../deno-
|
|
11
|
-
import { exportJwk } from "../key-
|
|
12
|
-
import { createRfc9421SignatureBase, doubleKnock, formatRfc9421Signature, formatRfc9421SignatureParameters, parseRfc9421Signature, parseRfc9421SignatureInput, signRequest, timingSafeEqual, verifyRequest } from "../http-
|
|
10
|
+
import "../deno-BjUkN8s-.js";
|
|
11
|
+
import { exportJwk } from "../key-BhiALrBI.js";
|
|
12
|
+
import { createRfc9421SignatureBase, doubleKnock, formatRfc9421Signature, formatRfc9421SignatureParameters, parseRfc9421Signature, parseRfc9421SignatureInput, signRequest, timingSafeEqual, verifyRequest } from "../http-CbHnS3UI.js";
|
|
13
13
|
import { assertExists, assertStringIncludes } from "../std__assert-DWivtrGR.js";
|
|
14
14
|
import { assertFalse, assertRejects } from "../assert_rejects-Ce45JcFg.js";
|
|
15
15
|
import { assertThrows } from "../assert_throws-BNXdRGWP.js";
|
package/dist/sig/key.test.js
CHANGED
|
@@ -7,8 +7,8 @@ import { mockDocumentLoader, test } from "../dist-B5f6a8Tt.js";
|
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import "../deno-
|
|
11
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "../key-
|
|
10
|
+
import "../deno-BjUkN8s-.js";
|
|
11
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "../key-BhiALrBI.js";
|
|
12
12
|
import "../std__assert-DWivtrGR.js";
|
|
13
13
|
import { assertRejects } from "../assert_rejects-Ce45JcFg.js";
|
|
14
14
|
import { assertThrows } from "../assert_throws-BNXdRGWP.js";
|
package/dist/sig/ld.test.js
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
import { mockDocumentLoader, test } from "../dist-B5f6a8Tt.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
|
-
import "../deno-
|
|
10
|
-
import { generateCryptoKeyPair } from "../key-
|
|
11
|
-
import { attachSignature, createSignature, detachSignature, signJsonLd, verifyJsonLd, verifySignature } from "../ld-
|
|
9
|
+
import "../deno-BjUkN8s-.js";
|
|
10
|
+
import { generateCryptoKeyPair } from "../key-BhiALrBI.js";
|
|
11
|
+
import { attachSignature, createSignature, detachSignature, signJsonLd, verifyJsonLd, verifySignature } from "../ld-D0_AzG_F.js";
|
|
12
12
|
import { assertFalse, assertRejects } from "../assert_rejects-Ce45JcFg.js";
|
|
13
13
|
import { assertThrows } from "../assert_throws-BNXdRGWP.js";
|
|
14
14
|
import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPrivateKey3, rsaPublicKey2, rsaPublicKey3 } from "../keys-ZbcByPg9.js";
|
package/dist/sig/mod.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
3
3
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
4
4
|
|
|
5
|
-
const require_http = require('../http-
|
|
6
|
-
const require_proof = require('../proof-
|
|
5
|
+
const require_http = require('../http-Bvd_BGyN.cjs');
|
|
6
|
+
const require_proof = require('../proof-C7UiDzR3.cjs');
|
|
7
7
|
require('../sig-vX39WyWI.cjs');
|
|
8
8
|
|
|
9
9
|
exports.attachSignature = require_proof.attachSignature;
|
package/dist/sig/mod.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "../http-
|
|
6
|
-
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../proof-
|
|
5
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "../http-BMn0rKX2.js";
|
|
6
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "../proof-bmLHpL0t.js";
|
|
7
7
|
import "../sig-BNhspNOf.js";
|
|
8
8
|
|
|
9
9
|
export { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getKeyOwner, importJwk, signJsonLd, signObject, signRequest, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
|
package/dist/sig/owner.test.js
CHANGED
|
@@ -7,9 +7,9 @@ import { createTestTracerProvider, mockDocumentLoader, test } from "../dist-B5f6
|
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
9
|
import "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import "../deno-
|
|
11
|
-
import "../key-
|
|
12
|
-
import { doesActorOwnKey, getKeyOwner } from "../owner-
|
|
10
|
+
import "../deno-BjUkN8s-.js";
|
|
11
|
+
import "../key-BhiALrBI.js";
|
|
12
|
+
import { doesActorOwnKey, getKeyOwner } from "../owner-MCLLoNbG.js";
|
|
13
13
|
import "../std__assert-DWivtrGR.js";
|
|
14
14
|
import { assertFalse } from "../assert_rejects-Ce45JcFg.js";
|
|
15
15
|
import "../assert_throws-BNXdRGWP.js";
|
package/dist/sig/proof.test.js
CHANGED
|
@@ -7,9 +7,9 @@ import { mockDocumentLoader, test } from "../dist-B5f6a8Tt.js";
|
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import "../assert-MZs1qjMx.js";
|
|
9
9
|
import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import "../deno-
|
|
11
|
-
import "../key-
|
|
12
|
-
import { createProof, signObject, verifyObject, verifyProof } from "../proof-
|
|
10
|
+
import "../deno-BjUkN8s-.js";
|
|
11
|
+
import "../key-BhiALrBI.js";
|
|
12
|
+
import { createProof, signObject, verifyObject, verifyProof } from "../proof-9qZ1mx-q.js";
|
|
13
13
|
import "../std__assert-DWivtrGR.js";
|
|
14
14
|
import { assertRejects } from "../assert_rejects-Ce45JcFg.js";
|
|
15
15
|
import "../assert_throws-BNXdRGWP.js";
|
package/dist/testing/mod.d.ts
CHANGED
|
@@ -270,7 +270,10 @@ declare class SendActivityError extends Error {
|
|
|
270
270
|
*/
|
|
271
271
|
readonly statusCode: number;
|
|
272
272
|
/**
|
|
273
|
-
* The response body from the inbox, if any.
|
|
273
|
+
* The response body from the inbox, if any. Note that this may be
|
|
274
|
+
* truncated to a maximum of 1 KiB to prevent excessive memory consumption
|
|
275
|
+
* when remote servers return large error pages (e.g., Cloudflare error pages).
|
|
276
|
+
* If truncated, the string will end with `"… (truncated)"`.
|
|
274
277
|
*/
|
|
275
278
|
readonly responseBody: string;
|
|
276
279
|
/**
|