fedipod 1.5.0 → 1.6.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 +5 -5
- package/architecture.md +4 -4
- package/cli.md +7 -0
- package/gateway.md +1 -1
- package/groups.md +1 -1
- package/gui.md +1 -1
- package/lib/core/publisher/index.mjs +1 -1
- package/lib/device/admin/routes/lifecycle.mjs +1 -1
- package/lib/device/admin/routes/setup.mjs +20 -1
- package/lib/device/cli/commands/setup.mjs +44 -20
- package/lib/device/setup.mjs +99 -25
- package/lib/pod/root.mjs +1 -1
- package/package.json +1 -1
- package/web/admin/setup/index.html +25 -2
- package/web/admin/setup/setup.js +30 -1
- package/web/app/README.md +2 -2
- package/web/app/admin-facade.mjs +1 -1
- package/web/app/agent.mjs +2 -2
- package/web/app/boot.mjs +2 -2
- package/web/app/dist/boot.js +1 -1
- package/web/app/dist/boot.js.map +2 -2
- package/web/app/dist/sw.js +3 -3
- package/web/app/dist/sw.js.map +2 -2
- package/web/app/index.html +1 -1
- package/web/app/signup.mjs +2 -2
- package/web/app/site/admin/setup/index.html +25 -2
- package/web/app/site/admin/setup/setup.js +30 -1
- package/web/app/site/boot.js +1 -1
- package/web/app/site/index.html +1 -1
- package/web/app/site/sw.js +3 -3
- package/installed-agent.md +0 -97
package/web/app/agent.mjs
CHANGED
|
@@ -160,7 +160,7 @@ export class BrowserAgent {
|
|
|
160
160
|
if (oidc) {
|
|
161
161
|
session = { fetch: (u, i) => oidc.fetch(u, i) };
|
|
162
162
|
webId = oidc.webId;
|
|
163
|
-
remotePod = podBaseOfWebId(webId); // the pod, which on a
|
|
163
|
+
remotePod = podBaseOfWebId(webId); // the pod, which on a suffix-based host is a path
|
|
164
164
|
} else {
|
|
165
165
|
const dpop = await makeDpopSession(credential);
|
|
166
166
|
session = { fetch: (u, i) => dpop.fetch(u, i) };
|
|
@@ -224,7 +224,7 @@ export class BrowserAgent {
|
|
|
224
224
|
this.publisher = new Publisher({
|
|
225
225
|
config: this.store.getConfig(), remote: this.remote, store: this.store,
|
|
226
226
|
deliverer: this.deliverer, publicKeyPem: keys.rsaPublicPem, assertionKey: null, log: this.log,
|
|
227
|
-
// Who a post names, resolved — the same lookup the
|
|
227
|
+
// Who a post names, resolved — the same lookup the DeviceAgent
|
|
228
228
|
// gives its publisher. Without it no mention from the browser ever
|
|
229
229
|
// resolved: a direct message went to nobody, a mention notified no one.
|
|
230
230
|
resolveMention: (h) => resolveHandle(this, h),
|
package/web/app/boot.mjs
CHANGED
|
@@ -70,7 +70,7 @@ window.fedipodUnlock = async (password) => {
|
|
|
70
70
|
if (!session) throw new Error('Sign in first.');
|
|
71
71
|
// The config on the pod says where this account's state lives; the key sits
|
|
72
72
|
// beside it. Both are read with the session, as the owner.
|
|
73
|
-
const podFromWebId = podBaseOfWebId(session.webId); // a
|
|
73
|
+
const podFromWebId = podBaseOfWebId(session.webId); // a suffix-based host, or its own host
|
|
74
74
|
const state = `${podFromWebId}${AP_ROOT}ap-state/`;
|
|
75
75
|
// Through the transport rather than the bare session: this is a pod read
|
|
76
76
|
// like any other, and going round it skipped the retry ladder that exists
|
|
@@ -288,7 +288,7 @@ if (typeof document !== 'undefined') (async () => {
|
|
|
288
288
|
// brought by its address, which may be its own host or a path on a shared one.
|
|
289
289
|
const podHostOf = () => { const sub = f().podName.value.trim().toLowerCase(); const ph = providerHost(); return (sub && ph) ? `${sub}.${ph}` : ''; };
|
|
290
290
|
const podUrl = () => { let v = f().pod.value.trim(); if (!v) return ''; if (!/^https?:\/\//i.test(v)) v = 'https://' + v; if (!v.endsWith('/')) v += '/'; try { return new URL(v).href; } catch { return ''; } };
|
|
291
|
-
// A pod on a
|
|
291
|
+
// A pod on a suffix-based host cannot answer WebFinger, so its address
|
|
292
292
|
// lives at this site; a pod at its own host root gets the choice.
|
|
293
293
|
const isPathPod = (u) => { try { return new URL(u).pathname !== '/'; } catch { return false; } };
|
|
294
294
|
// Where the chosen provider puts new pods, asked of the provider itself
|
package/web/app/dist/boot.js
CHANGED
|
@@ -33321,7 +33321,7 @@ async function signUp(answers, { onStep = () => {
|
|
|
33321
33321
|
const pathPod = new URL(pod).pathname !== "/";
|
|
33322
33322
|
const fronted = pathPod || wantsFront;
|
|
33323
33323
|
if (fronted && !frontOrigin) {
|
|
33324
|
-
throw new Error(`${pod} is a
|
|
33324
|
+
throw new Error(`${pod} is a suffix-based host, so its address must live at a gateway, and this page has none.`);
|
|
33325
33325
|
}
|
|
33326
33326
|
if (pathPod && !wantsFront) await assertFrontNameFree(frontOrigin, handle);
|
|
33327
33327
|
const actorUrl = actorUrlFor(pod);
|