@fedify/vocab 2.1.23 → 2.1.25

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.
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  globalThis.addEventListener = () => {};
3
- import { b as Service, g as Person, h as Organization, l as Group, r as Application, w as __exportAll } from "./vocab-VQZhfXow.mjs";
4
- import { n as version, r as esm_default, t as name } from "./deno-7I8vu2gt.mjs";
3
+ import { b as Service, g as Person, h as Organization, l as Group, r as Application, w as __exportAll } from "./vocab-CyEe0PZp.mjs";
4
+ import { n as version, r as esm_default, t as name } from "./deno-DHi8-LT3.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://foo.example.com/.well-known/webfinger?", {
5780
- body: { subject: "acct:johndoe@foo.example.com" },
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://foo.example.com/@john");
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@foo.example.com");
5790
- deepStrictEqual(await getActorHandle(actor, { trimLeadingAt: true }), "johndoe@foo.example.com");
5791
- deepStrictEqual(await getActorHandle(actorId), "@johndoe@foo.example.com");
5792
- deepStrictEqual(await getActorHandle(actorId, { trimLeadingAt: true }), "johndoe@foo.example.com");
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://foo.example.com/.well-known/webfinger?", {
5795
+ esm_default.get("begin:https://1.1.1.1/.well-known/webfinger?", {
5796
5796
  body: {
5797
- subject: "https://foo.example.com/@john",
5798
- aliases: ["acct:john@bar.example.com", "acct:johndoe@foo.example.com"]
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@foo.example.com");
5804
- deepStrictEqual(await getActorHandle(actor, { trimLeadingAt: true }), "johndoe@foo.example.com");
5805
- deepStrictEqual(await getActorHandle(actorId), "@johndoe@foo.example.com");
5806
- deepStrictEqual(await getActorHandle(actorId, { trimLeadingAt: true }), "johndoe@foo.example.com");
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://bar.example.com/.well-known/webfinger?", {
5808
+ esm_default.get("begin:https://8.8.8.8/.well-known/webfinger?", {
5809
5809
  body: {
5810
- subject: "acct:john@bar.example.com",
5811
- aliases: ["https://foo.example.com/@john"]
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@bar.example.com");
5816
+ deepStrictEqual(await getActorHandle(actor), "@john@8.8.8.8");
5817
5817
  });
5818
5818
  esm_default.removeRoutes();
5819
- esm_default.get("begin:https://foo.example.com/.well-known/webfinger?", { status: 404 });
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@foo.example.com");
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 { C as __commonJSMin, T as __toESM } from "./vocab-VQZhfXow.mjs";
3
+ import { C as __commonJSMin, T as __toESM } from "./vocab-CyEe0PZp.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.1.23";
1207
+ var version = "2.1.25";
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 { f as Note, g as Person, i as Collection, p as Object$1 } from "./vocab-VQZhfXow.mjs";
4
- import { n as version, r as esm_default, t as name } from "./deno-7I8vu2gt.mjs";
3
+ import { f as Note, g as Person, i as Collection, p as Object$1 } from "./vocab-CyEe0PZp.mjs";
4
+ import { n as version, r as esm_default, t as name } from "./deno-DHi8-LT3.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";
@@ -271,7 +271,7 @@ test("lookupObject()", {
271
271
  name: "Hong Gildong"
272
272
  }));
273
273
  });
274
- esm_default.removeRoutes();
274
+ esm_default.removeRoutes({ includeFallback: false });
275
275
  esm_default.get("begin:https://example.com/.well-known/webfinger", {
276
276
  subject: "acct:janedoe@example.com",
277
277
  links: [{
@@ -284,7 +284,7 @@ test("lookupObject()", {
284
284
  deepStrictEqual(await lookupObject("janedoe@example.com", options), null);
285
285
  deepStrictEqual(await lookupObject("https://example.com/404", options), null);
286
286
  });
287
- esm_default.removeRoutes();
287
+ esm_default.removeRoutes({ includeFallback: false });
288
288
  esm_default.get("begin:https://example.com/.well-known/webfinger", () => new Promise((resolve) => {
289
289
  setTimeout(() => {
290
290
  resolve({
@@ -306,7 +306,7 @@ test("lookupObject()", {
306
306
  controller.abort();
307
307
  deepStrictEqual(await promise, null);
308
308
  });
309
- esm_default.removeRoutes();
309
+ esm_default.removeRoutes({ includeFallback: false });
310
310
  esm_default.get("begin:https://example.com/.well-known/webfinger", {
311
311
  subject: "acct:johndoe@example.com",
312
312
  links: [{
@@ -324,7 +324,7 @@ test("lookupObject()", {
324
324
  assertInstanceOf(person, Person);
325
325
  deepStrictEqual(person.id, new URL("https://example.com/person"));
326
326
  });
327
- esm_default.removeRoutes();
327
+ esm_default.removeRoutes({ includeFallback: false });
328
328
  esm_default.get("begin:https://example.com/.well-known/webfinger", () => new Promise((resolve) => {
329
329
  setTimeout(() => {
330
330
  resolve({
@@ -345,7 +345,7 @@ test("lookupObject()", {
345
345
  signal: controller.signal
346
346
  }), null);
347
347
  });
348
- esm_default.removeRoutes();
348
+ esm_default.removeRoutes({ includeFallback: false });
349
349
  esm_default.get("https://example.com/slow-object", () => new Promise((resolve) => {
350
350
  setTimeout(() => {
351
351
  resolve({
@@ -1,6 +1,6 @@
1
1
  import "@js-temporal/polyfill";
2
2
  globalThis.addEventListener = () => {};
3
- import { g as Person } from "./vocab-VQZhfXow.mjs";
3
+ import { g as Person } from "./vocab-CyEe0PZp.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";