@volter/world-runtime 3.0.119 → 3.0.121

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.
@@ -124,13 +124,16 @@ function envStemVendor(name, suffix) {
124
124
  const stem = envVendorStem(name, suffix);
125
125
  if (stem === null)
126
126
  return undefined;
127
- if (ENV_STEM_VENDORS[stem])
127
+ // A vendor name cannot turn an HTTP REST endpoint into a native TCP interface.
128
+ const matchesWire = (vendor) => vendor !== undefined
129
+ && !(/_REST_(?:URL|TOKEN)$/i.test(name) && packFacts()[vendor]?.transport === 'raw-tcp');
130
+ if (matchesWire(ENV_STEM_VENDORS[stem]))
128
131
  return ENV_STEM_VENDORS[stem];
129
132
  const words = name.replace(ENV_FRAMEWORK_PREFIX, '').split('_');
130
133
  // a declared stem of more than one word: a one-word stem (X's `X`) would claim every name it begins
131
134
  for (let k = words.length - 1; k >= 2; k--) {
132
135
  const vendor = ENV_STEM_VENDORS[normalizeId(words.slice(0, k).join('_'))];
133
- if (vendor)
136
+ if (matchesWire(vendor))
134
137
  return vendor;
135
138
  }
136
139
  return undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/world-runtime",
3
- "version": "3.0.119",
3
+ "version": "3.0.121",
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",
@@ -70,14 +70,14 @@
70
70
  "node": ">=22.3"
71
71
  },
72
72
  "peerDependencies": {
73
- "@volter/world-core": "3.0.119",
74
- "@volter/world-console": "3.0.114"
73
+ "@volter/world-core": "3.0.121",
74
+ "@volter/world-console": "3.0.116"
75
75
  },
76
76
  "dependencies": {
77
77
  "@electric-sql/pglite": "0.5.8",
78
78
  "@electric-sql/pglite-pgvector": "0.0.9",
79
79
  "@volter/world-access": "3.0.1",
80
- "@volter/world-core": "3.0.119",
80
+ "@volter/world-core": "3.0.121",
81
81
  "mongodb": "~6.20.0",
82
82
  "pg-gateway": "0.3.0-beta.4",
83
83
  "smol-toml": "^1.8.0",
package/src/covers.ts CHANGED
@@ -172,12 +172,15 @@ function envVendorStem(name: string, suffix: RegExp): string | null {
172
172
  function envStemVendor(name: string, suffix: RegExp): string | undefined {
173
173
  const stem = envVendorStem(name, suffix);
174
174
  if (stem === null) return undefined;
175
- if (ENV_STEM_VENDORS[stem]) return ENV_STEM_VENDORS[stem];
175
+ // A vendor name cannot turn an HTTP REST endpoint into a native TCP interface.
176
+ const matchesWire = (vendor: string | undefined) => vendor !== undefined
177
+ && !(/_REST_(?:URL|TOKEN)$/i.test(name) && packFacts()[vendor]?.transport === 'raw-tcp');
178
+ if (matchesWire(ENV_STEM_VENDORS[stem])) return ENV_STEM_VENDORS[stem];
176
179
  const words = name.replace(ENV_FRAMEWORK_PREFIX, '').split('_');
177
180
  // a declared stem of more than one word: a one-word stem (X's `X`) would claim every name it begins
178
181
  for (let k = words.length - 1; k >= 2; k--) {
179
182
  const vendor = ENV_STEM_VENDORS[normalizeId(words.slice(0, k).join('_'))];
180
- if (vendor) return vendor;
183
+ if (matchesWire(vendor)) return vendor;
181
184
  }
182
185
  return undefined;
183
186
  }