@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.
- package/attach.cjs +7 -3
- package/dist/attach.cjs +7 -3
- package/dist/generated/pack-facts.json +44 -3660
- package/dist/pack-facts.cjs +4 -4
- package/dist/src/browser.d.ts +4 -0
- package/dist/src/browser.js +10 -0
- package/dist/src/checkout.d.ts +4 -0
- package/dist/src/checkout.js +13 -0
- package/dist/src/derived-core.d.ts +45 -5
- package/dist/src/derived-core.js +53 -8
- package/dist/src/derived-real.js +144 -2
- package/dist/src/derived.d.ts +1 -1
- package/dist/src/executor.d.ts +2 -2
- package/dist/src/executor.js +13 -0
- package/dist/src/git/index.d.ts +1 -0
- package/dist/src/git/index.js +1 -0
- package/dist/src/git/smart-http-client.d.ts +28 -0
- package/dist/src/git/smart-http-client.js +95 -0
- package/dist/src/git/smart-http.d.ts +3 -0
- package/dist/src/git/smart-http.js +9 -0
- package/dist/src/head.d.ts +16 -1
- package/dist/src/head.js +52 -7
- package/dist/src/html.d.ts +29 -0
- package/dist/src/html.js +64 -0
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.js +3 -0
- package/dist/src/pack-fetch.js +41 -2
- package/dist/src/pack-paths.d.ts +2 -3
- package/dist/src/pack-paths.js +3 -13
- package/dist/src/packRegistry.d.ts +17 -1
- package/dist/src/runtime.d.ts +2 -0
- package/dist/src/runtime.js +3 -0
- package/dist/src/serve-http.d.ts +1 -1
- package/dist/src/serve-http.js +11 -2
- package/dist/src/smtp-server.d.ts +78 -0
- package/dist/src/smtp-server.js +160 -0
- package/dist/src/smtp.d.ts +29 -11
- package/dist/src/smtp.js +221 -52
- package/generated/pack-facts.json +44 -3660
- package/pack-facts.cjs +4 -4
- package/package.json +8 -2
- package/src/browser.ts +10 -0
- package/src/checkout.ts +12 -0
- package/src/derived-core.ts +68 -12
- package/src/derived-real.ts +121 -2
- package/src/derived.ts +2 -2
- package/src/executor.ts +13 -2
- package/src/git/index.ts +1 -0
- package/src/git/smart-http-client.ts +99 -0
- package/src/git/smart-http.ts +7 -0
- package/src/head.ts +37 -6
- package/src/html.ts +72 -0
- package/src/index.ts +4 -1
- package/src/pack-fetch.ts +35 -2
- package/src/pack-paths.ts +3 -11
- package/src/packRegistry.ts +9 -1
- package/src/runtime.ts +3 -0
- package/src/serve-http.ts +11 -3
- package/src/smtp-server.ts +166 -0
- 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`);
|