@volter/world-core 3.0.164 → 3.0.166

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.
Files changed (60) hide show
  1. package/attach.cjs +7 -3
  2. package/dist/attach.cjs +7 -3
  3. package/dist/generated/pack-facts.json +44 -3660
  4. package/dist/pack-facts.cjs +4 -4
  5. package/dist/src/browser.d.ts +4 -0
  6. package/dist/src/browser.js +10 -0
  7. package/dist/src/checkout.d.ts +4 -0
  8. package/dist/src/checkout.js +13 -0
  9. package/dist/src/derived-core.d.ts +45 -5
  10. package/dist/src/derived-core.js +53 -8
  11. package/dist/src/derived-real.js +144 -2
  12. package/dist/src/derived.d.ts +1 -1
  13. package/dist/src/executor.d.ts +2 -2
  14. package/dist/src/executor.js +13 -0
  15. package/dist/src/git/index.d.ts +1 -0
  16. package/dist/src/git/index.js +1 -0
  17. package/dist/src/git/smart-http-client.d.ts +28 -0
  18. package/dist/src/git/smart-http-client.js +95 -0
  19. package/dist/src/git/smart-http.d.ts +3 -0
  20. package/dist/src/git/smart-http.js +9 -0
  21. package/dist/src/head.d.ts +16 -1
  22. package/dist/src/head.js +52 -7
  23. package/dist/src/html.d.ts +29 -0
  24. package/dist/src/html.js +64 -0
  25. package/dist/src/index.d.ts +3 -1
  26. package/dist/src/index.js +3 -0
  27. package/dist/src/pack-fetch.js +41 -2
  28. package/dist/src/pack-paths.d.ts +2 -3
  29. package/dist/src/pack-paths.js +3 -13
  30. package/dist/src/packRegistry.d.ts +17 -1
  31. package/dist/src/runtime.d.ts +2 -0
  32. package/dist/src/runtime.js +3 -0
  33. package/dist/src/serve-http.d.ts +1 -1
  34. package/dist/src/serve-http.js +11 -2
  35. package/dist/src/smtp-server.d.ts +78 -0
  36. package/dist/src/smtp-server.js +160 -0
  37. package/dist/src/smtp.d.ts +29 -11
  38. package/dist/src/smtp.js +221 -52
  39. package/generated/pack-facts.json +44 -3660
  40. package/pack-facts.cjs +4 -4
  41. package/package.json +8 -2
  42. package/src/browser.ts +10 -0
  43. package/src/checkout.ts +12 -0
  44. package/src/derived-core.ts +68 -12
  45. package/src/derived-real.ts +121 -2
  46. package/src/derived.ts +2 -2
  47. package/src/executor.ts +13 -2
  48. package/src/git/index.ts +1 -0
  49. package/src/git/smart-http-client.ts +99 -0
  50. package/src/git/smart-http.ts +7 -0
  51. package/src/head.ts +37 -6
  52. package/src/html.ts +72 -0
  53. package/src/index.ts +4 -1
  54. package/src/pack-fetch.ts +35 -2
  55. package/src/pack-paths.ts +3 -11
  56. package/src/packRegistry.ts +9 -1
  57. package/src/runtime.ts +3 -0
  58. package/src/serve-http.ts +11 -3
  59. package/src/smtp-server.ts +166 -0
  60. package/src/smtp.ts +199 -53
package/attach.cjs CHANGED
@@ -63,12 +63,16 @@ if (ref) {
63
63
  });
64
64
  });
65
65
  }
66
+ // what this attach sets from the manifest: a stream's transport templates replace these below (a pack's declared
67
+ // transport templates win over its primary-name HTTP URL, on every path that installs a twin's environment), and
68
+ // never a value the caller set itself
69
+ const fromManifest = new Set();
66
70
  for (const [vendor, origin] of Object.entries(manifest.vendors ?? {})) {
67
71
  const key = `${vendor.toUpperCase()}_TWIN_URL`;
68
- if (process.env[key] === undefined) process.env[key] = origin;
72
+ if (process.env[key] === undefined) { process.env[key] = origin; fromManifest.add(key); }
69
73
  }
70
74
  for (const [key, value] of Object.entries(manifest.env ?? {})) {
71
- if (process.env[key] === undefined) process.env[key] = value;
75
+ if (process.env[key] === undefined) { process.env[key] = value; fromManifest.add(key); }
72
76
  }
73
77
  // a World's byte-stream doors (a hosted World's smtp, planetscale's mysql): loopback listeners in
74
78
  // this process, bridged over WebSocket (./stream-bridge.cjs). The env names the listener now, so the
@@ -87,7 +91,7 @@ if (ref) {
87
91
  const streamToken = manifest.env?.VOLTER_TWINS_KEY ?? token ?? '';
88
92
  streams.forEach((stream, i) => {
89
93
  for (const [key, value] of Object.entries(streamEnv(stream.env, ports[i]))) {
90
- if (process.env[key] === undefined) process.env[key] = value;
94
+ if (process.env[key] === undefined || fromManifest.has(key)) process.env[key] = value;
91
95
  }
92
96
  bridgeStream(stream.url, streamToken, ports[i]).then((server) => server.unref(), (error) => {
93
97
  process.stderr.write(`[twin-attach] ${stream.url}: could not listen on 127.0.0.1:${ports[i]}: ${error.message}\n`);
package/dist/attach.cjs CHANGED
@@ -63,12 +63,16 @@ if (ref) {
63
63
  });
64
64
  });
65
65
  }
66
+ // what this attach sets from the manifest: a stream's transport templates replace these below (a pack's declared
67
+ // transport templates win over its primary-name HTTP URL, on every path that installs a twin's environment), and
68
+ // never a value the caller set itself
69
+ const fromManifest = new Set();
66
70
  for (const [vendor, origin] of Object.entries(manifest.vendors ?? {})) {
67
71
  const key = `${vendor.toUpperCase()}_TWIN_URL`;
68
- if (process.env[key] === undefined) process.env[key] = origin;
72
+ if (process.env[key] === undefined) { process.env[key] = origin; fromManifest.add(key); }
69
73
  }
70
74
  for (const [key, value] of Object.entries(manifest.env ?? {})) {
71
- if (process.env[key] === undefined) process.env[key] = value;
75
+ if (process.env[key] === undefined) { process.env[key] = value; fromManifest.add(key); }
72
76
  }
73
77
  // a World's byte-stream doors (a hosted World's smtp, planetscale's mysql): loopback listeners in
74
78
  // this process, bridged over WebSocket (./stream-bridge.cjs). The env names the listener now, so the
@@ -87,7 +91,7 @@ if (ref) {
87
91
  const streamToken = manifest.env?.VOLTER_TWINS_KEY ?? token ?? '';
88
92
  streams.forEach((stream, i) => {
89
93
  for (const [key, value] of Object.entries(streamEnv(stream.env, ports[i]))) {
90
- if (process.env[key] === undefined) process.env[key] = value;
94
+ if (process.env[key] === undefined || fromManifest.has(key)) process.env[key] = value;
91
95
  }
92
96
  bridgeStream(stream.url, streamToken, ports[i]).then((server) => server.unref(), (error) => {
93
97
  process.stderr.write(`[twin-attach] ${stream.url}: could not listen on 127.0.0.1:${ports[i]}: ${error.message}\n`);