@fedify/vocab 2.4.0-dev.2122 → 2.4.0-dev.2129
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deno.json +1 -1
- package/dist/mod.cjs +3065 -737
- package/dist/mod.d.cts +708 -2
- package/dist/mod.d.ts +708 -2
- package/dist/mod.js +3066 -738
- package/dist-tests/{actor-CPhFJvyu.mjs → actor-Jl479WDt.mjs} +2 -2
- package/dist-tests/actor.test.mjs +3 -3
- package/dist-tests/{esm-C9nxP5_e.mjs → esm-CU6UbTlZ.mjs} +1 -1
- package/dist-tests/gateway.test.mjs +249 -3
- package/dist-tests/{lookup-Do6hKwnJ.mjs → lookup-YM9st5n8.mjs} +4 -2
- package/dist-tests/lookup.test.mjs +3 -3
- package/dist-tests/portable-lookup.test.mjs +4 -4
- package/dist-tests/signed-representation.test.mjs +1 -1
- package/dist-tests/translation.test.mjs +3 -3
- package/dist-tests/type.test.mjs +1 -1
- package/dist-tests/{vocab-BHtBRusa.mjs → vocab-DFtGFGsb.mjs} +3063 -737
- package/dist-tests/vocab.test.mjs +360 -2
- package/package.json +4 -4
- package/src/gateway.test.ts +335 -1
- package/src/lookup.ts +7 -2
- package/src/preprocessors.ts +1 -1
- package/src/vocab.test.ts +494 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
globalThis.addEventListener = () => {};
|
|
3
|
-
import { A as Object$1, B as QuoteAuthorization, C as Intent, D as Measure, E as Link, F as Person, G as Tombstone, H as Reject, I as Place, L as PropertyValue, N as OrderedCollectionPage, O as Multikey, P as Organization, R as Proposal, S as Image, T as InteractionRule, U as Service, V as QuoteRequest, W as Source, X as vocab_exports, _ as FeaturedCollection, a as Application, b as Group, d as CryptographicKey, f as Delete, g as FeatureRequest, h as FeatureAuthorization, i as Announce, j as Offer, k as Note, l as Commitment, m as Endpoints, n as Activity, p as Document, r as Agreement, s as Collection, t as Accept, u as Create, v as FeaturedItem, w as InteractionPolicy, x as Hashtag, y as Follow, z as Question } from "./vocab-
|
|
3
|
+
import { A as Object$1, B as QuoteAuthorization, C as Intent, D as Measure, E as Link, F as Person, G as Tombstone, H as Reject, I as Place, L as PropertyValue, N as OrderedCollectionPage, O as Multikey, P as Organization, R as Proposal, S as Image, T as InteractionRule, U as Service, V as QuoteRequest, W as Source, X as vocab_exports, _ as FeaturedCollection, a as Application, b as Group, d as CryptographicKey, f as Delete, g as FeatureRequest, h as FeatureAuthorization, i as Announce, j as Offer, k as Note, l as Commitment, m as Endpoints, n as Activity, p as Document, r as Agreement, s as Collection, t as Accept, u as Create, v as FeaturedItem, w as InteractionPolicy, x as Hashtag, y as Follow, z as Question } from "./vocab-DFtGFGsb.mjs";
|
|
4
|
+
import { t as esm_default } from "./esm-CU6UbTlZ.mjs";
|
|
4
5
|
import { t as assertInstanceOf } from "./utils-Df2odC27.mjs";
|
|
5
6
|
import { mockDocumentLoader, test } from "@fedify/fixture";
|
|
6
7
|
import { deepStrictEqual, notDeepStrictEqual, ok, rejects, throws } from "node:assert/strict";
|
|
7
|
-
import { LanguageString, decodeMultibase, parseDecimal } from "@fedify/vocab-runtime";
|
|
8
|
+
import { FetchError, LanguageString, decodeMultibase, getDocumentLoader, parseDecimal } from "@fedify/vocab-runtime";
|
|
8
9
|
import { configure, reset } from "@logtape/logtape";
|
|
9
10
|
import { pascalCase } from "es-toolkit";
|
|
10
11
|
import { areAllScalarTypes, loadSchemaFiles } from "@fedify/vocab-tools";
|
|
@@ -1203,6 +1204,59 @@ test({
|
|
|
1203
1204
|
});
|
|
1204
1205
|
}
|
|
1205
1206
|
});
|
|
1207
|
+
test({
|
|
1208
|
+
name: "Announce.getObject() logs suppressed failures as warnings",
|
|
1209
|
+
permissions: {
|
|
1210
|
+
env: true,
|
|
1211
|
+
read: true
|
|
1212
|
+
},
|
|
1213
|
+
async fn() {
|
|
1214
|
+
const records = [];
|
|
1215
|
+
const notFoundUrl = "https://example.com/suppressed-not-found";
|
|
1216
|
+
const invalidObjectUrl = "https://example.com/invalid-object";
|
|
1217
|
+
await reset();
|
|
1218
|
+
esm_default.spyGlobal();
|
|
1219
|
+
try {
|
|
1220
|
+
await configure({
|
|
1221
|
+
sinks: { buffer(record) {
|
|
1222
|
+
records.push(record);
|
|
1223
|
+
} },
|
|
1224
|
+
filters: {},
|
|
1225
|
+
loggers: [{
|
|
1226
|
+
category: [],
|
|
1227
|
+
sinks: ["buffer"]
|
|
1228
|
+
}]
|
|
1229
|
+
});
|
|
1230
|
+
esm_default.get(notFoundUrl, { status: 404 });
|
|
1231
|
+
deepStrictEqual(await new Announce({ object: new URL(notFoundUrl) }).getObject({ suppressError: true }), null);
|
|
1232
|
+
ok(records.some((record) => record.level === "warning" && record.rawMessage === "Failed to fetch document: {status} {url} {headers}"));
|
|
1233
|
+
ok(records.some((record) => record.level === "warning" && record.rawMessage === "Failed to fetch {url}: {error}"));
|
|
1234
|
+
deepStrictEqual(records.some((record) => record.level === "error" && (record.rawMessage === "Failed to fetch document: {status} {url} {headers}" || record.rawMessage === "Failed to fetch {url}: {error}")), false);
|
|
1235
|
+
records.length = 0;
|
|
1236
|
+
const unsuppressedFetch = new Announce({ object: new URL(notFoundUrl) });
|
|
1237
|
+
await rejects(() => unsuppressedFetch.getObject(), FetchError);
|
|
1238
|
+
ok(records.some((record) => record.level === "error" && record.rawMessage === "Failed to fetch document: {status} {url} {headers}"));
|
|
1239
|
+
records.length = 0;
|
|
1240
|
+
const invalidDocumentLoader = async (url) => ({
|
|
1241
|
+
contextUrl: null,
|
|
1242
|
+
documentUrl: url,
|
|
1243
|
+
document: null
|
|
1244
|
+
});
|
|
1245
|
+
deepStrictEqual(await new Announce({ object: new URL(invalidObjectUrl) }).getObject({
|
|
1246
|
+
documentLoader: invalidDocumentLoader,
|
|
1247
|
+
suppressError: true
|
|
1248
|
+
}), null);
|
|
1249
|
+
ok(records.some((record) => record.level === "warning" && record.rawMessage === "Failed to parse {url}: {error}"));
|
|
1250
|
+
deepStrictEqual(records.some((record) => record.level === "error" && record.rawMessage === "Failed to parse {url}: {error}"), false);
|
|
1251
|
+
records.length = 0;
|
|
1252
|
+
const unsuppressedParsing = new Announce({ object: new URL(invalidObjectUrl) });
|
|
1253
|
+
await rejects(() => unsuppressedParsing.getObject({ documentLoader: invalidDocumentLoader }), TypeError);
|
|
1254
|
+
} finally {
|
|
1255
|
+
esm_default.hardReset();
|
|
1256
|
+
await reset();
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
});
|
|
1206
1260
|
test("Activity.getObject() fetches canonical portable IRIs", async () => {
|
|
1207
1261
|
const fetchedUrls = [];
|
|
1208
1262
|
const documentLoader = async (url) => {
|
|
@@ -3636,5 +3690,309 @@ for (const typeUri in types) {
|
|
|
3636
3690
|
deepStrictEqual(cls.typeId, new URL(type.uri));
|
|
3637
3691
|
});
|
|
3638
3692
|
}
|
|
3693
|
+
test("Announce.getObject() suppresses redirect, context, and private URL logs", async () => {
|
|
3694
|
+
const records = [];
|
|
3695
|
+
const objectUrl = "https://example.com/suppression-object";
|
|
3696
|
+
const contextUrl = "https://example.com/suppression-context";
|
|
3697
|
+
const scenarios = [
|
|
3698
|
+
"redirect limit",
|
|
3699
|
+
"redirect loop",
|
|
3700
|
+
"context",
|
|
3701
|
+
"private",
|
|
3702
|
+
"private redirect"
|
|
3703
|
+
];
|
|
3704
|
+
await reset();
|
|
3705
|
+
await configure({
|
|
3706
|
+
sinks: { capture: (record) => {
|
|
3707
|
+
records.push(record);
|
|
3708
|
+
} },
|
|
3709
|
+
loggers: [{
|
|
3710
|
+
category: ["fedify"],
|
|
3711
|
+
lowestLevel: "debug",
|
|
3712
|
+
sinks: ["capture"]
|
|
3713
|
+
}]
|
|
3714
|
+
});
|
|
3715
|
+
try {
|
|
3716
|
+
for (const scenario of scenarios) {
|
|
3717
|
+
esm_default.spyGlobal();
|
|
3718
|
+
let fetches = 0;
|
|
3719
|
+
esm_default.get("begin:https://example.com/", (call) => {
|
|
3720
|
+
fetches++;
|
|
3721
|
+
if (scenario === "redirect limit") return Response.redirect(`https://example.com/redirect-${fetches}`, 302);
|
|
3722
|
+
if (scenario === "redirect loop") return Response.redirect(objectUrl, 302);
|
|
3723
|
+
if (scenario === "private redirect") return Response.redirect("http://127.0.0.1/private", 302);
|
|
3724
|
+
if (call.url === contextUrl) return new Response(null, { status: 404 });
|
|
3725
|
+
return new Response(JSON.stringify({
|
|
3726
|
+
"@context": ["https://www.w3.org/ns/activitystreams", contextUrl],
|
|
3727
|
+
id: objectUrl,
|
|
3728
|
+
type: "Note"
|
|
3729
|
+
}), { headers: { "Content-Type": "application/activity+json" } });
|
|
3730
|
+
});
|
|
3731
|
+
try {
|
|
3732
|
+
for (const suppressError of [
|
|
3733
|
+
true,
|
|
3734
|
+
false,
|
|
3735
|
+
void 0
|
|
3736
|
+
]) {
|
|
3737
|
+
records.length = 0;
|
|
3738
|
+
fetches = 0;
|
|
3739
|
+
const announce = new Announce({ object: new URL(scenario === "private" ? "http://127.0.0.1/private" : objectUrl) });
|
|
3740
|
+
if (suppressError) {
|
|
3741
|
+
deepStrictEqual(await announce.getObject({ suppressError }), null);
|
|
3742
|
+
deepStrictEqual(records.filter((r) => r.level === "error"), [], scenario);
|
|
3743
|
+
ok(records.some((r) => r.level === "warning"), scenario);
|
|
3744
|
+
} else {
|
|
3745
|
+
await rejects(() => announce.getObject({ suppressError }));
|
|
3746
|
+
ok(records.some((r) => r.level === "error"), scenario);
|
|
3747
|
+
}
|
|
3748
|
+
if (scenario === "private") deepStrictEqual(fetches, 0);
|
|
3749
|
+
if (scenario === "private redirect") deepStrictEqual(fetches, 1);
|
|
3750
|
+
}
|
|
3751
|
+
} finally {
|
|
3752
|
+
esm_default.hardReset();
|
|
3753
|
+
}
|
|
3754
|
+
}
|
|
3755
|
+
} finally {
|
|
3756
|
+
await reset();
|
|
3757
|
+
}
|
|
3758
|
+
});
|
|
3759
|
+
test("suppressed context loading does not persist on fetched objects", async () => {
|
|
3760
|
+
const states = [];
|
|
3761
|
+
const contextLoader = (url, options) => {
|
|
3762
|
+
if (url === "https://www.w3.org/ns/activitystreams") return mockDocumentLoader(url);
|
|
3763
|
+
states.push(options?.suppressError);
|
|
3764
|
+
return Promise.resolve({
|
|
3765
|
+
contextUrl: null,
|
|
3766
|
+
documentUrl: url,
|
|
3767
|
+
document: { "@context": {
|
|
3768
|
+
as: "https://www.w3.org/ns/activitystreams#",
|
|
3769
|
+
name: "as:name"
|
|
3770
|
+
} }
|
|
3771
|
+
});
|
|
3772
|
+
};
|
|
3773
|
+
const documentLoader = (url) => Promise.resolve({
|
|
3774
|
+
contextUrl: null,
|
|
3775
|
+
documentUrl: url,
|
|
3776
|
+
document: {
|
|
3777
|
+
"@context": ["https://www.w3.org/ns/activitystreams", "https://example.com/scoped-context"],
|
|
3778
|
+
id: url,
|
|
3779
|
+
type: url.endsWith("actor") ? "Person" : "Note",
|
|
3780
|
+
attributedTo: "https://example.com/scoped-actor"
|
|
3781
|
+
}
|
|
3782
|
+
});
|
|
3783
|
+
const note = await new Announce({ object: new URL("https://example.com/scoped-note") }).getObject({
|
|
3784
|
+
documentLoader,
|
|
3785
|
+
contextLoader,
|
|
3786
|
+
suppressError: true
|
|
3787
|
+
});
|
|
3788
|
+
assertInstanceOf(note, Note);
|
|
3789
|
+
ok(states.includes(true));
|
|
3790
|
+
states.length = 0;
|
|
3791
|
+
assertInstanceOf(await note.getAttribution(), Person);
|
|
3792
|
+
ok(states.length > 0);
|
|
3793
|
+
deepStrictEqual(states.includes(true), false);
|
|
3794
|
+
});
|
|
3795
|
+
test("attribution chains alternate ordinary and portable suppression", async () => {
|
|
3796
|
+
const states = [];
|
|
3797
|
+
const depths = [];
|
|
3798
|
+
let hop = 0;
|
|
3799
|
+
const contextUrl = "https://example.com/attribution-context";
|
|
3800
|
+
const contextLoader = (url, options) => {
|
|
3801
|
+
if (url !== contextUrl) return mockDocumentLoader(url, options);
|
|
3802
|
+
states.push(options?.suppressError);
|
|
3803
|
+
const stack = (/* @__PURE__ */ new Error()).stack;
|
|
3804
|
+
ok(stack);
|
|
3805
|
+
depths[hop]?.push(stack.split("\n").length);
|
|
3806
|
+
return Promise.resolve({
|
|
3807
|
+
contextUrl: null,
|
|
3808
|
+
documentUrl: url,
|
|
3809
|
+
document: { "@context": { name: "https://www.w3.org/ns/activitystreams#name" } }
|
|
3810
|
+
});
|
|
3811
|
+
};
|
|
3812
|
+
const documentLoader = (url) => {
|
|
3813
|
+
const hop = Number(new URL(url).pathname.split("/").at(-1));
|
|
3814
|
+
return Promise.resolve({
|
|
3815
|
+
contextUrl: null,
|
|
3816
|
+
documentUrl: url,
|
|
3817
|
+
document: {
|
|
3818
|
+
"@context": ["https://www.w3.org/ns/activitystreams", contextUrl],
|
|
3819
|
+
id: url,
|
|
3820
|
+
type: "Person",
|
|
3821
|
+
name: `Actor ${hop}`,
|
|
3822
|
+
attributedTo: `https://example.com/actors/${hop + 1}`
|
|
3823
|
+
}
|
|
3824
|
+
});
|
|
3825
|
+
};
|
|
3826
|
+
let person = new Person({
|
|
3827
|
+
id: new URL("https://example.com/actors/root"),
|
|
3828
|
+
attribution: new URL("https://example.com/actors/0")
|
|
3829
|
+
}, {
|
|
3830
|
+
documentLoader,
|
|
3831
|
+
contextLoader
|
|
3832
|
+
});
|
|
3833
|
+
const stackTraceLimit = globalThis.Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
3834
|
+
try {
|
|
3835
|
+
ok(Reflect.set(Error, "stackTraceLimit", Infinity));
|
|
3836
|
+
for (; hop < 100; hop++) {
|
|
3837
|
+
depths[hop] = [];
|
|
3838
|
+
const next = await person.getAttribution({
|
|
3839
|
+
suppressError: true,
|
|
3840
|
+
...hop % 2 === 0 ? {} : { verifyPortableObject: () => Promise.resolve({ verified: true }) }
|
|
3841
|
+
});
|
|
3842
|
+
assertInstanceOf(next, Person);
|
|
3843
|
+
deepStrictEqual(next.id, new URL(`https://example.com/actors/${hop}`));
|
|
3844
|
+
person = next;
|
|
3845
|
+
}
|
|
3846
|
+
ok(depths.every((values) => values.length > 0));
|
|
3847
|
+
deepStrictEqual(depths[98], depths[2]);
|
|
3848
|
+
deepStrictEqual(depths[99], depths[3]);
|
|
3849
|
+
ok(states.length >= 100);
|
|
3850
|
+
ok(states.every((state) => state === true));
|
|
3851
|
+
states.length = 0;
|
|
3852
|
+
assertInstanceOf(await person.getAttribution(), Person);
|
|
3853
|
+
ok(states.length > 0);
|
|
3854
|
+
ok(states.every((state) => state !== true));
|
|
3855
|
+
} finally {
|
|
3856
|
+
if (stackTraceLimit == null) Reflect.deleteProperty(Error, "stackTraceLimit");
|
|
3857
|
+
else globalThis.Object.defineProperty(Error, "stackTraceLimit", stackTraceLimit);
|
|
3858
|
+
}
|
|
3859
|
+
});
|
|
3860
|
+
test("portable accessors suppress document and context failure logs", async () => {
|
|
3861
|
+
const records = [];
|
|
3862
|
+
const id = new URL("ap+ef61://did%3Akey%3Az6Mkabc/objects/1");
|
|
3863
|
+
const contextUrl = "https://example.com/portable-suppression-context";
|
|
3864
|
+
await reset();
|
|
3865
|
+
await configure({
|
|
3866
|
+
sinks: { capture: (record) => {
|
|
3867
|
+
records.push(record);
|
|
3868
|
+
} },
|
|
3869
|
+
loggers: [{
|
|
3870
|
+
category: ["fedify"],
|
|
3871
|
+
lowestLevel: "debug",
|
|
3872
|
+
sinks: ["capture"]
|
|
3873
|
+
}]
|
|
3874
|
+
});
|
|
3875
|
+
try {
|
|
3876
|
+
for (const failContext of [false, true]) {
|
|
3877
|
+
esm_default.spyGlobal();
|
|
3878
|
+
esm_default.get("begin:https://example.com/", (call) => {
|
|
3879
|
+
if (!failContext || call.url === contextUrl) return new Response(null, { status: 404 });
|
|
3880
|
+
return new Response(JSON.stringify({
|
|
3881
|
+
"@context": ["https://www.w3.org/ns/activitystreams", contextUrl],
|
|
3882
|
+
id: "ap://did:key:z6Mkabc/objects/1",
|
|
3883
|
+
type: "Note"
|
|
3884
|
+
}), { headers: { "Content-Type": "application/activity+json" } });
|
|
3885
|
+
});
|
|
3886
|
+
try {
|
|
3887
|
+
for (const suppressError of [
|
|
3888
|
+
true,
|
|
3889
|
+
false,
|
|
3890
|
+
void 0
|
|
3891
|
+
]) {
|
|
3892
|
+
records.length = 0;
|
|
3893
|
+
const announce = new Announce({ object: id });
|
|
3894
|
+
const options = {
|
|
3895
|
+
suppressError,
|
|
3896
|
+
gateways: ["https://example.com/"],
|
|
3897
|
+
verifyPortableObject: () => Promise.resolve({ verified: true })
|
|
3898
|
+
};
|
|
3899
|
+
if (suppressError) {
|
|
3900
|
+
deepStrictEqual(await announce.getObject(options), null);
|
|
3901
|
+
deepStrictEqual(records.filter((r) => r.level === "error"), []);
|
|
3902
|
+
ok(records.some((r) => r.level === "warning"));
|
|
3903
|
+
} else {
|
|
3904
|
+
await rejects(() => announce.getObject(options));
|
|
3905
|
+
ok(records.some((r) => r.level === "error"));
|
|
3906
|
+
}
|
|
3907
|
+
}
|
|
3908
|
+
} finally {
|
|
3909
|
+
esm_default.hardReset();
|
|
3910
|
+
}
|
|
3911
|
+
}
|
|
3912
|
+
} finally {
|
|
3913
|
+
await reset();
|
|
3914
|
+
}
|
|
3915
|
+
});
|
|
3916
|
+
test("portable verifiers suppress document logs only during dereferencing", async () => {
|
|
3917
|
+
const records = [];
|
|
3918
|
+
const id = new URL("ap+ef61://did%3Akey%3Az6Mkabc/objects/1");
|
|
3919
|
+
const verificationUrl = "https://example.com/verification-document";
|
|
3920
|
+
const missingUrl = "https://example.com/missing-verification-document";
|
|
3921
|
+
const signal = new AbortController().signal;
|
|
3922
|
+
await reset();
|
|
3923
|
+
await configure({
|
|
3924
|
+
sinks: { capture: (record) => records.push(record) },
|
|
3925
|
+
loggers: [{
|
|
3926
|
+
category: ["fedify"],
|
|
3927
|
+
lowestLevel: "debug",
|
|
3928
|
+
sinks: ["capture"]
|
|
3929
|
+
}]
|
|
3930
|
+
});
|
|
3931
|
+
try {
|
|
3932
|
+
for (const failVerification of [false, true]) {
|
|
3933
|
+
esm_default.spyGlobal();
|
|
3934
|
+
esm_default.get("begin:https://example.com/.well-known/", {
|
|
3935
|
+
headers: { "Content-Type": "application/activity+json" },
|
|
3936
|
+
body: {
|
|
3937
|
+
"@context": "https://www.w3.org/ns/activitystreams",
|
|
3938
|
+
id: "ap://did:key:z6Mkabc/objects/1",
|
|
3939
|
+
type: "Note"
|
|
3940
|
+
}
|
|
3941
|
+
});
|
|
3942
|
+
esm_default.get(verificationUrl, {
|
|
3943
|
+
status: failVerification ? 404 : 200,
|
|
3944
|
+
headers: { "Content-Type": "application/ld+json" },
|
|
3945
|
+
body: {}
|
|
3946
|
+
});
|
|
3947
|
+
esm_default.get(missingUrl, { status: 404 });
|
|
3948
|
+
try {
|
|
3949
|
+
for (const suppressError of [
|
|
3950
|
+
true,
|
|
3951
|
+
false,
|
|
3952
|
+
void 0
|
|
3953
|
+
]) {
|
|
3954
|
+
records.length = 0;
|
|
3955
|
+
const baseLoader = getDocumentLoader();
|
|
3956
|
+
const calls = [];
|
|
3957
|
+
const documentLoader = (url, options) => {
|
|
3958
|
+
calls.push(options);
|
|
3959
|
+
return baseLoader(url, options);
|
|
3960
|
+
};
|
|
3961
|
+
let retainedLoader;
|
|
3962
|
+
const loaderOptions = { signal };
|
|
3963
|
+
const object = await new Announce({ object: id }).getObject({
|
|
3964
|
+
suppressError,
|
|
3965
|
+
documentLoader,
|
|
3966
|
+
gateways: ["https://example.com/"],
|
|
3967
|
+
verifyPortableObject: async (_document, options) => {
|
|
3968
|
+
retainedLoader = options.documentLoader;
|
|
3969
|
+
ok(options.documentLoader);
|
|
3970
|
+
await options.documentLoader(verificationUrl, loaderOptions);
|
|
3971
|
+
return { verified: true };
|
|
3972
|
+
}
|
|
3973
|
+
});
|
|
3974
|
+
if (failVerification) {
|
|
3975
|
+
deepStrictEqual(object, null);
|
|
3976
|
+
deepStrictEqual(records.some((record) => record.level === "error"), !suppressError);
|
|
3977
|
+
ok(records.some((record) => record.level === "warning"));
|
|
3978
|
+
} else assertInstanceOf(object, Note);
|
|
3979
|
+
deepStrictEqual(calls.at(-1)?.signal, signal);
|
|
3980
|
+
deepStrictEqual(calls.at(-1)?.suppressError, suppressError ? true : void 0);
|
|
3981
|
+
deepStrictEqual(loaderOptions, { signal });
|
|
3982
|
+
records.length = 0;
|
|
3983
|
+
const releasedLoader = retainedLoader;
|
|
3984
|
+
ok(releasedLoader);
|
|
3985
|
+
await rejects(() => releasedLoader(missingUrl, loaderOptions), FetchError);
|
|
3986
|
+
deepStrictEqual(calls.at(-1), loaderOptions);
|
|
3987
|
+
ok(records.some((record) => record.level === "error"));
|
|
3988
|
+
}
|
|
3989
|
+
} finally {
|
|
3990
|
+
esm_default.hardReset();
|
|
3991
|
+
}
|
|
3992
|
+
}
|
|
3993
|
+
} finally {
|
|
3994
|
+
await reset();
|
|
3995
|
+
}
|
|
3996
|
+
});
|
|
3639
3997
|
//#endregion
|
|
3640
3998
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/vocab",
|
|
3
|
-
"version": "2.4.0-dev.
|
|
3
|
+
"version": "2.4.0-dev.2129+c0ddb433",
|
|
4
4
|
"homepage": "https://fedify.dev/",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"jsonld": "^9.0.0",
|
|
44
44
|
"pkijs": "^3.3.3",
|
|
45
45
|
"temporal-polyfill": "^1.0.1",
|
|
46
|
-
"@fedify/vocab-
|
|
47
|
-
"@fedify/webfinger": "2.4.0-dev.
|
|
48
|
-
"@fedify/vocab-
|
|
46
|
+
"@fedify/vocab-runtime": "2.4.0-dev.2129+c0ddb433",
|
|
47
|
+
"@fedify/webfinger": "2.4.0-dev.2129+c0ddb433",
|
|
48
|
+
"@fedify/vocab-tools": "2.4.0-dev.2129+c0ddb433"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "^24.12.2",
|