fedipod 1.8.0 → 1.11.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.
- package/README.md +3 -0
- package/groups.md +1 -0
- package/lib/client/c2s.mjs +19 -5
- package/lib/client/masto/index.mjs +9 -1
- package/lib/client/masto/render.mjs +6 -4
- package/lib/client/masto/statuses.mjs +7 -4
- package/lib/client/oidc-auth.mjs +10 -3
- package/lib/core/as2.mjs +1 -1
- package/lib/core/deliver.mjs +24 -1
- package/lib/core/intake/activities.mjs +54 -0
- package/lib/core/intake/index.mjs +2 -0
- package/lib/core/intake/notes.mjs +7 -0
- package/lib/core/publisher/collections.mjs +7 -4
- package/lib/core/publisher/index.mjs +83 -36
- package/lib/core/publisher/notes.mjs +76 -11
- package/lib/core/publisher/questions.mjs +10 -7
- package/lib/core/social.mjs +3 -0
- package/lib/core/store.mjs +9 -0
- package/lib/core/wire.mjs +96 -13
- package/lib/device/admin/static.mjs +2 -2
- package/lib/device/admin/surface.mjs +11 -2
- package/lib/device/cli/commands/setup.mjs +1 -0
- package/lib/device/setup.mjs +1 -0
- package/lib/gateway/front-core.mjs +33 -5
- package/lib/gateway/httpsig.mjs +7 -3
- package/lib/server/embed.mjs +1 -0
- package/package.json +1 -1
- package/run-agent.mjs +6 -0
- package/scripts/stage-site.mjs +1 -0
- package/web/app/agent.mjs +3 -0
- package/web/app/dist/boot.js +1 -0
- package/web/app/dist/boot.js.map +2 -2
- package/web/app/dist/sw.js +375 -83
- package/web/app/dist/sw.js.map +3 -3
- package/web/app/signup.mjs +1 -0
- package/web/app/site/_redirects +1 -0
- package/web/app/site/boot.js +1 -0
- package/web/app/site/sw.js +375 -83
- package/web/front/admin.js +5 -1
package/run-agent.mjs
CHANGED
|
@@ -325,12 +325,14 @@ export class Agent {
|
|
|
325
325
|
actorId: this.urls.actor, edPrivate: keys.edPrivate,
|
|
326
326
|
proofKeyId: assertionKeyId(this.urls),
|
|
327
327
|
log: this.log, passive: this.viewer,
|
|
328
|
+
onGone: () => this.publisher.publishCollections({ followers: true }),
|
|
328
329
|
});
|
|
329
330
|
this.publisher = new Publisher({
|
|
330
331
|
config, remote: this.remote, store: this.store,
|
|
331
332
|
deliverer: this.deliverer, publicKeyPem: keys.rsaPublicPem,
|
|
332
333
|
assertionKey: keys.edPublicMultibase, log: this.log,
|
|
333
334
|
resolveMention: (h) => resolveHandle(this, h),
|
|
335
|
+
resolveActor: (u) => this.intake.fetchAP(u),
|
|
334
336
|
// Inside a pod server the client surface answers on the pod's own
|
|
335
337
|
// origin, so it can be advertised. Standalone it is on loopback, and
|
|
336
338
|
// naming it in a world-readable actor would send clients nowhere.
|
|
@@ -586,6 +588,10 @@ export class Agent {
|
|
|
586
588
|
if (repair) {
|
|
587
589
|
this.ensureActorPublished()
|
|
588
590
|
.catch(e => this.log(`actor check failed: ${e.message}`));
|
|
591
|
+
// The human page, rewritten only when what it shows has changed: one
|
|
592
|
+
// local digest compare, and a write the first time after an upgrade.
|
|
593
|
+
this.publisher.publishProfilePage()
|
|
594
|
+
.catch(e => this.log(`profile page: ${e.message}`));
|
|
589
595
|
}
|
|
590
596
|
this.seedFollowNotifications().catch(e => this.log(`notification seeding failed: ${e.message}`));
|
|
591
597
|
}
|
package/scripts/stage-site.mjs
CHANGED
|
@@ -94,6 +94,7 @@ fs.writeFileSync(path.join(site, '_redirects'), [
|
|
|
94
94
|
'/api/agent /.netlify/functions/front 200',
|
|
95
95
|
'/u/* /.netlify/functions/front 200',
|
|
96
96
|
'/.well-known/* /.netlify/functions/front 200',
|
|
97
|
+
'/@* /.netlify/functions/front 200',
|
|
97
98
|
'/install /.netlify/functions/front 200',
|
|
98
99
|
'/run /.netlify/functions/front 200',
|
|
99
100
|
'/roster /.netlify/functions/front 200',
|
package/web/app/agent.mjs
CHANGED
|
@@ -88,6 +88,7 @@ export class BrowserAgent {
|
|
|
88
88
|
// Own posts the outbox names and the timeline index lacks come back
|
|
89
89
|
// here, before anything acts on the index.
|
|
90
90
|
await this.publisher.healStatuses().catch((e) => this.log(`healing the timeline index: ${e.message}`));
|
|
91
|
+
await this.publisher.publishProfilePage().catch((e) => this.log(`profile page: ${e.message}`));
|
|
91
92
|
// And start delivering again, since demote() stopped it. startQueue() is
|
|
92
93
|
// idempotent, so a goActive() that was already active costs nothing.
|
|
93
94
|
this.deliverer?.startQueue?.();
|
|
@@ -223,6 +224,7 @@ export class BrowserAgent {
|
|
|
223
224
|
// The relay finds the account by the front's own key for it, which for a
|
|
224
225
|
// mail-door account is the full address, not the bare handle.
|
|
225
226
|
handle: doorKeyOf(config.gateway?.url) || config.handle, sessionFetch: session.fetch,
|
|
227
|
+
onGone: () => this.publisher.publishCollections({ followers: true }),
|
|
226
228
|
});
|
|
227
229
|
|
|
228
230
|
this.publisher = new Publisher({
|
|
@@ -232,6 +234,7 @@ export class BrowserAgent {
|
|
|
232
234
|
// gives its publisher. Without it no mention from the browser ever
|
|
233
235
|
// resolved: a direct message went to nobody, a mention notified no one.
|
|
234
236
|
resolveMention: (h) => resolveHandle(this, h),
|
|
237
|
+
resolveActor: (u) => this.intake.fetchAP(u),
|
|
235
238
|
});
|
|
236
239
|
|
|
237
240
|
// The Bluesky connection, stamped to this actor. The same client the Node
|
package/web/app/dist/boot.js
CHANGED
|
@@ -33444,6 +33444,7 @@ async function signUp(answers, { onStep = () => {
|
|
|
33444
33444
|
handle,
|
|
33445
33445
|
name: handle,
|
|
33446
33446
|
issuer: credential.issuerOrigin,
|
|
33447
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
33447
33448
|
...gateway ? { gateway } : {}
|
|
33448
33449
|
};
|
|
33449
33450
|
const cfgRemote = new BrowserRemotePod(session, { webId: credential.webId, role: "signup", log: () => {
|