@volter/world-runtime 3.0.153 → 3.0.155
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/init.js +7 -1
- package/package.json +2 -2
- package/src/init.ts +7 -1
package/dist/src/init.js
CHANGED
|
@@ -847,7 +847,7 @@ export function planWorldInit(name, repoPath, options = {}) {
|
|
|
847
847
|
}
|
|
848
848
|
}
|
|
849
849
|
// A twinned vendor's credential the app's code reads that no example env declares (a script, an app whose keys come
|
|
850
|
-
// from a secrets manager): the SDK refuses to start without it, so it is faked as a declared one would be. Only a
|
|
850
|
+
// from a secrets manager): the SDK refuses to start without it, so it is issued or faked as a declared one would be. Only a
|
|
851
851
|
// credential: a base-URL override the code reads (`OPENAI_BASE_URL`) is optional there, and a fake one would send
|
|
852
852
|
// the SDK nowhere instead of through the injector; and never a framework's public name (`NEXT_PUBLIC_…`), whose
|
|
853
853
|
// value the app's own env files hold for the browser, which a set variable would override
|
|
@@ -856,6 +856,12 @@ export function planWorldInit(name, repoPath, options = {}) {
|
|
|
856
856
|
continue;
|
|
857
857
|
if (/(?:^|_)(?:URL|URI|ENDPOINT|HOST|BASE|ORIGIN|DOMAIN|REGION|PORT)$/.test(name) || /^(?:NEXT_PUBLIC_|VITE_|REACT_APP_|EXPO_PUBLIC_|NUXT_PUBLIC_|PUBLIC_)/.test(name))
|
|
858
858
|
continue;
|
|
859
|
+
const issuer = issuedBy.get(name);
|
|
860
|
+
if (issuer !== undefined) {
|
|
861
|
+
env[name] = `${ISSUE_ENV_PREFIX}${issuer}`;
|
|
862
|
+
envRows.push({ name, disposition: 'issued', source: readAt[0] ?? 'source', reason: `${issuer} credential read by the app's code; up asks the selected twin to issue it` });
|
|
863
|
+
continue;
|
|
864
|
+
}
|
|
859
865
|
const vendor = envNameVendor(name);
|
|
860
866
|
if (vendor === null || !vendors.some((entry) => entry.vendor === vendor && entry.service !== null))
|
|
861
867
|
continue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/world-runtime",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.155",
|
|
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",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"@volter/world-core": "3.0.147",
|
|
74
|
-
"@volter/world-console": "3.0.
|
|
74
|
+
"@volter/world-console": "3.0.148"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@electric-sql/pglite": "0.5.8",
|
package/src/init.ts
CHANGED
|
@@ -1039,13 +1039,19 @@ export function planWorldInit(name: string, repoPath: string, options: InitOptio
|
|
|
1039
1039
|
}
|
|
1040
1040
|
}
|
|
1041
1041
|
// A twinned vendor's credential the app's code reads that no example env declares (a script, an app whose keys come
|
|
1042
|
-
// from a secrets manager): the SDK refuses to start without it, so it is faked as a declared one would be. Only a
|
|
1042
|
+
// from a secrets manager): the SDK refuses to start without it, so it is issued or faked as a declared one would be. Only a
|
|
1043
1043
|
// credential: a base-URL override the code reads (`OPENAI_BASE_URL`) is optional there, and a fake one would send
|
|
1044
1044
|
// the SDK nowhere instead of through the injector; and never a framework's public name (`NEXT_PUBLIC_…`), whose
|
|
1045
1045
|
// value the app's own env files hold for the browser, which a set variable would override
|
|
1046
1046
|
for (const [name, readAt] of [...envReads.entries()].sort(([a], [b]) => a.localeCompare(b))) {
|
|
1047
1047
|
if (name in env || envRows.some((row) => row.name === name) || /_TWIN_URL$/.test(name) || /^VOLTER_/.test(name) || worldInjected.has(name)) continue;
|
|
1048
1048
|
if (/(?:^|_)(?:URL|URI|ENDPOINT|HOST|BASE|ORIGIN|DOMAIN|REGION|PORT)$/.test(name) || /^(?:NEXT_PUBLIC_|VITE_|REACT_APP_|EXPO_PUBLIC_|NUXT_PUBLIC_|PUBLIC_)/.test(name)) continue;
|
|
1049
|
+
const issuer = issuedBy.get(name);
|
|
1050
|
+
if (issuer !== undefined) {
|
|
1051
|
+
env[name] = `${ISSUE_ENV_PREFIX}${issuer}`;
|
|
1052
|
+
envRows.push({ name, disposition: 'issued', source: readAt[0] ?? 'source', reason: `${issuer} credential read by the app's code; up asks the selected twin to issue it` });
|
|
1053
|
+
continue;
|
|
1054
|
+
}
|
|
1049
1055
|
const vendor = envNameVendor(name);
|
|
1050
1056
|
if (vendor === null || !vendors.some((entry) => entry.vendor === vendor && entry.service !== null)) continue;
|
|
1051
1057
|
env[name] = fakeEnvValue(name);
|