@fedify/vocab 2.2.12 → 2.2.13
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 +217 -217
- package/dist/mod.js +217 -217
- package/dist-tests/actor.test.mjs +23 -23
- package/dist-tests/{deno-BWf9ywXv.mjs → deno-BetyHytq.mjs} +2 -2
- package/dist-tests/lookup.test.mjs +2 -2
- package/dist-tests/type.test.mjs +1 -1
- package/dist-tests/{vocab-D0bvCrSO.mjs → vocab-DJjWQkE9.mjs} +216 -216
- package/dist-tests/vocab.test.mjs +1 -1
- package/package.json +4 -4
- package/src/actor.test.ts +23 -22
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
globalThis.addEventListener = () => {};
|
|
3
|
-
import { M as __exportAll, T as Service, r as Application, u as Group, v as Organization, y as Person } from "./vocab-
|
|
4
|
-
import { n as version, r as esm_default, t as name } from "./deno-
|
|
3
|
+
import { M as __exportAll, T as Service, r as Application, u as Group, v as Organization, y as Person } from "./vocab-DJjWQkE9.mjs";
|
|
4
|
+
import { n as version, r as esm_default, t as name } from "./deno-BetyHytq.mjs";
|
|
5
5
|
import { t as getTypeId } from "./type-Cf-vxmre.mjs";
|
|
6
6
|
import { test } from "@fedify/fixture";
|
|
7
7
|
import { deepStrictEqual, ok, rejects, strictEqual, throws } from "node:assert/strict";
|
|
@@ -5776,50 +5776,50 @@ test({
|
|
|
5776
5776
|
},
|
|
5777
5777
|
async fn(t) {
|
|
5778
5778
|
esm_default.spyGlobal();
|
|
5779
|
-
esm_default.get("begin:https://
|
|
5780
|
-
body: { subject: "acct:johndoe@
|
|
5779
|
+
esm_default.get("begin:https://1.1.1.1/.well-known/webfinger?", {
|
|
5780
|
+
body: { subject: "acct:johndoe@1.1.1.1" },
|
|
5781
5781
|
headers: { "Content-Type": "application/jrd+json" }
|
|
5782
5782
|
});
|
|
5783
|
-
const actorId = new URL("https://
|
|
5783
|
+
const actorId = new URL("https://1.1.1.1/@john");
|
|
5784
5784
|
const actor = new Person({
|
|
5785
5785
|
id: actorId,
|
|
5786
5786
|
preferredUsername: "john"
|
|
5787
5787
|
});
|
|
5788
5788
|
await t.step("WebFinger subject", async () => {
|
|
5789
|
-
deepStrictEqual(await getActorHandle(actor), "@johndoe@
|
|
5790
|
-
deepStrictEqual(await getActorHandle(actor, { trimLeadingAt: true }), "johndoe@
|
|
5791
|
-
deepStrictEqual(await getActorHandle(actorId), "@johndoe@
|
|
5792
|
-
deepStrictEqual(await getActorHandle(actorId, { trimLeadingAt: true }), "johndoe@
|
|
5789
|
+
deepStrictEqual(await getActorHandle(actor), "@johndoe@1.1.1.1");
|
|
5790
|
+
deepStrictEqual(await getActorHandle(actor, { trimLeadingAt: true }), "johndoe@1.1.1.1");
|
|
5791
|
+
deepStrictEqual(await getActorHandle(actorId), "@johndoe@1.1.1.1");
|
|
5792
|
+
deepStrictEqual(await getActorHandle(actorId, { trimLeadingAt: true }), "johndoe@1.1.1.1");
|
|
5793
5793
|
});
|
|
5794
5794
|
esm_default.removeRoutes();
|
|
5795
|
-
esm_default.get("begin:https://
|
|
5795
|
+
esm_default.get("begin:https://1.1.1.1/.well-known/webfinger?", {
|
|
5796
5796
|
body: {
|
|
5797
|
-
subject: "https://
|
|
5798
|
-
aliases: ["acct:john@
|
|
5797
|
+
subject: "https://1.1.1.1/@john",
|
|
5798
|
+
aliases: ["acct:john@8.8.8.8", "acct:johndoe@1.1.1.1"]
|
|
5799
5799
|
},
|
|
5800
5800
|
headers: { "Content-Type": "application/jrd+json" }
|
|
5801
5801
|
});
|
|
5802
5802
|
await t.step("WebFinger aliases", async () => {
|
|
5803
|
-
deepStrictEqual(await getActorHandle(actor), "@johndoe@
|
|
5804
|
-
deepStrictEqual(await getActorHandle(actor, { trimLeadingAt: true }), "johndoe@
|
|
5805
|
-
deepStrictEqual(await getActorHandle(actorId), "@johndoe@
|
|
5806
|
-
deepStrictEqual(await getActorHandle(actorId, { trimLeadingAt: true }), "johndoe@
|
|
5803
|
+
deepStrictEqual(await getActorHandle(actor), "@johndoe@1.1.1.1");
|
|
5804
|
+
deepStrictEqual(await getActorHandle(actor, { trimLeadingAt: true }), "johndoe@1.1.1.1");
|
|
5805
|
+
deepStrictEqual(await getActorHandle(actorId), "@johndoe@1.1.1.1");
|
|
5806
|
+
deepStrictEqual(await getActorHandle(actorId, { trimLeadingAt: true }), "johndoe@1.1.1.1");
|
|
5807
5807
|
});
|
|
5808
|
-
esm_default.get("begin:https://
|
|
5808
|
+
esm_default.get("begin:https://8.8.8.8/.well-known/webfinger?", {
|
|
5809
5809
|
body: {
|
|
5810
|
-
subject: "acct:john@
|
|
5811
|
-
aliases: ["https://
|
|
5810
|
+
subject: "acct:john@8.8.8.8",
|
|
5811
|
+
aliases: ["https://1.1.1.1/@john"]
|
|
5812
5812
|
},
|
|
5813
5813
|
headers: { "Content-Type": "application/jrd+json" }
|
|
5814
5814
|
});
|
|
5815
5815
|
await t.step("cross-origin WebFinger resources", async () => {
|
|
5816
|
-
deepStrictEqual(await getActorHandle(actor), "@john@
|
|
5816
|
+
deepStrictEqual(await getActorHandle(actor), "@john@8.8.8.8");
|
|
5817
5817
|
});
|
|
5818
5818
|
esm_default.removeRoutes();
|
|
5819
|
-
esm_default.get("begin:https://
|
|
5819
|
+
esm_default.get("begin:https://1.1.1.1/.well-known/webfinger?", { status: 404 });
|
|
5820
5820
|
await t.step("no WebFinger", async () => {
|
|
5821
|
-
deepStrictEqual(await getActorHandle(actor), "@john@
|
|
5822
|
-
rejects(() => getActorHandle(actorId), TypeError);
|
|
5821
|
+
deepStrictEqual(await getActorHandle(actor), "@john@1.1.1.1");
|
|
5822
|
+
await rejects(() => getActorHandle(actorId), TypeError);
|
|
5823
5823
|
});
|
|
5824
5824
|
esm_default.hardReset();
|
|
5825
5825
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
globalThis.addEventListener = () => {};
|
|
3
|
-
import { N as __toESM, j as __commonJSMin } from "./vocab-
|
|
3
|
+
import { N as __toESM, j as __commonJSMin } from "./vocab-DJjWQkE9.mjs";
|
|
4
4
|
//#region ../../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js
|
|
5
5
|
var require_glob_to_regexp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6
6
|
module.exports = function(glob, opts) {
|
|
@@ -1204,6 +1204,6 @@ var esm_default = new class FetchMock {
|
|
|
1204
1204
|
//#endregion
|
|
1205
1205
|
//#region deno.json
|
|
1206
1206
|
var name = "@fedify/vocab";
|
|
1207
|
-
var version = "2.2.
|
|
1207
|
+
var version = "2.2.13";
|
|
1208
1208
|
//#endregion
|
|
1209
1209
|
export { version as n, esm_default as r, name as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
globalThis.addEventListener = () => {};
|
|
3
|
-
import { g as Object$1, h as Note, i as Collection, y as Person } from "./vocab-
|
|
4
|
-
import { n as version, r as esm_default, t as name } from "./deno-
|
|
3
|
+
import { g as Object$1, h as Note, i as Collection, y as Person } from "./vocab-DJjWQkE9.mjs";
|
|
4
|
+
import { n as version, r as esm_default, t as name } from "./deno-BetyHytq.mjs";
|
|
5
5
|
import { t as getTypeId } from "./type-Cf-vxmre.mjs";
|
|
6
6
|
import { t as assertInstanceOf } from "./utils-CE8Dk5hm.mjs";
|
|
7
7
|
import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
|
package/dist-tests/type.test.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
globalThis.addEventListener = () => {};
|
|
3
|
-
import { O as getEntityTypeById, k as isEntityType, m as Link, y as Person } from "./vocab-
|
|
3
|
+
import { O as getEntityTypeById, k as isEntityType, m as Link, y as Person } from "./vocab-DJjWQkE9.mjs";
|
|
4
4
|
import { t as getTypeId } from "./type-Cf-vxmre.mjs";
|
|
5
5
|
import { test } from "@fedify/fixture";
|
|
6
6
|
import { deepStrictEqual } from "node:assert/strict";
|