@volter/world-runtime 3.0.70 → 3.0.71
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/runtime.js +15 -0
- package/package.json +4 -4
- package/src/runtime.ts +13 -0
package/dist/src/runtime.js
CHANGED
|
@@ -1713,6 +1713,21 @@ async function issueCredentials(service, started, env, pending, unissued) {
|
|
|
1713
1713
|
env[name] = isDirectory ? ownedPath(custody, artifact) : files[0].path;
|
|
1714
1714
|
continue;
|
|
1715
1715
|
}
|
|
1716
|
+
// `side:<side>:<field>`: a URL the twin issues for one of its side ports (a native wire beside its HTTP API, the
|
|
1717
|
+
// PlanetScale twin's MySQL), its authority the side's listener as this boot placed it
|
|
1718
|
+
if (spec.startsWith('side:')) {
|
|
1719
|
+
const [, side, field] = spec.split(':');
|
|
1720
|
+
const value = answer[field ?? ''];
|
|
1721
|
+
if (typeof value !== 'string')
|
|
1722
|
+
throw new Error(`answered no ${field}`);
|
|
1723
|
+
const at = side ? started.sides?.[side]?.url : undefined;
|
|
1724
|
+
if (!at)
|
|
1725
|
+
throw new Error(`it serves no ${side} side port`);
|
|
1726
|
+
const issued = new URL(value);
|
|
1727
|
+
issued.host = new URL(at).host;
|
|
1728
|
+
env[name] = issued.toString();
|
|
1729
|
+
continue;
|
|
1730
|
+
}
|
|
1716
1731
|
const field = spec;
|
|
1717
1732
|
const value = answer[field];
|
|
1718
1733
|
if (typeof value !== 'string')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/world-runtime",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.71",
|
|
4
4
|
"description": "World configs for twins: boot named local runtimes, allocate ports, generate world.env/instance.json, and run apps against fake-key twin worlds.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"twin",
|
|
@@ -69,14 +69,14 @@
|
|
|
69
69
|
"node": ">=22.3"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"@volter/world-core": "3.0.
|
|
73
|
-
"@volter/world-console": "3.0.
|
|
72
|
+
"@volter/world-core": "3.0.71",
|
|
73
|
+
"@volter/world-console": "3.0.66"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@electric-sql/pglite": "0.5.8",
|
|
77
77
|
"@electric-sql/pglite-pgvector": "0.0.9",
|
|
78
78
|
"@volter/world-access": "3.0.1",
|
|
79
|
-
"@volter/world-core": "3.0.
|
|
79
|
+
"@volter/world-core": "3.0.71",
|
|
80
80
|
"mongodb": "~6.20.0",
|
|
81
81
|
"pg-gateway": "0.3.0-beta.4",
|
|
82
82
|
"smol-toml": "^1.8.0",
|
package/src/runtime.ts
CHANGED
|
@@ -1657,6 +1657,19 @@ async function issueCredentials(service: WorldServiceConfig, started: WorldServi
|
|
|
1657
1657
|
env[name] = isDirectory ? ownedPath(custody, artifact) : files[0]!.path;
|
|
1658
1658
|
continue;
|
|
1659
1659
|
}
|
|
1660
|
+
// `side:<side>:<field>`: a URL the twin issues for one of its side ports (a native wire beside its HTTP API, the
|
|
1661
|
+
// PlanetScale twin's MySQL), its authority the side's listener as this boot placed it
|
|
1662
|
+
if (spec.startsWith('side:')) {
|
|
1663
|
+
const [, side, field] = spec.split(':');
|
|
1664
|
+
const value = answer[field ?? ''];
|
|
1665
|
+
if (typeof value !== 'string') throw new Error(`answered no ${field}`);
|
|
1666
|
+
const at = side ? started.sides?.[side]?.url : undefined;
|
|
1667
|
+
if (!at) throw new Error(`it serves no ${side} side port`);
|
|
1668
|
+
const issued = new URL(value);
|
|
1669
|
+
issued.host = new URL(at).host;
|
|
1670
|
+
env[name] = issued.toString();
|
|
1671
|
+
continue;
|
|
1672
|
+
}
|
|
1660
1673
|
const field = spec;
|
|
1661
1674
|
const value = answer[field];
|
|
1662
1675
|
if (typeof value !== 'string') throw new Error(`answered no ${field}`);
|