entexto-cli 2.1.0 → 2.1.2

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.
@@ -139,9 +139,13 @@ module.exports = async function tunnel(opts) {
139
139
  const statusColor = status < 300 ? chalk.green(status) : status < 400 ? chalk.cyan(status) : chalk.red(status);
140
140
  process.stdout.write(statusColor + ' ');
141
141
 
142
+ // SSE / event-stream y chunked (transfer-encoding) siempre van streaming real
143
+ const isSSE = /event-stream/i.test(ct);
144
+ const isChunked = /chunked/i.test(localRes.headers['transfer-encoding'] || '');
142
145
  // Para responses de texto pequeños, acumular para poder reescribir URLs
143
- // Para binarios o responses grandes, hacer streaming directo
144
- const isSmallText = isText && (!localRes.headers['content-length'] || parseInt(localRes.headers['content-length']) < 5 * 1024 * 1024);
146
+ // Para binarios, SSE, chunked o responses grandes, hacer streaming directo
147
+ const isSmallText = isText && !isSSE && !isChunked &&
148
+ localRes.headers['content-length'] && parseInt(localRes.headers['content-length']) < 5 * 1024 * 1024;
145
149
 
146
150
  if (isSmallText) {
147
151
  // Acumular texto para URL rewriting, luego enviar en un solo stream
@@ -226,7 +230,8 @@ module.exports = async function tunnel(opts) {
226
230
  }
227
231
  });
228
232
 
229
- localReq.setTimeout(useStreaming ? 120000 : 25000, () => {
233
+ // 10 min para streaming (modelos que piensan mucho), 25s clásico
234
+ localReq.setTimeout(useStreaming ? 600000 : 25000, () => {
230
235
  localReq.destroy();
231
236
  console.log(chalk.red('TIMEOUT'));
232
237
  if (useStreaming) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "entexto-cli",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "CLI oficial de Entexto — Crea, deploya y gestiona proyectos, dominios, APIs y Live SDK desde tu terminal",
5
5
  "main": "lib/index.js",
6
6
  "bin": {