@fedify/fedify 1.9.0-dev.1426 → 1.9.0-dev.1461
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/README.md +18 -14
- package/dist/{actor-DBVIhd3g.js → actor-Bnmy-5Nt.js} +1 -1
- package/dist/{actor-CgMSXJ7T.js → actor-DKLEbAL7.js} +187 -187
- package/dist/{authdocloader-Cl_S6m_U.js → authdocloader-C3dqTyRk.js} +3 -3
- package/dist/{authdocloader-GJlMpzlI.js → authdocloader-Ch1dTB6i.js} +3 -3
- package/dist/{builder-DeF3DvGa.js → builder-DOnG508o.js} +4 -4
- package/dist/{client-D1DkBgMW.js → client-Be6Zm6Qo.js} +1 -1
- package/dist/compat/transformers.test.js +16 -16
- package/dist/{denokv-2x6-IpXO.js → denokv-Bv33Xxea.js} +7 -0
- package/dist/{docloader-BSCctXal.js → docloader-BBKozvwM.js} +2 -2
- package/dist/{esm-CC8HHtIX.js → esm-hqPuFfCN.js} +1 -1
- package/dist/federation/builder.test.js +5 -5
- package/dist/federation/collection.test.js +3 -3
- package/dist/federation/handler.test.js +17 -17
- package/dist/federation/inbox.test.js +4 -4
- package/dist/federation/keycache.test.js +4 -4
- package/dist/federation/kv.test.js +3 -3
- package/dist/federation/middleware.test.js +18 -18
- package/dist/federation/mod.js +10 -10
- package/dist/federation/mq.test.js +5 -5
- package/dist/federation/retry.test.js +3 -3
- package/dist/federation/router.test.js +3 -3
- package/dist/federation/send.test.js +10 -10
- package/dist/fixtures/oeee.cafe/ap/users/3609fd4e-d51d-4db8-9f04-4189815864dd.json +24 -0
- package/dist/{http-CEL1OpoJ.js → http-CVGIQDIM.js} +50 -4
- package/dist/{http-BRkdMiKk.js → http-DHfs_YOG.js} +51 -5
- package/dist/{inbox-DgeNUDDq.js → inbox-BF56GsRS.js} +1 -1
- package/dist/{key-BFZkjEdF.js → key-BZjRR6o0.js} +2 -2
- package/dist/{key-DxDW5e94.js → key-C0-cZXSz.js} +2 -2
- package/dist/{key-DqLks8WZ.js → key-D_cYSLwi.js} +3 -3
- package/dist/{key-CnDYMoEy.js → key-se4E48YX.js} +4 -4
- package/dist/{keycache-DiK_ysAm.js → keycache-XTiCGJXo.js} +1 -1
- package/dist/{keys-CU3pwbgD.js → keys-KSJYwlm7.js} +1 -1
- package/dist/{ld-DZBKkjYA.js → ld-DGTowKKX.js} +2 -2
- package/dist/{lookup-2btkCjyT.js → lookup-jyRLW_1A.js} +1 -1
- package/dist/{lookup-Cni8TEY-.js → lookup-oH4Tkz5u.js} +1 -1
- package/dist/middleware-BaAoxBlu.js +17 -0
- package/dist/middleware-DNxcRiWz.js +26 -0
- package/dist/{middleware-CccxNSFX.js → middleware-DvI0zggU.js} +10 -10
- package/dist/{middleware-DPJZ1_pj.js → middleware-Lka8gMFX.js} +13 -13
- package/dist/mod.js +10 -10
- package/dist/nodeinfo/client.test.js +5 -5
- package/dist/nodeinfo/handler.test.js +16 -16
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +3 -3
- package/dist/nodeinfo/types.test.js +3 -3
- package/dist/{owner-C7mGG_7y.js → owner-BcisYGga.js} +2 -2
- package/dist/{proof-CMLfMbze.js → proof-D4Lf3ygt.js} +3 -3
- package/dist/{proof-jMo9AJgi.js → proof-DjpZy3G2.js} +2 -2
- package/dist/runtime/authdocloader.test.js +9 -9
- package/dist/runtime/docloader.test.js +28 -4
- package/dist/runtime/key.test.js +5 -5
- package/dist/runtime/langstr.test.js +3 -3
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +3 -3
- package/dist/runtime/url.test.js +3 -3
- package/dist/{send-DxWNr0-E.js → send-Cy_hTnC2.js} +2 -2
- package/dist/sig/http.test.js +24 -8
- package/dist/sig/key.test.js +6 -6
- package/dist/sig/ld.test.js +7 -7
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +7 -7
- package/dist/sig/proof.test.js +7 -7
- package/dist/testing/docloader.test.js +3 -3
- package/dist/testing/mod.js +3 -3
- package/dist/{testing-DsZhG4d1.js → testing-DlDa_1MN.js} +2 -2
- package/dist/{type-Caga0-TR.js → type-CV54_GsW.js} +187 -187
- package/dist/{types-DJjc-Yj8.js → types-csgj3KOJ.js} +1 -1
- package/dist/vocab/actor.test.js +5 -5
- package/dist/vocab/lookup.test.js +4 -4
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +3 -3
- package/dist/vocab/vocab.test.js +4 -4
- package/dist/{vocab-B7bJTtQA.js → vocab-rGoe8nQD.js} +3 -3
- package/dist/webfinger/handler.test.js +16 -16
- package/dist/webfinger/lookup.test.js +4 -4
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.d.ts +8 -0
- package/dist/x/cfworkers.js +14 -0
- package/dist/x/cfworkers.test.js +16 -3
- package/dist/x/hono.d.ts +8 -0
- package/dist/x/hono.js +12 -0
- package/dist/x/sveltekit.d.ts +4 -0
- package/dist/x/sveltekit.js +12 -0
- package/package.json +1 -1
- package/dist/middleware-BrcymdJX.js +0 -26
- package/dist/middleware-mCOJY7S6.js +0 -17
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { deno_default } from "./docloader-
|
|
6
|
-
import { CryptographicKey } from "./actor-
|
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
|
5
|
+
import { deno_default } from "./docloader-BBKozvwM.js";
|
|
6
|
+
import { CryptographicKey } from "./actor-DKLEbAL7.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-C0-cZXSz.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
|
@@ -366,7 +366,7 @@ async function verifyRequestDraft(request, span, { documentLoader, contextLoader
|
|
|
366
366
|
return null;
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
const sigValues = Object.fromEntries(sigHeader.split(",").map((pair) => pair.match(/^\s*([A-Za-z]+)="([^"]*)"\s*$/)).filter((m) => m != null).map((m) => m
|
|
369
|
+
const sigValues = Object.fromEntries(sigHeader.split(",").map((pair) => pair.match(/^\s*([A-Za-z]+)=(?:"([^"]*)"|(\d+))\s*$/)).filter((m) => m != null).map((m) => [m[1], m[2] ?? m[3]]));
|
|
370
370
|
if (!("keyId" in sigValues)) {
|
|
371
371
|
logger.debug("Failed to verify; no keyId field found in the Signature header.", { signature: sigHeader });
|
|
372
372
|
return null;
|
|
@@ -377,6 +377,52 @@ async function verifyRequestDraft(request, span, { documentLoader, contextLoader
|
|
|
377
377
|
logger.debug("Failed to verify; no signature field found in the Signature header.", { signature: sigHeader });
|
|
378
378
|
return null;
|
|
379
379
|
}
|
|
380
|
+
if ("expires" in sigValues) {
|
|
381
|
+
const expiresSeconds = parseInt(sigValues.expires);
|
|
382
|
+
if (!Number.isInteger(expiresSeconds)) {
|
|
383
|
+
logger.debug("Failed to verify; invalid expires field in the Signature header: {expires}.", {
|
|
384
|
+
expires: sigValues.expires,
|
|
385
|
+
signature: sigHeader
|
|
386
|
+
});
|
|
387
|
+
return null;
|
|
388
|
+
}
|
|
389
|
+
const expires = Temporal.Instant.fromEpochMilliseconds(expiresSeconds * 1e3);
|
|
390
|
+
if (Temporal.Instant.compare(now, expires) > 0) {
|
|
391
|
+
logger.debug("Failed to verify; signature expired at {expires} (now: {now}).", {
|
|
392
|
+
expires: expires.toString(),
|
|
393
|
+
now: now.toString(),
|
|
394
|
+
signature: sigHeader
|
|
395
|
+
});
|
|
396
|
+
return null;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
if ("created" in sigValues) {
|
|
400
|
+
const createdSeconds = parseInt(sigValues.created);
|
|
401
|
+
if (!Number.isInteger(createdSeconds)) {
|
|
402
|
+
logger.debug("Failed to verify; invalid created field in the Signature header: {created}.", {
|
|
403
|
+
created: sigValues.created,
|
|
404
|
+
signature: sigHeader
|
|
405
|
+
});
|
|
406
|
+
return null;
|
|
407
|
+
}
|
|
408
|
+
if (timeWindow !== false) {
|
|
409
|
+
const created = Temporal.Instant.fromEpochMilliseconds(createdSeconds * 1e3);
|
|
410
|
+
const tw = timeWindow ?? { minutes: 1 };
|
|
411
|
+
if (Temporal.Instant.compare(created, now.add(tw)) > 0) {
|
|
412
|
+
logger.debug("Failed to verify; created is too far in the future.", {
|
|
413
|
+
created: created.toString(),
|
|
414
|
+
now: now.toString()
|
|
415
|
+
});
|
|
416
|
+
return null;
|
|
417
|
+
} else if (Temporal.Instant.compare(created, now.subtract(tw)) < 0) {
|
|
418
|
+
logger.debug("Failed to verify; created is too far in the past.", {
|
|
419
|
+
created: created.toString(),
|
|
420
|
+
now: now.toString()
|
|
421
|
+
});
|
|
422
|
+
return null;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
380
426
|
const { keyId, headers, signature } = sigValues;
|
|
381
427
|
span?.setAttribute("http_signatures.key_id", keyId);
|
|
382
428
|
if ("algorithm" in sigValues) span?.setAttribute("http_signatures.algorithm", sigValues.algorithm);
|
|
@@ -396,7 +442,7 @@ async function verifyRequestDraft(request, span, { documentLoader, contextLoader
|
|
|
396
442
|
logger.debug("Failed to verify; required headers missing in the Signature header: {headers}.", { headers });
|
|
397
443
|
return null;
|
|
398
444
|
}
|
|
399
|
-
const message = headerNames.map((name) => `${name}: ` + (name
|
|
445
|
+
const message = headerNames.map((name) => `${name}: ` + (name === "(request-target)" ? `${request.method.toLowerCase()} ${new URL(request.url).pathname}` : name === "(created)" ? sigValues.created ?? "" : name === "(expires)" ? sigValues.expires ?? "" : name === "host" ? request.headers.get("host") ?? new URL(request.url).host : request.headers.get(name))).join("\n");
|
|
400
446
|
const sig = decodeBase64(signature);
|
|
401
447
|
span?.setAttribute("http_signatures.signature", encodeHex(sig));
|
|
402
448
|
const verified = await crypto.subtle.verify("RSASSA-PKCS1-v1_5", key.publicKey, sig, new TextEncoder().encode(message));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, deno_default, getTypeId } from "./type-
|
|
6
|
+
import { Activity, deno_default, getTypeId } from "./type-CV54_GsW.js";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
9
9
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { CryptographicKey, Object as Object$1, deno_default, getDocumentLoader } from "./type-
|
|
7
|
-
import { isActor } from "./actor-
|
|
6
|
+
import { CryptographicKey, Object as Object$1, deno_default, getDocumentLoader } from "./type-CV54_GsW.js";
|
|
7
|
+
import { isActor } from "./actor-Bnmy-5Nt.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { deno_default, getDocumentLoader } from "./docloader-
|
|
6
|
-
import { CryptographicKey, Object as Object$1, isActor } from "./actor-
|
|
5
|
+
import { deno_default, getDocumentLoader } from "./docloader-BBKozvwM.js";
|
|
6
|
+
import { CryptographicKey, Object as Object$1, isActor } from "./actor-DKLEbAL7.js";
|
|
7
7
|
import { getLogger } from "@logtape/logtape";
|
|
8
8
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
9
9
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "./type-
|
|
7
|
-
import "./actor-
|
|
8
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-
|
|
6
|
+
import "./type-CV54_GsW.js";
|
|
7
|
+
import "./actor-Bnmy-5Nt.js";
|
|
8
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-BZjRR6o0.js";
|
|
9
9
|
|
|
10
10
|
export { validateCryptoKey };
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import "./docloader-
|
|
6
|
-
import "./actor-
|
|
7
|
-
import "./lookup-
|
|
8
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-
|
|
5
|
+
import "./docloader-BBKozvwM.js";
|
|
6
|
+
import "./actor-DKLEbAL7.js";
|
|
7
|
+
import "./lookup-oH4Tkz5u.js";
|
|
8
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-C0-cZXSz.js";
|
|
9
9
|
|
|
10
10
|
export { validateCryptoKey };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { CryptographicKey, Multikey } from "./type-
|
|
6
|
+
import { CryptographicKey, Multikey } from "./type-CV54_GsW.js";
|
|
7
7
|
|
|
8
8
|
//#region src/federation/keycache.ts
|
|
9
9
|
var KvKeyCache = class {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { CryptographicKey, Multikey, importSpki } from "./type-
|
|
6
|
+
import { CryptographicKey, Multikey, importSpki } from "./type-CV54_GsW.js";
|
|
7
7
|
|
|
8
8
|
//#region src/testing/keys.ts
|
|
9
9
|
const rsaPublicKey1 = new CryptographicKey({
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, CryptographicKey, Object as Object$1, deno_default, getDocumentLoader, getTypeId } from "./type-
|
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
|
6
|
+
import { Activity, CryptographicKey, Object as Object$1, deno_default, getDocumentLoader, getTypeId } from "./type-CV54_GsW.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-BZjRR6o0.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Object as Object$1, deno_default, getDocumentLoader, getTypeId, lookupWebFinger } from "./type-
|
|
6
|
+
import { Object as Object$1, deno_default, getDocumentLoader, getTypeId, lookupWebFinger } from "./type-CV54_GsW.js";
|
|
7
7
|
import { cloneDeep, delay } from "es-toolkit";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanStatusCode, trace } from "@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 { UrlError, deno_default, getUserAgent, validatePublicUrl } from "./docloader-
|
|
5
|
+
import { UrlError, deno_default, getUserAgent, validatePublicUrl } from "./docloader-BBKozvwM.js";
|
|
6
6
|
import { getLogger } from "@logtape/logtape";
|
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
+
|
|
5
|
+
import "./transformers-Dna8Fg7k.js";
|
|
6
|
+
import "./docloader-BBKozvwM.js";
|
|
7
|
+
import "./actor-DKLEbAL7.js";
|
|
8
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-DvI0zggU.js";
|
|
9
|
+
import "./lookup-oH4Tkz5u.js";
|
|
10
|
+
import "./key-C0-cZXSz.js";
|
|
11
|
+
import "./http-DHfs_YOG.js";
|
|
12
|
+
import "./proof-D4Lf3ygt.js";
|
|
13
|
+
import "./types-csgj3KOJ.js";
|
|
14
|
+
import "./authdocloader-C3dqTyRk.js";
|
|
15
|
+
import "./vocab-rGoe8nQD.js";
|
|
16
|
+
|
|
17
|
+
export { FederationImpl };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
3
|
+
import { URLPattern } from "urlpattern-polyfill";
|
|
4
|
+
globalThis.addEventListener = () => {};
|
|
5
|
+
|
|
6
|
+
import "./type-CV54_GsW.js";
|
|
7
|
+
import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-Lka8gMFX.js";
|
|
8
|
+
import "./semver-dArNLkR9.js";
|
|
9
|
+
import "./client-Be6Zm6Qo.js";
|
|
10
|
+
import "./lookup-jyRLW_1A.js";
|
|
11
|
+
import "./types-BIgY6c-l.js";
|
|
12
|
+
import "./actor-Bnmy-5Nt.js";
|
|
13
|
+
import "./key-BZjRR6o0.js";
|
|
14
|
+
import "./http-CVGIQDIM.js";
|
|
15
|
+
import "./authdocloader-Ch1dTB6i.js";
|
|
16
|
+
import "./ld-DGTowKKX.js";
|
|
17
|
+
import "./owner-BcisYGga.js";
|
|
18
|
+
import "./proof-DjpZy3G2.js";
|
|
19
|
+
import "./inbox-BF56GsRS.js";
|
|
20
|
+
import "./builder-DOnG508o.js";
|
|
21
|
+
import "./collection-CSzG2j1P.js";
|
|
22
|
+
import "./keycache-XTiCGJXo.js";
|
|
23
|
+
import "./retry-D4GJ670a.js";
|
|
24
|
+
import "./send-Cy_hTnC2.js";
|
|
25
|
+
|
|
26
|
+
export { FederationImpl };
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
5
|
import { getDefaultActivityTransformers } from "./transformers-Dna8Fg7k.js";
|
|
6
|
-
import { deno_default, getDocumentLoader, kvCache } from "./docloader-
|
|
7
|
-
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId } from "./actor-
|
|
8
|
-
import { lookupWebFinger } from "./lookup-
|
|
9
|
-
import { exportJwk, importJwk, validateCryptoKey } from "./key-
|
|
10
|
-
import { doubleKnock, verifyRequest } from "./http-
|
|
11
|
-
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-
|
|
12
|
-
import { getNodeInfo, nodeInfoToJson } from "./types-
|
|
13
|
-
import { getAuthenticatedDocumentLoader } from "./authdocloader-
|
|
14
|
-
import { lookupObject, traverseCollection } from "./vocab-
|
|
6
|
+
import { deno_default, getDocumentLoader, kvCache } from "./docloader-BBKozvwM.js";
|
|
7
|
+
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId } from "./actor-DKLEbAL7.js";
|
|
8
|
+
import { lookupWebFinger } from "./lookup-oH4Tkz5u.js";
|
|
9
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-C0-cZXSz.js";
|
|
10
|
+
import { doubleKnock, verifyRequest } from "./http-DHfs_YOG.js";
|
|
11
|
+
import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-D4Lf3ygt.js";
|
|
12
|
+
import { getNodeInfo, nodeInfoToJson } from "./types-csgj3KOJ.js";
|
|
13
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-C3dqTyRk.js";
|
|
14
|
+
import { lookupObject, traverseCollection } from "./vocab-rGoe8nQD.js";
|
|
15
15
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
16
16
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
17
17
|
import { encodeHex } from "byte-encodings/hex";
|
|
@@ -320,7 +320,7 @@ var FederationBuilderImpl = class {
|
|
|
320
320
|
this.collectionTypeIds = {};
|
|
321
321
|
}
|
|
322
322
|
async build(options) {
|
|
323
|
-
const { FederationImpl: FederationImpl$1 } = await import("./middleware-
|
|
323
|
+
const { FederationImpl: FederationImpl$1 } = await import("./middleware-BaAoxBlu.js");
|
|
324
324
|
const f = new FederationImpl$1(options);
|
|
325
325
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
326
326
|
f.router = this.router.clone();
|
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, deno_default, getDocumentLoader, getTypeId, kvCache, lookupWebFinger } from "./type-
|
|
7
|
-
import { getNodeInfo } from "./client-
|
|
8
|
-
import { RouterError, lookupObject, traverseCollection } from "./lookup-
|
|
6
|
+
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, deno_default, getDocumentLoader, getTypeId, kvCache, lookupWebFinger } from "./type-CV54_GsW.js";
|
|
7
|
+
import { getNodeInfo } from "./client-Be6Zm6Qo.js";
|
|
8
|
+
import { RouterError, lookupObject, traverseCollection } from "./lookup-jyRLW_1A.js";
|
|
9
9
|
import { nodeInfoToJson } from "./types-BIgY6c-l.js";
|
|
10
|
-
import { exportJwk, importJwk, validateCryptoKey } from "./key-
|
|
11
|
-
import { verifyRequest } from "./http-
|
|
12
|
-
import { getAuthenticatedDocumentLoader } from "./authdocloader-
|
|
13
|
-
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-
|
|
14
|
-
import { doesActorOwnKey, getKeyOwner } from "./owner-
|
|
15
|
-
import { signObject, verifyObject } from "./proof-
|
|
16
|
-
import { routeActivity } from "./inbox-
|
|
17
|
-
import { FederationBuilderImpl } from "./builder-
|
|
10
|
+
import { exportJwk, importJwk, validateCryptoKey } from "./key-BZjRR6o0.js";
|
|
11
|
+
import { verifyRequest } from "./http-CVGIQDIM.js";
|
|
12
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-Ch1dTB6i.js";
|
|
13
|
+
import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-DGTowKKX.js";
|
|
14
|
+
import { doesActorOwnKey, getKeyOwner } from "./owner-BcisYGga.js";
|
|
15
|
+
import { signObject, verifyObject } from "./proof-DjpZy3G2.js";
|
|
16
|
+
import { routeActivity } from "./inbox-BF56GsRS.js";
|
|
17
|
+
import { FederationBuilderImpl } from "./builder-DOnG508o.js";
|
|
18
18
|
import { buildCollectionSynchronizationHeader } from "./collection-CSzG2j1P.js";
|
|
19
|
-
import { KvKeyCache } from "./keycache-
|
|
19
|
+
import { KvKeyCache } from "./keycache-XTiCGJXo.js";
|
|
20
20
|
import { createExponentialBackoffPolicy } from "./retry-D4GJ670a.js";
|
|
21
|
-
import { extractInboxes, sendActivity } from "./send-
|
|
21
|
+
import { extractInboxes, sendActivity } from "./send-Cy_hTnC2.js";
|
|
22
22
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
23
23
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
24
24
|
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_HEADER, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
package/dist/mod.js
CHANGED
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./transformers-Dna8Fg7k.js";
|
|
6
6
|
import "./compat-Bb5myD13.js";
|
|
7
|
-
import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-
|
|
8
|
-
import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, exportMultibaseKey, exportSpki, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, normalizeActorHandle } from "./actor-
|
|
9
|
-
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-
|
|
10
|
-
import { lookupWebFinger } from "./lookup-
|
|
11
|
-
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk } from "./key-
|
|
12
|
-
import { signRequest, verifyRequest } from "./http-
|
|
13
|
-
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-
|
|
7
|
+
import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-BBKozvwM.js";
|
|
8
|
+
import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, exportMultibaseKey, exportSpki, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, normalizeActorHandle } from "./actor-DKLEbAL7.js";
|
|
9
|
+
import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-DvI0zggU.js";
|
|
10
|
+
import { lookupWebFinger } from "./lookup-oH4Tkz5u.js";
|
|
11
|
+
import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk } from "./key-C0-cZXSz.js";
|
|
12
|
+
import { signRequest, verifyRequest } from "./http-DHfs_YOG.js";
|
|
13
|
+
import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-D4Lf3ygt.js";
|
|
14
14
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-CMX7WzeL.js";
|
|
15
|
-
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./types-
|
|
16
|
-
import { getAuthenticatedDocumentLoader } from "./authdocloader-
|
|
17
|
-
import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./vocab-
|
|
15
|
+
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./types-csgj3KOJ.js";
|
|
16
|
+
import { getAuthenticatedDocumentLoader } from "./authdocloader-C3dqTyRk.js";
|
|
17
|
+
import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./vocab-rGoe8nQD.js";
|
|
18
18
|
import "./nodeinfo-CyEbLjHs.js";
|
|
19
19
|
import "./runtime-BSkOVUWM.js";
|
|
20
20
|
import "./sig-BXJO--F9.js";
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
6
|
+
import "../type-CV54_GsW.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
10
|
import "../semver-dArNLkR9.js";
|
|
11
|
-
import { getNodeInfo, parseInboundService, parseNodeInfo, parseOutboundService, parseProtocol, parseServices, parseSoftware, parseUsage } from "../client-
|
|
12
|
-
import "../lookup-
|
|
13
|
-
import { test } from "../testing-
|
|
11
|
+
import { getNodeInfo, parseInboundService, parseNodeInfo, parseOutboundService, parseProtocol, parseServices, parseSoftware, parseUsage } from "../client-Be6Zm6Qo.js";
|
|
12
|
+
import "../lookup-jyRLW_1A.js";
|
|
13
|
+
import { test } from "../testing-DlDa_1MN.js";
|
|
14
14
|
import "../std__assert-X-_kMxKM.js";
|
|
15
15
|
import "../assert_rejects-DiIiJbZn.js";
|
|
16
16
|
import "../assert_is_error-BPGph1Jx.js";
|
|
17
17
|
import "../assert_not_equals-f3m3epl3.js";
|
|
18
18
|
import "../assert_throws-BOO88avQ.js";
|
|
19
|
-
import { esm_default } from "../esm-
|
|
19
|
+
import { esm_default } from "../esm-hqPuFfCN.js";
|
|
20
20
|
|
|
21
21
|
//#region src/nodeinfo/client.test.ts
|
|
22
22
|
test("getNodeInfo()", async (t) => {
|
|
@@ -3,30 +3,30 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
6
|
+
import "../type-CV54_GsW.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
10
|
import { MemoryKvStore } from "../kv-CRZrzyXm.js";
|
|
11
|
-
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-
|
|
11
|
+
import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-Lka8gMFX.js";
|
|
12
12
|
import { parseSemVer } from "../semver-dArNLkR9.js";
|
|
13
|
-
import "../client-
|
|
14
|
-
import "../lookup-
|
|
13
|
+
import "../client-Be6Zm6Qo.js";
|
|
14
|
+
import "../lookup-jyRLW_1A.js";
|
|
15
15
|
import "../types-BIgY6c-l.js";
|
|
16
|
-
import "../actor-
|
|
17
|
-
import "../key-
|
|
18
|
-
import "../http-
|
|
19
|
-
import "../authdocloader-
|
|
20
|
-
import "../ld-
|
|
21
|
-
import "../owner-
|
|
22
|
-
import "../proof-
|
|
23
|
-
import "../inbox-
|
|
24
|
-
import "../builder-
|
|
16
|
+
import "../actor-Bnmy-5Nt.js";
|
|
17
|
+
import "../key-BZjRR6o0.js";
|
|
18
|
+
import "../http-CVGIQDIM.js";
|
|
19
|
+
import "../authdocloader-Ch1dTB6i.js";
|
|
20
|
+
import "../ld-DGTowKKX.js";
|
|
21
|
+
import "../owner-BcisYGga.js";
|
|
22
|
+
import "../proof-DjpZy3G2.js";
|
|
23
|
+
import "../inbox-BF56GsRS.js";
|
|
24
|
+
import "../builder-DOnG508o.js";
|
|
25
25
|
import "../collection-CSzG2j1P.js";
|
|
26
|
-
import "../keycache-
|
|
26
|
+
import "../keycache-XTiCGJXo.js";
|
|
27
27
|
import "../retry-D4GJ670a.js";
|
|
28
|
-
import "../send-
|
|
29
|
-
import { createRequestContext, test } from "../testing-
|
|
28
|
+
import "../send-Cy_hTnC2.js";
|
|
29
|
+
import { createRequestContext, test } from "../testing-DlDa_1MN.js";
|
|
30
30
|
import "../std__assert-X-_kMxKM.js";
|
|
31
31
|
import "../assert_rejects-DiIiJbZn.js";
|
|
32
32
|
import "../assert_is_error-BPGph1Jx.js";
|
package/dist/nodeinfo/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 "../docloader-
|
|
6
|
-
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../types-
|
|
5
|
+
import "../docloader-BBKozvwM.js";
|
|
6
|
+
import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../types-csgj3KOJ.js";
|
|
7
7
|
import "../nodeinfo-CyEbLjHs.js";
|
|
8
8
|
|
|
9
9
|
export { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer };
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
6
|
+
import "../type-CV54_GsW.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
10
|
import { formatSemVer, parseSemVer } from "../semver-dArNLkR9.js";
|
|
11
|
-
import "../lookup-
|
|
12
|
-
import { test } from "../testing-
|
|
11
|
+
import "../lookup-jyRLW_1A.js";
|
|
12
|
+
import { test } from "../testing-DlDa_1MN.js";
|
|
13
13
|
import "../std__assert-X-_kMxKM.js";
|
|
14
14
|
import "../assert_rejects-DiIiJbZn.js";
|
|
15
15
|
import "../assert_is_error-BPGph1Jx.js";
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import "../type-
|
|
6
|
+
import "../type-CV54_GsW.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
10
|
import "../semver-dArNLkR9.js";
|
|
11
|
-
import "../lookup-
|
|
11
|
+
import "../lookup-jyRLW_1A.js";
|
|
12
12
|
import { nodeInfoToJson } from "../types-BIgY6c-l.js";
|
|
13
|
-
import { test } from "../testing-
|
|
13
|
+
import { test } from "../testing-DlDa_1MN.js";
|
|
14
14
|
import "../std__assert-X-_kMxKM.js";
|
|
15
15
|
import "../assert_rejects-DiIiJbZn.js";
|
|
16
16
|
import "../assert_is_error-BPGph1Jx.js";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { CryptographicKey, Object as Object$1, getDocumentLoader } from "./type-
|
|
7
|
-
import { isActor } from "./actor-
|
|
6
|
+
import { CryptographicKey, Object as Object$1, getDocumentLoader } from "./type-CV54_GsW.js";
|
|
7
|
+
import { isActor } from "./actor-Bnmy-5Nt.js";
|
|
8
8
|
import { trace } from "@opentelemetry/api";
|
|
9
9
|
|
|
10
10
|
//#region src/sig/owner.ts
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { deno_default, getDocumentLoader } from "./docloader-
|
|
6
|
-
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "./actor-
|
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
|
5
|
+
import { deno_default, getDocumentLoader } from "./docloader-BBKozvwM.js";
|
|
6
|
+
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "./actor-DKLEbAL7.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-C0-cZXSz.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
import jsonld from "jsonld";
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { Activity, DataIntegrityProof, Multikey, deno_default, getTypeId } from "./type-
|
|
7
|
-
import { fetchKey, validateCryptoKey } from "./key-
|
|
6
|
+
import { Activity, DataIntegrityProof, Multikey, deno_default, getTypeId } from "./type-CV54_GsW.js";
|
|
7
|
+
import { fetchKey, validateCryptoKey } from "./key-BZjRR6o0.js";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
10
10
|
import { encodeHex } from "byte-encodings/hex";
|
|
@@ -3,23 +3,23 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { UrlError } from "../type-
|
|
6
|
+
import { UrlError } from "../type-CV54_GsW.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 "../lookup-
|
|
11
|
-
import "../actor-
|
|
12
|
-
import "../key-
|
|
13
|
-
import { verifyRequest } from "../http-
|
|
14
|
-
import { getAuthenticatedDocumentLoader } from "../authdocloader-
|
|
15
|
-
import { mockDocumentLoader, test } from "../testing-
|
|
10
|
+
import "../lookup-jyRLW_1A.js";
|
|
11
|
+
import "../actor-Bnmy-5Nt.js";
|
|
12
|
+
import "../key-BZjRR6o0.js";
|
|
13
|
+
import { verifyRequest } from "../http-CVGIQDIM.js";
|
|
14
|
+
import { getAuthenticatedDocumentLoader } from "../authdocloader-Ch1dTB6i.js";
|
|
15
|
+
import { mockDocumentLoader, test } from "../testing-DlDa_1MN.js";
|
|
16
16
|
import "../std__assert-X-_kMxKM.js";
|
|
17
17
|
import { assertRejects } from "../assert_rejects-DiIiJbZn.js";
|
|
18
18
|
import "../assert_is_error-BPGph1Jx.js";
|
|
19
19
|
import "../assert_not_equals-f3m3epl3.js";
|
|
20
20
|
import "../assert_throws-BOO88avQ.js";
|
|
21
|
-
import { rsaPrivateKey2 } from "../keys-
|
|
22
|
-
import { esm_default } from "../esm-
|
|
21
|
+
import { rsaPrivateKey2 } from "../keys-KSJYwlm7.js";
|
|
22
|
+
import { esm_default } from "../esm-hqPuFfCN.js";
|
|
23
23
|
|
|
24
24
|
//#region src/runtime/authdocloader.test.ts
|
|
25
25
|
test("getAuthenticatedDocumentLoader()", async (t) => {
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { FetchError, UrlError, contexts_default, deno_default, getDocumentLoader, getUserAgent, kvCache } from "../type-
|
|
6
|
+
import { FetchError, UrlError, contexts_default, deno_default, getDocumentLoader, getUserAgent, kvCache } from "../type-CV54_GsW.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
10
|
import { MemoryKvStore } from "../kv-CRZrzyXm.js";
|
|
11
|
-
import "../lookup-
|
|
12
|
-
import { mockDocumentLoader, test } from "../testing-
|
|
11
|
+
import "../lookup-jyRLW_1A.js";
|
|
12
|
+
import { mockDocumentLoader, test } from "../testing-DlDa_1MN.js";
|
|
13
13
|
import "../std__assert-X-_kMxKM.js";
|
|
14
14
|
import { assertRejects } from "../assert_rejects-DiIiJbZn.js";
|
|
15
15
|
import "../assert_is_error-BPGph1Jx.js";
|
|
16
16
|
import "../assert_not_equals-f3m3epl3.js";
|
|
17
17
|
import { assertThrows } from "../assert_throws-BOO88avQ.js";
|
|
18
|
-
import { esm_default } from "../esm-
|
|
18
|
+
import { esm_default } from "../esm-hqPuFfCN.js";
|
|
19
19
|
import process from "node:process";
|
|
20
20
|
|
|
21
21
|
//#region src/runtime/docloader.test.ts
|
|
@@ -158,6 +158,30 @@ test("getDocumentLoader()", async (t) => {
|
|
|
158
158
|
}
|
|
159
159
|
});
|
|
160
160
|
});
|
|
161
|
+
esm_default.get("https://example.com/xhtml-link", {
|
|
162
|
+
body: `<html>
|
|
163
|
+
<head>
|
|
164
|
+
<meta charset="utf-8" />
|
|
165
|
+
<link
|
|
166
|
+
rel=alternate
|
|
167
|
+
type="application/activity+json"
|
|
168
|
+
href="https://example.com/object" />
|
|
169
|
+
</head>
|
|
170
|
+
</html>`,
|
|
171
|
+
headers: { "Content-Type": "application/xhtml+xml; charset=utf-8" }
|
|
172
|
+
});
|
|
173
|
+
await t.step("XHTML <link>", async () => {
|
|
174
|
+
assertEquals(await fetchDocumentLoader("https://example.com/xhtml-link"), {
|
|
175
|
+
contextUrl: null,
|
|
176
|
+
documentUrl: "https://example.com/object",
|
|
177
|
+
document: {
|
|
178
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
|
179
|
+
id: "https://example.com/object",
|
|
180
|
+
name: "Fetched object",
|
|
181
|
+
type: "Object"
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
});
|
|
161
185
|
esm_default.get("https://example.com/html-a", {
|
|
162
186
|
body: `<html>
|
|
163
187
|
<head>
|
package/dist/runtime/key.test.js
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import { exportMultibaseKey, exportSpki, importMultibaseKey, importPem, importPkcs1, importSpki } from "../type-
|
|
6
|
+
import { exportMultibaseKey, exportSpki, importMultibaseKey, importPem, importPkcs1, importSpki } from "../type-CV54_GsW.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 "../lookup-
|
|
11
|
-
import "../actor-
|
|
12
|
-
import { exportJwk, importJwk } from "../key-
|
|
13
|
-
import { test } from "../testing-
|
|
10
|
+
import "../lookup-jyRLW_1A.js";
|
|
11
|
+
import "../actor-Bnmy-5Nt.js";
|
|
12
|
+
import { exportJwk, importJwk } from "../key-BZjRR6o0.js";
|
|
13
|
+
import { test } from "../testing-DlDa_1MN.js";
|
|
14
14
|
import "../std__assert-X-_kMxKM.js";
|
|
15
15
|
import "../assert_rejects-DiIiJbZn.js";
|
|
16
16
|
import "../assert_is_error-BPGph1Jx.js";
|