@volter/world-runtime 3.0.103 → 3.0.104
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/pglite-backing.js +15 -1
- package/package.json +4 -4
- package/src/pglite-backing.ts +14 -1
|
@@ -220,8 +220,22 @@ export function preparedCluster(worldConfig) {
|
|
|
220
220
|
* another password takes the same cluster and authenticates against its own. Extensions are loaded into the module
|
|
221
221
|
* at each open, never created in the cluster by the open path.
|
|
222
222
|
*/
|
|
223
|
+
/** This package's own manifest, found by its name walking up from this module: the package root from src/ in the
|
|
224
|
+
* repository and from dist/src/ in the published package alike, where a fixed `..` reached dist/package.json. */
|
|
225
|
+
function runtimeManifest() {
|
|
226
|
+
for (let dir = here();; dir = dirname(dir)) {
|
|
227
|
+
const candidate = join(dir, 'package.json');
|
|
228
|
+
if (existsSync(candidate)) {
|
|
229
|
+
const manifest = JSON.parse(readFileSync(candidate, 'utf8'));
|
|
230
|
+
if (manifest.name === '@volter/world-runtime')
|
|
231
|
+
return manifest;
|
|
232
|
+
}
|
|
233
|
+
if (dirname(dir) === dir)
|
|
234
|
+
throw new Error(`no @volter/world-runtime package.json above ${here()}`);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
223
237
|
function preparedStamp(service) {
|
|
224
|
-
const manifest =
|
|
238
|
+
const manifest = runtimeManifest();
|
|
225
239
|
const pglite = manifest.dependencies?.['@electric-sql/pglite'];
|
|
226
240
|
if (!pglite || !/^\d+\.\d+\.\d+$/.test(pglite))
|
|
227
241
|
throw new Error('world-runtime pins no exact @electric-sql/pglite version');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/world-runtime",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.104",
|
|
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.104",
|
|
73
|
+
"@volter/world-console": "3.0.99"
|
|
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.104",
|
|
80
80
|
"mongodb": "~6.20.0",
|
|
81
81
|
"pg-gateway": "0.3.0-beta.4",
|
|
82
82
|
"smol-toml": "^1.8.0",
|
package/src/pglite-backing.ts
CHANGED
|
@@ -220,8 +220,21 @@ export function preparedCluster(worldConfig: string): { directory: string; stamp
|
|
|
220
220
|
* another password takes the same cluster and authenticates against its own. Extensions are loaded into the module
|
|
221
221
|
* at each open, never created in the cluster by the open path.
|
|
222
222
|
*/
|
|
223
|
+
/** This package's own manifest, found by its name walking up from this module: the package root from src/ in the
|
|
224
|
+
* repository and from dist/src/ in the published package alike, where a fixed `..` reached dist/package.json. */
|
|
225
|
+
function runtimeManifest(): { version?: string; dependencies?: Record<string, string> } {
|
|
226
|
+
for (let dir = here(); ; dir = dirname(dir)) {
|
|
227
|
+
const candidate = join(dir, 'package.json');
|
|
228
|
+
if (existsSync(candidate)) {
|
|
229
|
+
const manifest = JSON.parse(readFileSync(candidate, 'utf8')) as { name?: string; version?: string; dependencies?: Record<string, string> };
|
|
230
|
+
if (manifest.name === '@volter/world-runtime') return manifest;
|
|
231
|
+
}
|
|
232
|
+
if (dirname(dir) === dir) throw new Error(`no @volter/world-runtime package.json above ${here()}`);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
223
236
|
function preparedStamp(service: InfraService): string {
|
|
224
|
-
const manifest =
|
|
237
|
+
const manifest = runtimeManifest();
|
|
225
238
|
const pglite = manifest.dependencies?.['@electric-sql/pglite'];
|
|
226
239
|
if (!pglite || !/^\d+\.\d+\.\d+$/.test(pglite)) throw new Error('world-runtime pins no exact @electric-sql/pglite version');
|
|
227
240
|
return `${JSON.stringify({ runtime: manifest.version ?? 'unversioned', pglite, user: service.postgres!.user, database: service.postgres!.database })}\n`;
|