@volter/world-host 3.0.17 → 3.0.19
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/dist/src/twins-host.js +2 -2
- package/package.json +5 -5
- package/src/twins-host.ts +2 -2
package/dist/src/twins-host.js
CHANGED
|
@@ -114,7 +114,7 @@ export async function createWorldHost(options) {
|
|
|
114
114
|
? (served) => { const label = worldOriginLabel(served); return label ? `${advertised?.protocol ?? 'https:'}//${label}.${originBase}${advertised?.port ? `:${advertised.port}` : ''}` : null; }
|
|
115
115
|
: (served) => (port ? localWorldOrigin(served, port) : null);
|
|
116
116
|
// sites are routed only at this machine's loopback origins (the front's siteOfHost)
|
|
117
|
-
const
|
|
117
|
+
const sitesTemplate = origins && !originBase ? (served) => { const o = port ? localWorldOrigin(served, port) : null; return o ? `http://{host}.${new URL(o).host}` : null; } : undefined;
|
|
118
118
|
// each World's content plane beside its origin (`<world>--<org>--pages`): its twins' pages, apart from its doors
|
|
119
119
|
const pagesOrigin = !origins ? undefined : originBase
|
|
120
120
|
? (served) => pagesOriginOf(served, advertised?.protocol ?? 'https:', originBase, advertised?.port || undefined)
|
|
@@ -132,7 +132,7 @@ export async function createWorldHost(options) {
|
|
|
132
132
|
const branches = new LocalBranches({ dir, origin: () => loopback, worlds: byServed, mount: (root) => mount({ name: '', root }), ...(options.announce ? { announce: options.announce } : {}) });
|
|
133
133
|
const mount = async (w) => {
|
|
134
134
|
const config = loadWorldConfig(join(w.root, '.volter', 'world.json'), w.root).config;
|
|
135
|
-
return mountWorld(config.id, { root: w.root, branches: (served) => branches.doorsFor(served), ...(browserOrigin ? { browserOrigin } : {}), ...(
|
|
135
|
+
return mountWorld(config.id, { root: w.root, branches: (served) => branches.doorsFor(served), ...(browserOrigin ? { browserOrigin } : {}), ...(sitesTemplate ? { sitesTemplate } : {}), ...(pagesOrigin ? { pagesOrigin } : {}), ...(passIssuers.length ? { passIssuers } : {}) });
|
|
136
136
|
};
|
|
137
137
|
// a branch beside its parent takes the parent's twin versions before it mounts (followParentPins), parents first: a
|
|
138
138
|
// branch of a branch follows its parent only once that parent has followed its own
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/world-host",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.19",
|
|
4
4
|
"description": "The hosted remote: worlds under one URL, each holding the canonical history of a real vendor account and its sealed credential — what a local world clones from and pushes to.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"twin",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@volter/world-access": "3.0.1",
|
|
30
|
-
"@volter/world-core": "3.0.
|
|
31
|
-
"@volter/world-runtime": "3.0.
|
|
30
|
+
"@volter/world-core": "3.0.19",
|
|
31
|
+
"@volter/world-runtime": "3.0.19"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@volter/world-console": "3.0.
|
|
34
|
+
"@volter/world-console": "3.0.14"
|
|
35
35
|
},
|
|
36
36
|
"peerDependenciesMeta": {
|
|
37
37
|
"@volter/world-console": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@volter/world-console": "3.0.
|
|
42
|
+
"@volter/world-console": "3.0.14"
|
|
43
43
|
},
|
|
44
44
|
"exports": {
|
|
45
45
|
".": {
|
package/src/twins-host.ts
CHANGED
|
@@ -123,7 +123,7 @@ export async function createWorldHost(options: WorldHostOptions): Promise<WorldH
|
|
|
123
123
|
? (served: string) => { const label = worldOriginLabel(served); return label ? `${advertised?.protocol ?? 'https:'}//${label}.${originBase}${advertised?.port ? `:${advertised.port}` : ''}` : null; }
|
|
124
124
|
: (served: string) => (port ? localWorldOrigin(served, port) : null);
|
|
125
125
|
// sites are routed only at this machine's loopback origins (the front's siteOfHost)
|
|
126
|
-
const
|
|
126
|
+
const sitesTemplate = origins && !originBase ? (served: string) => { const o = port ? localWorldOrigin(served, port) : null; return o ? `http://{host}.${new URL(o).host}` : null; } : undefined;
|
|
127
127
|
// each World's content plane beside its origin (`<world>--<org>--pages`): its twins' pages, apart from its doors
|
|
128
128
|
const pagesOrigin = !origins ? undefined : originBase
|
|
129
129
|
? (served: string) => pagesOriginOf(served, advertised?.protocol ?? 'https:', originBase, advertised?.port || undefined)
|
|
@@ -140,7 +140,7 @@ export async function createWorldHost(options: WorldHostOptions): Promise<WorldH
|
|
|
140
140
|
const branches: LocalBranches = new LocalBranches({ dir, origin: () => loopback, worlds: byServed, mount: (root) => mount({ name: '', root }), ...(options.announce ? { announce: options.announce } : {}) });
|
|
141
141
|
const mount = async (w: { name: string; root: string }): Promise<MountedWorld> => {
|
|
142
142
|
const config = loadWorldConfig(join(w.root, '.volter', 'world.json'), w.root).config;
|
|
143
|
-
return mountWorld(config.id, { root: w.root, branches: (served) => branches.doorsFor(served), ...(browserOrigin ? { browserOrigin } : {}), ...(
|
|
143
|
+
return mountWorld(config.id, { root: w.root, branches: (served) => branches.doorsFor(served), ...(browserOrigin ? { browserOrigin } : {}), ...(sitesTemplate ? { sitesTemplate } : {}), ...(pagesOrigin ? { pagesOrigin } : {}), ...(passIssuers.length ? { passIssuers } : {}) });
|
|
144
144
|
};
|
|
145
145
|
// a branch beside its parent takes the parent's twin versions before it mounts (followParentPins), parents first: a
|
|
146
146
|
// branch of a branch follows its parent only once that parent has followed its own
|