@fedify/fedify 1.9.6-dev.2118 → 1.9.7
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/{actor-CCg-pZae.js → actor-B3mkavdq.js} +1205 -2768
- package/dist/{actor-Ydzhc8dj.d.cts → actor-Be-68iJP.d.cts} +3 -3
- package/dist/{actor-C1Euqngb.d.ts → actor-C5AY0Tno.d.ts} +3 -3
- package/dist/{actor-C71CIMfC.cjs → actor-CsvteFj1.cjs} +3112 -4674
- package/dist/{actor-CNWkxCrC.js → actor-DeUOMMMQ.mjs} +8 -15
- package/dist/{assert-MZs1qjMx.js → assert-DikXweDx.mjs} +5 -9
- package/dist/{assert_equals-DSbWqCm3.js → assert_equals-Ew3jOFa3.mjs} +55 -69
- package/dist/{assert_instance_of-DHz7EHNU.js → assert_instance_of-C4Ri6VuN.mjs} +5 -9
- package/dist/{assert_is_error-BPGph1Jx.js → assert_is_error-C50x8tnw.mjs} +5 -9
- package/dist/{assert_not_equals-f3m3epl3.js → assert_not_equals--wG9hV7u.mjs} +6 -13
- package/dist/{assert_rejects-DiIiJbZn.js → assert_rejects-CJC9ThS-.mjs} +6 -11
- package/dist/{assert_throws-BOO88avQ.js → assert_throws-BIL7gChy.mjs} +6 -10
- package/dist/{authdocloader-DEGiIEaL.js → authdocloader-BKq994CV.mjs} +9 -14
- package/dist/{authdocloader-wQk3e7Ag.js → authdocloader-C3_-i4Zk.js} +8 -15
- package/dist/{authdocloader-CT1cPj97.cjs → authdocloader-tagnJZ6u.cjs} +14 -22
- package/dist/{builder-D0mOpo0N.js → builder-CnVAhip1.mjs} +31 -40
- package/dist/{client-BSRRCCF9.js → client-Bza9SeZS.mjs} +11 -15
- package/dist/{client-DF8anIB5.d.ts → client-D8OSiPBT.d.ts} +2 -2
- package/dist/{client-DjT_tegg.d.cts → client-T0VFOdMw.d.cts} +2 -2
- package/dist/{collection-CSzG2j1P.js → collection-BD6-SZ6O.mjs} +7 -12
- package/dist/compat/mod.cjs +5 -8
- package/dist/compat/mod.d.cts +78 -12
- package/dist/compat/mod.d.ts +78 -12
- package/dist/compat/mod.js +4 -8
- package/dist/compat/transformers.test.mjs +62 -0
- package/dist/{context-CwUAkopp.d.cts → context-CACMqDzl.d.cts} +33 -26
- package/dist/{context-CXUibY4L.d.ts → context-K4cCphQj.d.ts} +33 -26
- package/dist/{denokv-Bv33Xxea.js → denokv-CoSB_Eps.mjs} +22 -11
- package/dist/{docloader-OWdVzt6R.cjs → docloader-Co-tW1B6.cjs} +112 -212
- package/dist/{docloader-CxWcuWqQ.d.ts → docloader-DSaLRXEA.d.ts} +2 -7
- package/dist/{docloader-ENN4YgIF.js → docloader-Dlo9EMTn.js} +17 -151
- package/dist/{docloader-D-MrRyHl.d.cts → docloader-DpGRDZrn.d.cts} +2 -7
- package/dist/{esm-rU2ogNNz.js → esm-BLERAZrI.mjs} +49 -85
- package/dist/federation/{builder.test.js → builder.test.mjs} +22 -41
- package/dist/federation/collection.test.d.mts +2 -0
- package/dist/federation/collection.test.mjs +21 -0
- package/dist/federation/handler.test.d.mts +2 -0
- package/dist/federation/{handler.test.js → handler.test.mjs} +22 -49
- package/dist/federation/idempotency.test.d.mts +2 -0
- package/dist/federation/{idempotency.test.js → idempotency.test.mjs} +29 -59
- package/dist/federation/inbox.test.d.mts +2 -0
- package/dist/federation/{inbox.test.js → inbox.test.mjs} +10 -15
- package/dist/federation/keycache.test.d.mts +2 -0
- package/dist/federation/{keycache.test.js → keycache.test.mjs} +13 -18
- package/dist/federation/kv.test.d.mts +2 -0
- package/dist/federation/{kv.test.js → kv.test.mjs} +9 -20
- package/dist/federation/middleware.test.d.mts +2 -0
- package/dist/federation/{middleware.test.js → middleware.test.mjs} +128 -197
- package/dist/federation/mod.cjs +223 -21
- package/dist/federation/mod.d.cts +4 -13
- package/dist/federation/mod.d.ts +4 -13
- package/dist/federation/mod.js +218 -18
- package/dist/federation/mq.test.d.mts +2 -0
- package/dist/federation/{mq.test.js → mq.test.mjs} +23 -38
- package/dist/federation/retry.test.d.mts +2 -0
- package/dist/federation/{retry.test.js → retry.test.mjs} +9 -14
- package/dist/federation/router.test.d.mts +2 -0
- package/dist/federation/{router.test.js → router.test.mjs} +12 -19
- package/dist/federation/send.test.d.mts +2 -0
- package/dist/federation/{send.test.js → send.test.mjs} +17 -26
- package/dist/{http-wsGR6KkT.d.ts → http-BZpls--H.d.ts} +5 -9
- package/dist/{http-B1_DzfAU.d.cts → http-C7WoprmE.d.cts} +5 -9
- package/dist/{http-Bmn4CXIM.cjs → http-cvQMgiFd.cjs} +51 -68
- package/dist/{http-DAz2fpwK.js → http-hFXuPP4j.mjs} +16 -32
- package/dist/{http-LDjZxhgJ.js → http-z-J6i29D.js} +17 -33
- package/dist/{inbox-CLgNEczc.js → inbox-B0NdZv6Q.mjs} +17 -25
- package/dist/{key-C45K8q1u.cjs → key-B2ZqbGDP.cjs} +42 -50
- package/dist/key-BfH9JUMQ.cjs +4 -0
- package/dist/{key-VDAxfcre.js → key-ByblW_7f.mjs} +12 -18
- package/dist/{key-kD68vuX_.js → key-DPg0mibt.js} +19 -19
- package/dist/key-USCeSjWo.mjs +5 -0
- package/dist/{keycache-DtWOiAMc.js → keycache-qGjtNwWK.mjs} +6 -10
- package/dist/{keys-CJezjcJ9.js → keys-D48z4zQE.mjs} +6 -10
- package/dist/{kv-C7sopW2E.d.ts → kv-Bq9QLKm5.d.ts} +1 -1
- package/dist/{kv-CRZrzyXm.js → kv-DM1zFCtL.mjs} +6 -10
- package/dist/{kv-63Cil1MD.d.cts → kv-GIrOktyG.d.cts} +1 -1
- package/dist/{ld-DSD_uqio.js → ld-Bk-CiTUe.mjs} +17 -31
- package/dist/{lookup-B0Qds1Mq.js → lookup-B-LJhUtc.mjs} +8 -17
- package/dist/{lookup-Brpn8XFF.cjs → lookup-C6EHvNN7.cjs} +16 -23
- package/dist/{lookup-Dkw6PUQT.js → lookup-CuDOZqcB.js} +5 -11
- package/dist/{middleware-Cfia6iC-.js → middleware-Cns1QUI8.js} +348 -392
- package/dist/middleware-DYNDkDz7.mjs +5 -0
- package/dist/middleware-SP7rhp6I.cjs +4 -0
- package/dist/{middleware-DQ1ijTAg.cjs → middleware-UNqaTRBe.cjs} +493 -546
- package/dist/{middleware-Bn5wceGF.js → middleware-xIvAtsQ9.mjs} +275 -320
- package/dist/{mod-CDObsV1d.d.ts → mod-BSwc3_rD.d.ts} +3 -3
- package/dist/{mod-DBzN0aCM.d.ts → mod-BTNpXcPj.d.ts} +2 -2
- package/dist/{mod-fjqfsrty.d.cts → mod-Chb_NKPp.d.cts} +4 -4
- package/dist/{mod-DgcYoyZK.d.ts → mod-DHoc3toL.d.ts} +4 -4
- package/dist/{mod-jQ4OODsl.d.cts → mod-DIMx6YjJ.d.cts} +2 -2
- package/dist/{mod-BUbqxBev.d.cts → mod-HElaq2UB.d.cts} +3 -3
- package/dist/mod.cjs +31 -33
- package/dist/mod.d.cts +15 -17
- package/dist/mod.d.ts +15 -17
- package/dist/mod.js +20 -23
- package/dist/{mq-B7R1Q-M5.d.cts → mq-CrItclRD.d.cts} +1 -1
- package/dist/{mq-CRGm1e_F.d.ts → mq-D_ZZRdby.d.ts} +1 -1
- package/dist/nodeinfo/client.test.d.mts +2 -0
- package/dist/nodeinfo/{client.test.js → client.test.mjs} +23 -45
- package/dist/nodeinfo/handler.test.d.mts +2 -0
- package/dist/nodeinfo/{handler.test.js → handler.test.mjs} +14 -43
- package/dist/nodeinfo/mod.cjs +5 -9
- package/dist/nodeinfo/mod.d.cts +2 -5
- package/dist/nodeinfo/mod.d.ts +2 -5
- package/dist/nodeinfo/mod.js +4 -9
- package/dist/nodeinfo/semver.test.d.mts +2 -0
- package/dist/nodeinfo/{semver.test.js → semver.test.mjs} +28 -51
- package/dist/nodeinfo/types.test.d.mts +2 -0
- package/dist/nodeinfo/{types.test.js → types.test.mjs} +10 -21
- package/dist/{owner-CD3PoJME.js → owner-CkmuWs8s.mjs} +10 -13
- package/dist/{owner-BbeUDvOu.d.ts → owner-DPAPnB0R.d.ts} +4 -4
- package/dist/{owner-6KSEp9eV.d.cts → owner-_rFs0ik_.d.cts} +4 -4
- package/dist/{proof-Qv3fs4TE.js → proof-BBEQdN7B.js} +33 -57
- package/dist/{proof-fJIJMt-0.js → proof-DVFzuYOq.mjs} +20 -32
- package/dist/{proof-CKkQu1BL.cjs → proof-DiFRNymC.cjs} +112 -135
- package/dist/{retry-D4GJ670a.js → retry-Ddbq3AcK.mjs} +4 -7
- package/dist/rolldown-runtime-C7fyD9f2.js +15 -0
- package/dist/runtime/authdocloader.test.d.mts +2 -0
- package/dist/runtime/{authdocloader.test.js → authdocloader.test.mjs} +16 -28
- package/dist/runtime/docloader.test.d.mts +2 -0
- package/dist/runtime/{docloader.test.js → docloader.test.mjs} +52 -72
- package/dist/runtime/key.test.d.mts +2 -0
- package/dist/runtime/{key.test.js → key.test.mjs} +27 -57
- package/dist/runtime/langstr.test.d.mts +2 -0
- package/dist/runtime/{langstr.test.js → langstr.test.mjs} +9 -19
- package/dist/runtime/link.test.d.mts +2 -0
- package/dist/runtime/{link.test.js → link.test.mjs} +7 -11
- package/dist/runtime/mod.cjs +7 -13
- package/dist/runtime/mod.d.cts +103 -6
- package/dist/runtime/mod.d.ts +103 -6
- package/dist/runtime/mod.js +6 -13
- package/dist/runtime/multibase/multibase.test.d.mts +2 -0
- package/dist/runtime/multibase/{multibase.test.js → multibase.test.mjs} +16 -33
- package/dist/runtime/url.test.d.mts +2 -0
- package/dist/runtime/{url.test.js → url.test.mjs} +10 -15
- package/dist/{semver-dArNLkR9.js → semver-CgD82xxg.mjs} +13 -28
- package/dist/{send-KX74JBzu.js → send-BsKuGBh0.mjs} +7 -12
- package/dist/sig/http.test.d.mts +2 -0
- package/dist/sig/{http.test.js → http.test.mjs} +119 -203
- package/dist/sig/key.test.d.mts +2 -0
- package/dist/sig/{key.test.js → key.test.mjs} +13 -22
- package/dist/sig/ld.test.d.mts +2 -0
- package/dist/sig/{ld.test.js → ld.test.mjs} +24 -39
- package/dist/sig/mod.cjs +7 -13
- package/dist/sig/mod.d.cts +3 -7
- package/dist/sig/mod.d.ts +3 -7
- package/dist/sig/mod.js +6 -13
- package/dist/sig/owner.test.d.mts +2 -0
- package/dist/sig/owner.test.mjs +39 -0
- package/dist/sig/proof.test.d.mts +2 -0
- package/dist/sig/{proof.test.js → proof.test.mjs} +18 -31
- package/dist/{std__assert-X-_kMxKM.js → std__assert-2v7gYiZp.mjs} +13 -24
- package/dist/testing/docloader.test.d.mts +2 -0
- package/dist/testing/docloader.test.mjs +12 -0
- package/dist/testing/{mod.d.ts → mod.d.mts} +371 -541
- package/dist/testing/mod.mjs +5 -0
- package/dist/{testing-DlM9L2qY.js → testing-8TvaN83G.mjs} +27 -35
- package/dist/{transformers-BFT6d7J5.js → transformers-BV4OeK9o.js} +3 -7
- package/dist/{transformers-CoBS-oFG.cjs → transformers-C2P5eKUT.cjs} +20 -25
- package/dist/{types-CfuEksTX.js → types-BK9bojU0.js} +18 -36
- package/dist/{types-BIgY6c-l.js → types-CAnkAQGM.mjs} +5 -9
- package/dist/{types-Bq8MUNvK.cjs → types-D4VM3B7I.cjs} +45 -64
- package/dist/vocab/actor.test.d.mts +2 -0
- package/dist/vocab/{actor.test.js → actor.test.mjs} +308 -550
- package/dist/vocab/cjs.test.d.mts +2 -0
- package/dist/vocab/cjs.test.mjs +14 -0
- package/dist/vocab/lookup.test.d.mts +2 -0
- package/dist/vocab/{lookup.test.js → lookup.test.mjs} +29 -45
- package/dist/vocab/mod.cjs +251 -16
- package/dist/vocab/mod.d.cts +3 -5
- package/dist/vocab/mod.d.ts +3 -5
- package/dist/vocab/mod.js +244 -10
- package/dist/vocab/type.test.d.mts +2 -0
- package/dist/vocab/type.test.mjs +16 -0
- package/dist/vocab/vocab.test.d.mts +2 -0
- package/dist/vocab/{vocab.test.js → vocab.test.mjs} +178 -311
- package/dist/{vocab-CDHNj5zp.d.ts → vocab-BLvSEtuz.d.cts} +2 -4
- package/dist/{type-kdsaa4c5.js → vocab-DuJO9k13.mjs} +1177 -2871
- package/dist/{vocab-Cfs0937i.d.cts → vocab-lhCS9lzq.d.ts} +4 -2
- package/dist/webfinger/handler.test.d.mts +2 -0
- package/dist/webfinger/{handler.test.js → handler.test.mjs} +23 -56
- package/dist/webfinger/lookup.test.d.mts +2 -0
- package/dist/webfinger/{lookup.test.js → lookup.test.mjs} +13 -27
- package/dist/webfinger/mod.cjs +5 -9
- package/dist/webfinger/mod.d.cts +1 -3
- package/dist/webfinger/mod.d.ts +1 -3
- package/dist/webfinger/mod.js +4 -9
- package/dist/x/cfworkers.cjs +25 -14
- package/dist/x/cfworkers.d.cts +33 -6
- package/dist/x/cfworkers.d.ts +33 -6
- package/dist/x/cfworkers.js +22 -12
- package/dist/x/cfworkers.test.d.mts +2 -0
- package/dist/x/{cfworkers.test.js → cfworkers.test.mjs} +28 -26
- package/dist/x/hono.cjs +25 -14
- package/dist/x/hono.d.cts +1 -11
- package/dist/x/hono.d.ts +1 -11
- package/dist/x/hono.js +22 -12
- package/dist/x/sveltekit.cjs +23 -12
- package/dist/x/sveltekit.d.cts +1 -11
- package/dist/x/sveltekit.d.ts +1 -11
- package/dist/x/sveltekit.js +20 -10
- package/package.json +2 -2
- package/dist/chunk-DqRYRqnO.cjs +0 -34
- package/dist/compat/transformers.test.d.ts +0 -3
- package/dist/compat/transformers.test.js +0 -86
- package/dist/compat-DmDDELst.cjs +0 -4
- package/dist/compat-nxUqe4Z-.js +0 -4
- package/dist/federation/builder.test.d.ts +0 -3
- package/dist/federation/collection.test.d.ts +0 -3
- package/dist/federation/collection.test.js +0 -35
- package/dist/federation/handler.test.d.ts +0 -3
- package/dist/federation/idempotency.test.d.ts +0 -3
- package/dist/federation/inbox.test.d.ts +0 -3
- package/dist/federation/keycache.test.d.ts +0 -3
- package/dist/federation/kv.test.d.ts +0 -3
- package/dist/federation/middleware.test.d.ts +0 -3
- package/dist/federation/mq.test.d.ts +0 -3
- package/dist/federation/retry.test.d.ts +0 -3
- package/dist/federation/router.test.d.ts +0 -3
- package/dist/federation/send.test.d.ts +0 -3
- package/dist/federation-D1U8YY9t.js +0 -226
- package/dist/federation-H2_En3j5.cjs +0 -244
- package/dist/key-Bsm-uoaE.js +0 -10
- package/dist/key-Bv9soVGW.cjs +0 -10
- package/dist/key-C6dA6KgH.js +0 -10
- package/dist/middleware-BJbqjuUV.js +0 -17
- package/dist/middleware-BVltQrGG.cjs +0 -17
- package/dist/middleware-NDh5Vgwn.js +0 -26
- package/dist/mod-BcObK1Lz.d.ts +0 -82
- package/dist/mod-C2tOeRkN.d.cts +0 -1
- package/dist/mod-CIbqfZW0.d.ts +0 -104
- package/dist/mod-Dt-G9ZOS.d.cts +0 -102
- package/dist/mod-FZd39qVq.d.cts +0 -1
- package/dist/mod-mXx9V0q5.d.cts +0 -80
- package/dist/nodeinfo/client.test.d.ts +0 -3
- package/dist/nodeinfo/handler.test.d.ts +0 -3
- package/dist/nodeinfo/semver.test.d.ts +0 -3
- package/dist/nodeinfo/types.test.d.ts +0 -3
- package/dist/nodeinfo-Co9lJrWl.cjs +0 -4
- package/dist/nodeinfo-DfycQ8Wf.js +0 -4
- package/dist/runtime/authdocloader.test.d.ts +0 -3
- package/dist/runtime/docloader.test.d.ts +0 -3
- package/dist/runtime/key.test.d.ts +0 -3
- package/dist/runtime/langstr.test.d.ts +0 -3
- package/dist/runtime/link.test.d.ts +0 -3
- package/dist/runtime/multibase/multibase.test.d.ts +0 -3
- package/dist/runtime/url.test.d.ts +0 -3
- package/dist/runtime-C58AJWSv.cjs +0 -4
- package/dist/runtime-DPYEDf-o.js +0 -4
- package/dist/sig/http.test.d.ts +0 -3
- package/dist/sig/key.test.d.ts +0 -3
- package/dist/sig/ld.test.d.ts +0 -3
- package/dist/sig/owner.test.d.ts +0 -3
- package/dist/sig/owner.test.js +0 -52
- package/dist/sig/proof.test.d.ts +0 -3
- package/dist/sig-ByHXzqUi.cjs +0 -4
- package/dist/sig-Cj3tk-ig.js +0 -4
- package/dist/testing/docloader.test.d.ts +0 -3
- package/dist/testing/docloader.test.js +0 -24
- package/dist/testing/mod.js +0 -10
- package/dist/vocab/actor.test.d.ts +0 -3
- package/dist/vocab/lookup.test.d.ts +0 -3
- package/dist/vocab/type.test.d.ts +0 -3
- package/dist/vocab/type.test.js +0 -25
- package/dist/vocab/vocab.test.d.ts +0 -3
- package/dist/vocab-DBzzAvtf.cjs +0 -289
- package/dist/vocab-cxfw8FFj.js +0 -253
- package/dist/webfinger/handler.test.d.ts +0 -3
- package/dist/webfinger/lookup.test.d.ts +0 -3
- package/dist/webfinger-BjOEdFPs.cjs +0 -4
- package/dist/webfinger-De_bU0iE.js +0 -4
- package/dist/x/cfworkers.test.d.ts +0 -3
- /package/dist/{mod-1pDWKvUL.d.ts → compat/transformers.test.d.mts} +0 -0
- /package/dist/{mod-g0xFzAP9.d.ts → federation/builder.test.d.mts} +0 -0
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { Application, Group, Organization, Person, Service, deno_default, getTypeId, lookupWebFinger } from "./type-kdsaa4c5.js";
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
import { C as Person, E as Service, S as Organization, U as getTypeId, W as lookupWebFinger, d as Group, ot as name, r as Application, st as version } from "./vocab-DuJO9k13.mjs";
|
|
7
5
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
6
|
import { domainToASCII, domainToUnicode } from "node:url";
|
|
9
|
-
|
|
10
7
|
//#region src/vocab/actor.ts
|
|
11
8
|
/**
|
|
12
9
|
* Checks if the given object is an {@link Actor}.
|
|
@@ -69,9 +66,7 @@ function getActorClassByTypeName(typeName) {
|
|
|
69
66
|
* @since 0.4.0
|
|
70
67
|
*/
|
|
71
68
|
async function getActorHandle(actor, options = {}) {
|
|
72
|
-
|
|
73
|
-
const tracer = tracerProvider.getTracer(deno_default.name, deno_default.version);
|
|
74
|
-
return await tracer.startActiveSpan("activitypub.get_actor_handle", async (span) => {
|
|
69
|
+
return await (options.tracerProvider ?? trace.getTracerProvider()).getTracer(name, version).startActiveSpan("activitypub.get_actor_handle", async (span) => {
|
|
75
70
|
if (isActor(actor)) {
|
|
76
71
|
if (actor.id != null) span.setAttribute("activitypub.actor.id", actor.id.href);
|
|
77
72
|
span.setAttribute("activitypub.actor.type", getTypeId(actor).href);
|
|
@@ -102,8 +97,7 @@ async function getActorHandleInternal(actor, options = {}) {
|
|
|
102
97
|
for (const alias of aliases) {
|
|
103
98
|
const match = alias.match(/^acct:([^@]+)@([^@]+)$/);
|
|
104
99
|
if (match != null) {
|
|
105
|
-
|
|
106
|
-
if (hostname !== actorId.hostname && !await verifyCrossOriginActorHandle(actorId.href, alias, options.userAgent, options.tracerProvider)) continue;
|
|
100
|
+
if (new URL(`https://${match[2]}/`).hostname !== actorId.hostname && !await verifyCrossOriginActorHandle(actorId.href, alias, options.userAgent, options.tracerProvider)) continue;
|
|
107
101
|
return normalizeActorHandle(`@${match[1]}@${match[2]}`, options);
|
|
108
102
|
}
|
|
109
103
|
}
|
|
@@ -118,7 +112,7 @@ async function verifyCrossOriginActorHandle(actorId, alias, userAgent, tracerPro
|
|
|
118
112
|
tracerProvider
|
|
119
113
|
});
|
|
120
114
|
if (response == null) return false;
|
|
121
|
-
for (const alias
|
|
115
|
+
for (const alias of response.aliases ?? []) if (new URL(alias).href === actorId) return true;
|
|
122
116
|
return false;
|
|
123
117
|
}
|
|
124
118
|
/**
|
|
@@ -141,6 +135,5 @@ function normalizeActorHandle(handle, options = {}) {
|
|
|
141
135
|
const user = handle.substring(0, atPos);
|
|
142
136
|
return options.trimLeadingAt ? `${user}@${domain}` : `@${user}@${domain}`;
|
|
143
137
|
}
|
|
144
|
-
|
|
145
138
|
//#endregion
|
|
146
|
-
export {
|
|
139
|
+
export { normalizeActorHandle as a, isActor as i, getActorHandle as n, getActorTypeName as r, getActorClassByTypeName as t };
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { AssertionError } from "./assert_equals-DSbWqCm3.js";
|
|
7
|
-
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
import { l as AssertionError } from "./assert_equals-Ew3jOFa3.mjs";
|
|
8
5
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert.js
|
|
9
6
|
/**
|
|
10
7
|
* Make an assertion, error will be thrown if `expr` does not have truthy value.
|
|
@@ -22,6 +19,5 @@ import { AssertionError } from "./assert_equals-DSbWqCm3.js";
|
|
|
22
19
|
*/ function assert(expr, msg = "") {
|
|
23
20
|
if (!expr) throw new AssertionError(msg);
|
|
24
21
|
}
|
|
25
|
-
|
|
26
22
|
//#endregion
|
|
27
|
-
export { assert };
|
|
23
|
+
export { assert as t };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
globalThis.addEventListener = () => {};
|
|
5
|
-
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
6
4
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assertion_error.js
|
|
7
5
|
/**
|
|
8
6
|
* Error thrown when an assertion fails.
|
|
@@ -29,7 +27,6 @@
|
|
|
29
27
|
this.name = "AssertionError";
|
|
30
28
|
}
|
|
31
29
|
};
|
|
32
|
-
|
|
33
30
|
//#endregion
|
|
34
31
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/equal.js
|
|
35
32
|
function isKeyedCollection(x) {
|
|
@@ -103,7 +100,37 @@ function constructorsEqual(a, b) {
|
|
|
103
100
|
return false;
|
|
104
101
|
}(c, d);
|
|
105
102
|
}
|
|
106
|
-
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region ../../node_modules/.pnpm/@jsr+std__internal@1.0.8/node_modules/@jsr/std__internal/format.js
|
|
105
|
+
/**
|
|
106
|
+
* Converts the input into a string. Objects, Sets and Maps are sorted so as to
|
|
107
|
+
* make tests less flaky.
|
|
108
|
+
*
|
|
109
|
+
* @param v Value to be formatted
|
|
110
|
+
*
|
|
111
|
+
* @returns The formatted string
|
|
112
|
+
*
|
|
113
|
+
* @example Usage
|
|
114
|
+
* ```ts
|
|
115
|
+
* import { format } from "@std/internal/format";
|
|
116
|
+
* import { assertEquals } from "@std/assert";
|
|
117
|
+
*
|
|
118
|
+
* assertEquals(format({ a: 1, b: 2 }), "{\n a: 1,\n b: 2,\n}");
|
|
119
|
+
* assertEquals(format(new Set([1, 2])), "Set(2) {\n 1,\n 2,\n}");
|
|
120
|
+
* assertEquals(format(new Map([[1, 2]])), "Map(1) {\n 1 => 2,\n}");
|
|
121
|
+
* ```
|
|
122
|
+
*/ function format(v) {
|
|
123
|
+
const { Deno } = globalThis;
|
|
124
|
+
return typeof Deno?.inspect === "function" ? Deno.inspect(v, {
|
|
125
|
+
depth: Infinity,
|
|
126
|
+
sorted: true,
|
|
127
|
+
trailingComma: true,
|
|
128
|
+
compact: false,
|
|
129
|
+
iterableLimit: Infinity,
|
|
130
|
+
getters: true,
|
|
131
|
+
strAbbreviateSize: Infinity
|
|
132
|
+
}) : `"${String(v).replace(/(?=["\\])/g, "\\")}"`;
|
|
133
|
+
}
|
|
107
134
|
//#endregion
|
|
108
135
|
//#region ../../node_modules/.pnpm/@jsr+std__internal@1.0.8/node_modules/@jsr/std__internal/assertion_state.js
|
|
109
136
|
/**
|
|
@@ -281,13 +308,11 @@ function constructorsEqual(a, b) {
|
|
|
281
308
|
return this.#state.assertionCount !== void 0 && this.#state.assertionCount !== this.#state.assertionTriggeredCount;
|
|
282
309
|
}
|
|
283
310
|
};
|
|
284
|
-
|
|
285
|
-
|
|
311
|
+
new AssertionState();
|
|
286
312
|
//#endregion
|
|
287
313
|
//#region ../../node_modules/.pnpm/@jsr+std__internal@1.0.8/node_modules/@jsr/std__internal/styles.js
|
|
288
314
|
const { Deno } = globalThis;
|
|
289
|
-
const
|
|
290
|
-
const enabled = !noColor;
|
|
315
|
+
const enabled = !(typeof Deno?.noColor === "boolean" ? Deno.noColor : false);
|
|
291
316
|
function code(open, close) {
|
|
292
317
|
return {
|
|
293
318
|
open: `\x1b[${open.join(";")}m`,
|
|
@@ -295,8 +320,8 @@ function code(open, close) {
|
|
|
295
320
|
regexp: new RegExp(`\\x1b\\[${close}m`, "g")
|
|
296
321
|
};
|
|
297
322
|
}
|
|
298
|
-
function run(str, code
|
|
299
|
-
return enabled ? `${code
|
|
323
|
+
function run(str, code) {
|
|
324
|
+
return enabled ? `${code.open}${str.replace(code.regexp, code.open)}${code.close}` : str;
|
|
300
325
|
}
|
|
301
326
|
/**
|
|
302
327
|
* Sets the style of text to be printed to bold.
|
|
@@ -449,7 +474,6 @@ const ANSI_PATTERN = new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-z
|
|
|
449
474
|
*/ function stripAnsiCode(string) {
|
|
450
475
|
return string.replace(ANSI_PATTERN, "");
|
|
451
476
|
}
|
|
452
|
-
|
|
453
477
|
//#endregion
|
|
454
478
|
//#region ../../node_modules/.pnpm/@jsr+std__internal@1.0.8/node_modules/@jsr/std__internal/build_message.js
|
|
455
479
|
/**
|
|
@@ -543,7 +567,6 @@ const ANSI_PATTERN = new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-z
|
|
|
543
567
|
messages.push(...stringDiff ? [diffMessages.join("")] : diffMessages, "");
|
|
544
568
|
return messages;
|
|
545
569
|
}
|
|
546
|
-
|
|
547
570
|
//#endregion
|
|
548
571
|
//#region ../../node_modules/.pnpm/@jsr+std__internal@1.0.8/node_modules/@jsr/std__internal/diff.js
|
|
549
572
|
const REMOVED = 1;
|
|
@@ -774,20 +797,20 @@ const ADDED = 3;
|
|
|
774
797
|
*/ const routes = new Uint32Array((M * N + length + 1) * 2);
|
|
775
798
|
const diffTypesPtrOffset = routes.length / 2;
|
|
776
799
|
let ptr = 0;
|
|
777
|
-
function snake(k, A
|
|
778
|
-
const M
|
|
779
|
-
const N
|
|
780
|
-
const fp
|
|
781
|
-
ptr = fp
|
|
782
|
-
while (fp
|
|
783
|
-
const prev = fp
|
|
800
|
+
function snake(k, A, B, slide, down) {
|
|
801
|
+
const M = A.length;
|
|
802
|
+
const N = B.length;
|
|
803
|
+
const fp = createFp(k, M, routes, diffTypesPtrOffset, ptr, slide, down);
|
|
804
|
+
ptr = fp.id;
|
|
805
|
+
while (fp.y + k < M && fp.y < N && A[fp.y + k] === B[fp.y]) {
|
|
806
|
+
const prev = fp.id;
|
|
784
807
|
ptr++;
|
|
785
|
-
fp
|
|
786
|
-
fp
|
|
808
|
+
fp.id = ptr;
|
|
809
|
+
fp.y += 1;
|
|
787
810
|
routes[ptr] = prev;
|
|
788
811
|
routes[ptr + diffTypesPtrOffset] = COMMON;
|
|
789
812
|
}
|
|
790
|
-
return fp
|
|
813
|
+
return fp;
|
|
791
814
|
}
|
|
792
815
|
let currentFp = fp[delta + offset];
|
|
793
816
|
assertFp(currentFp);
|
|
@@ -795,12 +818,12 @@ const ADDED = 3;
|
|
|
795
818
|
while (currentFp.y < N) {
|
|
796
819
|
p = p + 1;
|
|
797
820
|
for (let k = -p; k < delta; ++k) {
|
|
798
|
-
const index
|
|
799
|
-
fp[index
|
|
821
|
+
const index = k + offset;
|
|
822
|
+
fp[index] = snake(k, A, B, fp[index - 1], fp[index + 1]);
|
|
800
823
|
}
|
|
801
824
|
for (let k = delta + p; k > delta; --k) {
|
|
802
|
-
const index
|
|
803
|
-
fp[index
|
|
825
|
+
const index = k + offset;
|
|
826
|
+
fp[index] = snake(k, A, B, fp[index - 1], fp[index + 1]);
|
|
804
827
|
}
|
|
805
828
|
const index = delta + offset;
|
|
806
829
|
fp[delta + offset] = snake(delta, A, B, fp[index - 1], fp[index + 1]);
|
|
@@ -812,7 +835,6 @@ const ADDED = 3;
|
|
|
812
835
|
value
|
|
813
836
|
})), ...backTrace(A, B, currentFp, swapped, routes, diffTypesPtrOffset)];
|
|
814
837
|
}
|
|
815
|
-
|
|
816
838
|
//#endregion
|
|
817
839
|
//#region ../../node_modules/.pnpm/@jsr+std__internal@1.0.8/node_modules/@jsr/std__internal/diff_str.js
|
|
818
840
|
/**
|
|
@@ -953,39 +975,6 @@ const NON_WHITESPACE_REGEXP = /\S/;
|
|
|
953
975
|
}
|
|
954
976
|
return diffResult;
|
|
955
977
|
}
|
|
956
|
-
|
|
957
|
-
//#endregion
|
|
958
|
-
//#region ../../node_modules/.pnpm/@jsr+std__internal@1.0.8/node_modules/@jsr/std__internal/format.js
|
|
959
|
-
/**
|
|
960
|
-
* Converts the input into a string. Objects, Sets and Maps are sorted so as to
|
|
961
|
-
* make tests less flaky.
|
|
962
|
-
*
|
|
963
|
-
* @param v Value to be formatted
|
|
964
|
-
*
|
|
965
|
-
* @returns The formatted string
|
|
966
|
-
*
|
|
967
|
-
* @example Usage
|
|
968
|
-
* ```ts
|
|
969
|
-
* import { format } from "@std/internal/format";
|
|
970
|
-
* import { assertEquals } from "@std/assert";
|
|
971
|
-
*
|
|
972
|
-
* assertEquals(format({ a: 1, b: 2 }), "{\n a: 1,\n b: 2,\n}");
|
|
973
|
-
* assertEquals(format(new Set([1, 2])), "Set(2) {\n 1,\n 2,\n}");
|
|
974
|
-
* assertEquals(format(new Map([[1, 2]])), "Map(1) {\n 1 => 2,\n}");
|
|
975
|
-
* ```
|
|
976
|
-
*/ function format(v) {
|
|
977
|
-
const { Deno: Deno$1 } = globalThis;
|
|
978
|
-
return typeof Deno$1?.inspect === "function" ? Deno$1.inspect(v, {
|
|
979
|
-
depth: Infinity,
|
|
980
|
-
sorted: true,
|
|
981
|
-
trailingComma: true,
|
|
982
|
-
compact: false,
|
|
983
|
-
iterableLimit: Infinity,
|
|
984
|
-
getters: true,
|
|
985
|
-
strAbbreviateSize: Infinity
|
|
986
|
-
}) : `"${String(v).replace(/(?=["\\])/g, "\\")}"`;
|
|
987
|
-
}
|
|
988
|
-
|
|
989
978
|
//#endregion
|
|
990
979
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_equals.js
|
|
991
980
|
/**
|
|
@@ -1012,16 +1001,13 @@ const NON_WHITESPACE_REGEXP = /\S/;
|
|
|
1012
1001
|
* @param options The optional object for the assertion.
|
|
1013
1002
|
*/ function assertEquals(actual, expected, msg) {
|
|
1014
1003
|
if (equal(actual, expected)) return;
|
|
1015
|
-
|
|
1016
|
-
let message = `Values are not equal${msgSuffix}`;
|
|
1004
|
+
let message = `Values are not equal${msg ? `: ${msg}` : "."}`;
|
|
1017
1005
|
const actualString = format(actual);
|
|
1018
1006
|
const expectedString = format(expected);
|
|
1019
1007
|
const stringDiff = typeof actual === "string" && typeof expected === "string";
|
|
1020
|
-
const
|
|
1021
|
-
const diffMsg = buildMessage(diffResult, { stringDiff }).join("\n");
|
|
1008
|
+
const diffMsg = buildMessage(stringDiff ? diffStr(actual, expected) : diff(actualString.split("\n"), expectedString.split("\n")), { stringDiff }).join("\n");
|
|
1022
1009
|
message = `${message}\n${diffMsg}`;
|
|
1023
1010
|
throw new AssertionError(message);
|
|
1024
1011
|
}
|
|
1025
|
-
|
|
1026
1012
|
//#endregion
|
|
1027
|
-
export {
|
|
1013
|
+
export { red as a, equal as c, buildMessage as i, AssertionError as l, diffStr as n, stripAnsiCode as o, diff as r, format as s, assertEquals as t };
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { AssertionError } from "./assert_equals-DSbWqCm3.js";
|
|
7
|
-
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
import { l as AssertionError } from "./assert_equals-Ew3jOFa3.mjs";
|
|
8
5
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_instance_of.js
|
|
9
6
|
/**
|
|
10
7
|
* Make an assertion that `obj` is an instance of `type`.
|
|
@@ -36,6 +33,5 @@ import { AssertionError } from "./assert_equals-DSbWqCm3.js";
|
|
|
36
33
|
else msg = `Expected object to be an instance of "${expectedTypeStr}" but was "${actualTypeStr}"${msgSuffix}`;
|
|
37
34
|
throw new AssertionError(msg);
|
|
38
35
|
}
|
|
39
|
-
|
|
40
36
|
//#endregion
|
|
41
|
-
export { assertInstanceOf };
|
|
37
|
+
export { assertInstanceOf as t };
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { AssertionError, stripAnsiCode } from "./assert_equals-DSbWqCm3.js";
|
|
7
|
-
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
import { l as AssertionError, o as stripAnsiCode } from "./assert_equals-Ew3jOFa3.mjs";
|
|
8
5
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_is_error.js
|
|
9
6
|
/**
|
|
10
7
|
* Make an assertion that `error` is an `Error`.
|
|
@@ -43,6 +40,5 @@ import { AssertionError, stripAnsiCode } from "./assert_equals-DSbWqCm3.js";
|
|
|
43
40
|
throw new AssertionError(msg);
|
|
44
41
|
}
|
|
45
42
|
}
|
|
46
|
-
|
|
47
43
|
//#endregion
|
|
48
|
-
export { assertIsError };
|
|
44
|
+
export { assertIsError as t };
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { AssertionError, equal } from "./assert_equals-DSbWqCm3.js";
|
|
7
|
-
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
import { c as equal, l as AssertionError } from "./assert_equals-Ew3jOFa3.mjs";
|
|
8
5
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_not_equals.js
|
|
9
6
|
/**
|
|
10
7
|
* Make an assertion that `actual` and `expected` are not equal, deeply.
|
|
@@ -26,11 +23,7 @@ import { AssertionError, equal } from "./assert_equals-DSbWqCm3.js";
|
|
|
26
23
|
* @param msg The optional message to display if the assertion fails.
|
|
27
24
|
*/ function assertNotEquals(actual, expected, msg) {
|
|
28
25
|
if (!equal(actual, expected)) return;
|
|
29
|
-
|
|
30
|
-
const expectedString = String(expected);
|
|
31
|
-
const msgSuffix = msg ? `: ${msg}` : ".";
|
|
32
|
-
throw new AssertionError(`Expected actual: ${actualString} not to be: ${expectedString}${msgSuffix}`);
|
|
26
|
+
throw new AssertionError(`Expected actual: ${String(actual)} not to be: ${String(expected)}${msg ? `: ${msg}` : "."}`);
|
|
33
27
|
}
|
|
34
|
-
|
|
35
28
|
//#endregion
|
|
36
|
-
export { assertNotEquals };
|
|
29
|
+
export { assertNotEquals as t };
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { AssertionError } from "./assert_equals-DSbWqCm3.js";
|
|
7
|
-
import { assertIsError } from "./assert_is_error-BPGph1Jx.js";
|
|
8
|
-
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
import { l as AssertionError } from "./assert_equals-Ew3jOFa3.mjs";
|
|
5
|
+
import { t as assertIsError } from "./assert_is_error-C50x8tnw.mjs";
|
|
9
6
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_false.js
|
|
10
7
|
/**
|
|
11
8
|
* Make an assertion, error will be thrown if `expr` have truthy value.
|
|
@@ -23,7 +20,6 @@ import { assertIsError } from "./assert_is_error-BPGph1Jx.js";
|
|
|
23
20
|
*/ function assertFalse(expr, msg = "") {
|
|
24
21
|
if (expr) throw new AssertionError(msg);
|
|
25
22
|
}
|
|
26
|
-
|
|
27
23
|
//#endregion
|
|
28
24
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_rejects.js
|
|
29
25
|
async function assertRejects(fn, errorClassOrMsg, msgIncludesOrMsg, msg) {
|
|
@@ -57,6 +53,5 @@ async function assertRejects(fn, errorClassOrMsg, msgIncludesOrMsg, msg) {
|
|
|
57
53
|
if (!doesThrow) throw new AssertionError(`Expected function to reject${msgSuffix}`);
|
|
58
54
|
return err;
|
|
59
55
|
}
|
|
60
|
-
|
|
61
56
|
//#endregion
|
|
62
|
-
export { assertFalse, assertRejects };
|
|
57
|
+
export { assertFalse as n, assertRejects as t };
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { AssertionError } from "./assert_equals-DSbWqCm3.js";
|
|
7
|
-
import { assertIsError } from "./assert_is_error-BPGph1Jx.js";
|
|
8
|
-
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
import { l as AssertionError } from "./assert_equals-Ew3jOFa3.mjs";
|
|
5
|
+
import { t as assertIsError } from "./assert_is_error-C50x8tnw.mjs";
|
|
9
6
|
//#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_throws.js
|
|
10
7
|
function assertThrows(fn, errorClassOrMsg, msgIncludesOrMsg, msg) {
|
|
11
8
|
let ErrorClass = void 0;
|
|
@@ -34,6 +31,5 @@ function assertThrows(fn, errorClassOrMsg, msgIncludesOrMsg, msg) {
|
|
|
34
31
|
}
|
|
35
32
|
return err;
|
|
36
33
|
}
|
|
37
|
-
|
|
38
34
|
//#endregion
|
|
39
|
-
export { assertThrows };
|
|
35
|
+
export { assertThrows as t };
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { doubleKnock } from "./http-DAz2fpwK.js";
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
globalThis.addEventListener = () => {};
|
|
4
|
+
import { $ as UrlError, K as createRequest, Q as logRequest, Y as getRemoteDocument, rt as validatePublicUrl } from "./vocab-DuJO9k13.mjs";
|
|
5
|
+
import { a as validateCryptoKey } from "./key-ByblW_7f.mjs";
|
|
6
|
+
import { n as doubleKnock } from "./http-hFXuPP4j.mjs";
|
|
8
7
|
import { getLogger } from "@logtape/logtape";
|
|
9
|
-
|
|
10
8
|
//#region src/runtime/authdocloader.ts
|
|
11
9
|
const logger = getLogger([
|
|
12
10
|
"fedify",
|
|
@@ -36,17 +34,14 @@ function getAuthenticatedDocumentLoader(identity, { allowPrivateAddress, userAge
|
|
|
36
34
|
});
|
|
37
35
|
throw error;
|
|
38
36
|
}
|
|
39
|
-
|
|
40
|
-
const response = await doubleKnock(originalRequest, identity, {
|
|
37
|
+
return getRemoteDocument(url, await doubleKnock(createRequest(url, { userAgent }), identity, {
|
|
41
38
|
specDeterminer,
|
|
42
39
|
log: logRequest,
|
|
43
40
|
tracerProvider,
|
|
44
41
|
signal: options?.signal
|
|
45
|
-
});
|
|
46
|
-
return getRemoteDocument(url, response, load);
|
|
42
|
+
}), load);
|
|
47
43
|
}
|
|
48
44
|
return load;
|
|
49
45
|
}
|
|
50
|
-
|
|
51
46
|
//#endregion
|
|
52
|
-
export { getAuthenticatedDocumentLoader };
|
|
47
|
+
export { getAuthenticatedDocumentLoader as t };
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { UrlError, createRequest, getRemoteDocument, logRequest, validatePublicUrl } from "./type-kdsaa4c5.js";
|
|
7
|
-
import { validateCryptoKey } from "./key-kD68vuX_.js";
|
|
8
|
-
import { doubleKnock } from "./http-LDjZxhgJ.js";
|
|
1
|
+
import "@js-temporal/polyfill";
|
|
2
|
+
import "urlpattern-polyfill";
|
|
3
|
+
import { a as getRemoteDocument, c as logRequest, l as UrlError, n as createRequest, u as validatePublicUrl } from "./docloader-Dlo9EMTn.js";
|
|
4
|
+
import { o as validateCryptoKey } from "./key-DPg0mibt.js";
|
|
5
|
+
import { t as doubleKnock } from "./http-z-J6i29D.js";
|
|
9
6
|
import { getLogger } from "@logtape/logtape";
|
|
10
|
-
|
|
11
7
|
//#region src/runtime/authdocloader.ts
|
|
12
8
|
const logger = getLogger([
|
|
13
9
|
"fedify",
|
|
@@ -37,17 +33,14 @@ function getAuthenticatedDocumentLoader(identity, { allowPrivateAddress, userAge
|
|
|
37
33
|
});
|
|
38
34
|
throw error;
|
|
39
35
|
}
|
|
40
|
-
|
|
41
|
-
const response = await doubleKnock(originalRequest, identity, {
|
|
36
|
+
return getRemoteDocument(url, await doubleKnock(createRequest(url, { userAgent }), identity, {
|
|
42
37
|
specDeterminer,
|
|
43
38
|
log: logRequest,
|
|
44
39
|
tracerProvider,
|
|
45
40
|
signal: options?.signal
|
|
46
|
-
});
|
|
47
|
-
return getRemoteDocument(url, response, load);
|
|
41
|
+
}), load);
|
|
48
42
|
}
|
|
49
43
|
return load;
|
|
50
44
|
}
|
|
51
|
-
|
|
52
45
|
//#endregion
|
|
53
|
-
export { getAuthenticatedDocumentLoader };
|
|
46
|
+
export { getAuthenticatedDocumentLoader as t };
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const require_docloader = require('./docloader-OWdVzt6R.cjs');
|
|
7
|
-
const require_key = require('./key-C45K8q1u.cjs');
|
|
8
|
-
const require_http = require('./http-Bmn4CXIM.cjs');
|
|
9
|
-
const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
|
|
10
|
-
|
|
1
|
+
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
|
+
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
|
+
const require_docloader = require("./docloader-Co-tW1B6.cjs");
|
|
4
|
+
const require_key = require("./key-B2ZqbGDP.cjs");
|
|
5
|
+
const require_http = require("./http-cvQMgiFd.cjs");
|
|
11
6
|
//#region src/runtime/authdocloader.ts
|
|
12
|
-
const logger = (0,
|
|
7
|
+
const logger = (0, require("@logtape/logtape").getLogger)([
|
|
13
8
|
"fedify",
|
|
14
9
|
"runtime",
|
|
15
10
|
"docloader"
|
|
@@ -37,22 +32,19 @@ function getAuthenticatedDocumentLoader(identity, { allowPrivateAddress, userAge
|
|
|
37
32
|
});
|
|
38
33
|
throw error;
|
|
39
34
|
}
|
|
40
|
-
|
|
41
|
-
const response = await require_http.doubleKnock(originalRequest, identity, {
|
|
35
|
+
return require_docloader.getRemoteDocument(url, await require_http.doubleKnock(require_docloader.createRequest(url, { userAgent }), identity, {
|
|
42
36
|
specDeterminer,
|
|
43
37
|
log: require_docloader.logRequest,
|
|
44
38
|
tracerProvider,
|
|
45
39
|
signal: options?.signal
|
|
46
|
-
});
|
|
47
|
-
return require_docloader.getRemoteDocument(url, response, load);
|
|
40
|
+
}), load);
|
|
48
41
|
}
|
|
49
42
|
return load;
|
|
50
43
|
}
|
|
51
|
-
|
|
52
44
|
//#endregion
|
|
53
|
-
Object.defineProperty(exports,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
});
|
|
45
|
+
Object.defineProperty(exports, "getAuthenticatedDocumentLoader", {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
get: function() {
|
|
48
|
+
return getAuthenticatedDocumentLoader;
|
|
49
|
+
}
|
|
50
|
+
});
|