vite-plugin-opencode-assistant 1.1.12 → 1.1.13

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.
@@ -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,
@@ -722,6 +722,13 @@ function startProxyServer(targetUrl, port, options = {}) {
722
722
  return new Promise((resolve, reject) => {
723
723
  const target = new URL(targetUrl);
724
724
  const bridgeScript = generateBridgeScript(options);
725
+ const agent = new import_http.default.Agent({
726
+ keepAlive: true,
727
+ keepAliveMsecs: 3e4,
728
+ maxSockets: 50,
729
+ maxFreeSockets: 10,
730
+ timeout: 0
731
+ });
725
732
  const server = import_http.default.createServer((req, res) => {
726
733
  if (req.url === import_shared.BRIDGE_SCRIPT_PATH) {
727
734
  const body = bridgeScript;
@@ -734,6 +741,7 @@ function startProxyServer(targetUrl, port, options = {}) {
734
741
  return;
735
742
  }
736
743
  const requestOptions = {
744
+ agent,
737
745
  hostname: target.hostname,
738
746
  port: target.port,
739
747
  path: req.url,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-opencode-assistant",
3
- "version": "1.1.12",
3
+ "version": "1.1.13",
4
4
  "description": "Embed OpenCode Web UI in your Vite dev server for real-time code modification and preview",
5
5
  "type": "module",
6
6
  "main": "lib/index.cjs",
@@ -37,15 +37,15 @@
37
37
  "dependencies": {
38
38
  "unplugin-vue-inspector": "^3.0.0",
39
39
  "execa": "^9.6.1",
40
- "@vite-plugin-opencode-assistant/components": "1.1.12",
41
- "@vite-plugin-opencode-assistant/opencode": "1.1.12",
42
- "@vite-plugin-opencode-assistant/shared": "1.1.12"
40
+ "@vite-plugin-opencode-assistant/components": "1.1.13",
41
+ "@vite-plugin-opencode-assistant/opencode": "1.1.13",
42
+ "@vite-plugin-opencode-assistant/shared": "1.1.13"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "vite": ">=5.0.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@vite-plugin-opencode-assistant/client": "1.1.12"
48
+ "@vite-plugin-opencode-assistant/client": "1.1.13"
49
49
  },
50
50
  "scripts": {
51
51
  "build": "pagoda-cli build && vite build -c vite.client.config.ts",