fedipod 1.47.0 → 1.48.0

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.
@@ -32544,55 +32544,6 @@ var REL = {
32544
32544
  };
32545
32545
 
32546
32546
  // lib/pod/urls.mjs
32547
- function apUrls(remotePod, root, { publicBase = null } = {}) {
32548
- if (!root) throw new Error("apUrls: a container root is required \u2014 the caller states it, this library does not guess");
32549
- const base = remotePod.endsWith("/") ? remotePod : remotePod + "/";
32550
- const home = base + (root.endsWith("/") ? root : root + "/");
32551
- const face = publicBase ? publicBase.endsWith("/") ? publicBase : publicBase + "/" : home;
32552
- const urls = {
32553
- base,
32554
- home,
32555
- webfinger: base + ".well-known/webfinger",
32556
- actor: face + "ap/actor",
32557
- inbox: face + "ap/inbox/",
32558
- outbox: face + "ap/outbox",
32559
- followers: face + "ap/followers",
32560
- following: face + "ap/following",
32561
- notes: face + "ap/notes/",
32562
- privateNotes: face + "ap/private/",
32563
- featured: face + "ap/featured",
32564
- // FEP-1b12: the moderator roster a recipient validates announced
32565
- // moderation against. Published only when moderators are configured.
32566
- moderators: face + "ap/moderators",
32567
- // FEP-4ccd and FEP-c648: follows in limbo and the block list, as
32568
- // collections. They live in the private container so the owner-only ACL
32569
- // is inherited, not re-stated per document.
32570
- pendingFollowers: face + "ap/private/pending-followers",
32571
- pendingFollowing: face + "ap/private/pending-following",
32572
- blocked: face + "ap/private/blocked",
32573
- // The outbox as its owner reads it (every message, §5.1) and what the
32574
- // owner has liked (§5.5): the owner's alone, so they sit here too — and
32575
- // at the pod's own address even for a fronted identity, because the owner
32576
- // reads them there, with a credential the pod checks.
32577
- ownOutbox: home + "ap/private/outbox",
32578
- liked: home + "ap/private/liked",
32579
- // The inbox as its owner reads it (§5.2): what the account received,
32580
- // kept by the drain as a paged collection beside the archive.
32581
- ownInbox: home + "ap/private/inbox",
32582
- profileHtml: face + "ap/profile.html",
32583
- // Media stays on the pod even when fronted: attachment urls are not
32584
- // identity-checked by remotes, and proxying blobs would be pure cost.
32585
- media: home + "ap/media/",
32586
- state: home + "ap-state/"
32587
- };
32588
- if (publicBase) {
32589
- urls.podHome = home;
32590
- urls.publicHome = face;
32591
- urls.toPod = (u) => typeof u === "string" && u.startsWith(face) ? home + u.slice(face.length) : u;
32592
- urls.toPublic = (u) => typeof u === "string" && u.startsWith(home) ? face + u.slice(home.length) : u;
32593
- }
32594
- return urls;
32595
- }
32596
32547
  function podBaseOfWebId(webId) {
32597
32548
  const u = new URL(webId);
32598
32549
  u.hash = "";
@@ -33727,7 +33678,7 @@ async function moveIn(answers, { session, onStep = () => {
33727
33678
  return { config, address: `@${handle}@${new URL(origin).host}`, movedFrom: config.movedFrom };
33728
33679
  }
33729
33680
 
33730
- // packages/fedipod-bb/src/setup.mjs
33681
+ // node_modules/fedipod-bb/src/setup.mjs
33731
33682
  var setup_exports = {};
33732
33683
  __export(setup_exports, {
33733
33684
  ROOT: () => ROOT,
@@ -33740,7 +33691,7 @@ __export(setup_exports, {
33740
33691
  writeForumConfig: () => writeForumConfig
33741
33692
  });
33742
33693
 
33743
- // lib/pod/containers.mjs
33694
+ // node_modules/fedipod/lib/pod/containers.mjs
33744
33695
  var KEEP = { keep: true };
33745
33696
  var KEEP_CT = "application/json";
33746
33697
  var keepUrl = (base) => `${base}.keep`;
@@ -33986,7 +33937,58 @@ var node_crypto_default = {
33986
33937
  scryptSync
33987
33938
  };
33988
33939
 
33989
- // packages/fedipod-bb/src/urls.mjs
33940
+ // node_modules/fedipod/lib/pod/urls.mjs
33941
+ function apUrls2(remotePod, root, { publicBase = null } = {}) {
33942
+ if (!root) throw new Error("apUrls: a container root is required \u2014 the caller states it, this library does not guess");
33943
+ const base = remotePod.endsWith("/") ? remotePod : remotePod + "/";
33944
+ const home = base + (root.endsWith("/") ? root : root + "/");
33945
+ const face = publicBase ? publicBase.endsWith("/") ? publicBase : publicBase + "/" : home;
33946
+ const urls = {
33947
+ base,
33948
+ home,
33949
+ webfinger: base + ".well-known/webfinger",
33950
+ actor: face + "ap/actor",
33951
+ inbox: face + "ap/inbox/",
33952
+ outbox: face + "ap/outbox",
33953
+ followers: face + "ap/followers",
33954
+ following: face + "ap/following",
33955
+ notes: face + "ap/notes/",
33956
+ privateNotes: face + "ap/private/",
33957
+ featured: face + "ap/featured",
33958
+ // FEP-1b12: the moderator roster a recipient validates announced
33959
+ // moderation against. Published only when moderators are configured.
33960
+ moderators: face + "ap/moderators",
33961
+ // FEP-4ccd and FEP-c648: follows in limbo and the block list, as
33962
+ // collections. They live in the private container so the owner-only ACL
33963
+ // is inherited, not re-stated per document.
33964
+ pendingFollowers: face + "ap/private/pending-followers",
33965
+ pendingFollowing: face + "ap/private/pending-following",
33966
+ blocked: face + "ap/private/blocked",
33967
+ // The outbox as its owner reads it (every message, §5.1) and what the
33968
+ // owner has liked (§5.5): the owner's alone, so they sit here too — and
33969
+ // at the pod's own address even for a fronted identity, because the owner
33970
+ // reads them there, with a credential the pod checks.
33971
+ ownOutbox: home + "ap/private/outbox",
33972
+ liked: home + "ap/private/liked",
33973
+ // The inbox as its owner reads it (§5.2): what the account received,
33974
+ // kept by the drain as a paged collection beside the archive.
33975
+ ownInbox: home + "ap/private/inbox",
33976
+ profileHtml: face + "ap/profile.html",
33977
+ // Media stays on the pod even when fronted: attachment urls are not
33978
+ // identity-checked by remotes, and proxying blobs would be pure cost.
33979
+ media: home + "ap/media/",
33980
+ state: home + "ap-state/"
33981
+ };
33982
+ if (publicBase) {
33983
+ urls.podHome = home;
33984
+ urls.publicHome = face;
33985
+ urls.toPod = (u) => typeof u === "string" && u.startsWith(face) ? home + u.slice(face.length) : u;
33986
+ urls.toPublic = (u) => typeof u === "string" && u.startsWith(home) ? face + u.slice(home.length) : u;
33987
+ }
33988
+ return urls;
33989
+ }
33990
+
33991
+ // node_modules/fedipod-bb/src/urls.mjs
33990
33992
  var ROOT = "fedipod-bb/";
33991
33993
  var SLUG = /^[a-z0-9][a-z0-9-]{0,62}$/u;
33992
33994
  var isSlug = (s) => typeof s === "string" && SLUG.test(s);
@@ -33996,7 +33998,7 @@ var cacheKey = (postId) => node_crypto_default.createHash("sha256").update(Strin
33996
33998
  function forumUrls(remotePod, root = ROOT, { publicBase = null, front = null, handle = null } = {}) {
33997
33999
  const origin = front ? String(front).replace(/\/$/u, "") : null;
33998
34000
  if (origin && !handle) throw new Error("forumUrls: a fronted forum needs its handle");
33999
- const site = apUrls(remotePod, root, { publicBase: publicBase || (origin ? `${origin}/u/${handle}/` : null) });
34001
+ const site = apUrls2(remotePod, root, { publicBase: publicBase || (origin ? `${origin}/u/${handle}/` : null) });
34000
34002
  const face = site.actor.slice(0, -"ap/actor".length);
34001
34003
  site.front = origin;
34002
34004
  site.categories = face + "ap/categories";
@@ -34015,7 +34017,7 @@ function forumUrls(remotePod, root = ROOT, { publicBase = null, front = null, ha
34015
34017
  return site;
34016
34018
  }
34017
34019
  function categoryUrls(remotePod, root, { publicBase = null, forumInbox = null } = {}) {
34018
- const urls = apUrls(remotePod, root, { publicBase });
34020
+ const urls = apUrls2(remotePod, root, { publicBase });
34019
34021
  const face = urls.actor.slice(0, -"ap/actor".length);
34020
34022
  urls.forumInbox = forumInbox || urls.inbox;
34021
34023
  urls.topics = face + "ap/topics";
@@ -34034,7 +34036,7 @@ function categoryUrls(remotePod, root, { publicBase = null, forumInbox = null }
34034
34036
  return urls;
34035
34037
  }
34036
34038
 
34037
- // packages/fedipod-bb/src/provision.mjs
34039
+ // node_modules/fedipod-bb/src/provision.mjs
34038
34040
  async function provisionForum(remote, site, { moderatorWebIds = [] } = {}) {
34039
34041
  await provisionPrivate(remote, site);
34040
34042
  await provisionPublic(remote, site.notes);
@@ -34054,7 +34056,7 @@ async function provisionCategory(remote, cat, { memberWebIds = null } = {}) {
34054
34056
  }
34055
34057
  }
34056
34058
 
34057
- // packages/fedipod-bb/src/setup.mjs
34059
+ // node_modules/fedipod-bb/src/setup.mjs
34058
34060
  function forumConfig(existing = {}, {
34059
34061
  remotePod,
34060
34062
  root = ROOT,
@@ -34390,7 +34392,7 @@ async function readIssuer(actorUrl, fetchImpl = fetch) {
34390
34392
  }
34391
34393
  }
34392
34394
 
34393
- // lib/session/oidc-session.mjs
34395
+ // node_modules/fediverse-session/oidc-session.mjs
34394
34396
  var STORE = "session";
34395
34397
  var b64u = (buf) => btoa(String.fromCharCode(...new Uint8Array(buf))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
34396
34398
  var enc = (o) => b64u(new TextEncoder().encode(JSON.stringify(o)));