vite-plugin-opencode-assistant 1.1.12 → 1.1.14
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/es/core/proxy-server.mjs +8 -0
- package/es/index.mjs +2 -1
- package/lib/client.js +1051 -1047
- package/lib/core/proxy-server.cjs +8 -0
- package/lib/index.cjs +2 -1
- package/package.json +5 -5
package/es/core/proxy-server.mjs
CHANGED
|
@@ -698,6 +698,13 @@ function startProxyServer(targetUrl, port, options = {}) {
|
|
|
698
698
|
return new Promise((resolve, reject) => {
|
|
699
699
|
const target = new URL(targetUrl);
|
|
700
700
|
const bridgeScript = generateBridgeScript(options);
|
|
701
|
+
const agent = new http.Agent({
|
|
702
|
+
keepAlive: true,
|
|
703
|
+
keepAliveMsecs: 3e4,
|
|
704
|
+
maxSockets: 50,
|
|
705
|
+
maxFreeSockets: 10,
|
|
706
|
+
timeout: 0
|
|
707
|
+
});
|
|
701
708
|
const server = http.createServer((req, res) => {
|
|
702
709
|
if (req.url === BRIDGE_SCRIPT_PATH) {
|
|
703
710
|
const body = bridgeScript;
|
|
@@ -710,6 +717,7 @@ function startProxyServer(targetUrl, port, options = {}) {
|
|
|
710
717
|
return;
|
|
711
718
|
}
|
|
712
719
|
const requestOptions = {
|
|
720
|
+
agent,
|
|
713
721
|
hostname: target.hostname,
|
|
714
722
|
port: target.port,
|
|
715
723
|
path: req.url,
|
package/es/index.mjs
CHANGED
|
@@ -200,7 +200,8 @@ function createOpenCodePlugin(options = {}) {
|
|
|
200
200
|
splitMode: config.splitMode,
|
|
201
201
|
serviceInstanceId,
|
|
202
202
|
webPort: actualWebPort,
|
|
203
|
-
projectRoot
|
|
203
|
+
projectRoot,
|
|
204
|
+
verbose: config.verbose
|
|
204
205
|
});
|
|
205
206
|
timer.end();
|
|
206
207
|
return html.replace("</body>", `${widget}</body>`);
|