onveloz 0.0.0-beta.43 → 0.0.0-beta.45

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.
@@ -1,6 +1,6 @@
1
1
  import { Cli, z } from "incur";
2
2
  import { createHash } from "node:crypto";
3
- import { appendFileSync, existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
3
+ import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
4
4
  import { homedir, platform } from "node:os";
5
5
  import { join } from "node:path";
6
6
  import chalk from "chalk";
@@ -1,8 +1,9 @@
1
- import { C as endGroup, D as log, E as isMcpMode, O as startGroup, k as success, n as loadConfig, r as requireAuth, w as info } from "./config-DbVqGVaI.mjs";
2
- import { i as findStrippedConfigKeys, o as parseVelozConfig, s as resolveConfigForEnv, u as suggestConfigKeyFix } from "./veloz-config-axmseFRu.mjs";
1
+ import { C as endGroup, D as log, E as isMcpMode, O as startGroup, k as success, n as loadConfig, r as requireAuth, w as info } from "./config-CPTQd4xp.mjs";
2
+ import { a as findStrippedConfigKeys, c as resolveConfigForEnv, d as suggestConfigKeyFix, s as parseVelozConfig } from "./veloz-config-DDaH3Lkl.mjs";
3
3
  import { createORPCClient } from "@orpc/client";
4
4
  import { RPCLink } from "@orpc/client/fetch";
5
5
  import { existsSync, readFileSync, writeFileSync } from "node:fs";
6
+ import { homedir } from "node:os";
6
7
  import { join, resolve } from "node:path";
7
8
  import chalk from "chalk";
8
9
  import { execSync } from "node:child_process";
@@ -200,7 +201,7 @@ function getGitBranch() {
200
201
 
201
202
  //#endregion
202
203
  //#region src/lib/client.ts
203
- const CLI_VERSION = "0.0.0-beta.43";
204
+ const CLI_VERSION = "0.0.0-beta.45";
204
205
  const USER_AGENT = `veloz-cli/${CLI_VERSION}`;
205
206
  /**
206
207
  * Client source — "cli" by default; the init wizard sets this to "cli-wizard"
@@ -317,6 +318,373 @@ const TERMINAL_STATUSES = new Set([
317
318
  "SUPERSEDED"
318
319
  ]);
319
320
 
321
+ //#endregion
322
+ //#region src/lib/ai-setup-check.ts
323
+ /**
324
+ * Check common MCP config locations for "veloz" or "onveloz" registration.
325
+ *
326
+ * Locations checked:
327
+ * - Claude Code: ~/.claude.json (mcpServers)
328
+ * - Cursor: ~/.cursor/mcp.json (mcpServers)
329
+ * - Project-level: .mcp.json (mcpServers)
330
+ * - VSCode: .vscode/mcp.json (mcpServers)
331
+ */
332
+ function isMcpRegistered() {
333
+ const home = homedir();
334
+ const cwd = process.cwd();
335
+ const configPaths = [
336
+ join(home, ".cursor", "mcp.json"),
337
+ join(cwd, ".mcp.json"),
338
+ join(cwd, ".vscode", "mcp.json")
339
+ ];
340
+ for (const configPath of configPaths) if (existsSync(configPath)) try {
341
+ const content = readFileSync(configPath, "utf-8");
342
+ if (content.includes("veloz") || content.includes("onveloz")) return true;
343
+ } catch {}
344
+ return false;
345
+ }
346
+ /**
347
+ * Check if veloz skills are installed in the project's .claude/skills/ directory.
348
+ * Skills are generated by `veloz skills add` and provide command documentation to agents.
349
+ */
350
+ function areSkillsInstalled() {
351
+ const skillsDir = join(process.cwd(), ".claude", "skills");
352
+ if (!existsSync(skillsDir)) return false;
353
+ return [
354
+ join(skillsDir, "veloz-cli.md"),
355
+ join(skillsDir, "veloz-deploy"),
356
+ join(skillsDir, "veloz-deploy.md")
357
+ ].some((p) => existsSync(p));
358
+ }
359
+ /** Detect MCP + skills installation status. */
360
+ function checkAiSetup() {
361
+ return {
362
+ mcpInstalled: isMcpRegistered(),
363
+ skillsInstalled: areSkillsInstalled()
364
+ };
365
+ }
366
+ /**
367
+ * Print a post-deploy hint if MCP or skills are not installed.
368
+ * Skips in MCP mode (agents don't need the hint) and non-TTY environments.
369
+ */
370
+ function printAiSetupHint() {
371
+ if (isMcpMode() || !process.stdout.isTTY) return;
372
+ const status = checkAiSetup();
373
+ if (status.mcpInstalled && status.skillsInstalled) return;
374
+ const hints = [];
375
+ if (!status.mcpInstalled) hints.push(`Execute ${chalk.bold("veloz mcp add")} para integrar a Veloz com seu editor (Claude Code, Cursor, etc.)`);
376
+ if (!status.skillsInstalled) hints.push(`Execute ${chalk.bold("veloz skills add")} para ensinar agentes de IA a usar a Veloz`);
377
+ if (hints.length > 0) {
378
+ console.log(chalk.dim("\n─── Dica: Integração com IA ───"));
379
+ for (const hint of hints) console.log(chalk.yellow(` → ${hint}`));
380
+ }
381
+ }
382
+
383
+ //#endregion
384
+ //#region src/lib/deploy-output-tty.ts
385
+ var TtyOutput = class {
386
+ prevLineCount = 0;
387
+ startDeploy(serviceCount) {
388
+ console.log(chalk.cyan(`\nIniciando deploy de ${serviceCount} serviço(s)...\n`));
389
+ }
390
+ uploadComplete(serviceName, sizeMB) {
391
+ console.log(`${chalk.green("✓")} ${chalk.bold(serviceName)}: Upload concluído ${chalk.dim(`(${sizeMB} MB)`)}`);
392
+ }
393
+ uploadFailed(serviceName) {
394
+ console.log(`${chalk.red("✗")} ${chalk.bold(serviceName)}: Falha ao iniciar deploy`);
395
+ }
396
+ allUploadsFailed() {
397
+ console.error(chalk.red("\n✗ Todos os deploys falharam ao iniciar."));
398
+ }
399
+ monitoringStart(_activeCount) {
400
+ console.log(chalk.cyan(`\nMonitorando progresso dos deploys:\n`));
401
+ console.log(chalk.dim("─".repeat(50)) + "\n");
402
+ }
403
+ statusUpdate(_serviceName, _status) {}
404
+ logLine(_serviceName, _line) {}
405
+ streamError(_serviceName, _error) {}
406
+ initProgress(entries) {
407
+ this.prevLineCount = this.doRenderProgress(entries, 0);
408
+ }
409
+ renderProgress(entries) {
410
+ this.prevLineCount = this.doRenderProgress(entries, this.prevLineCount);
411
+ }
412
+ doRenderProgress(progressMap, prevLineCount) {
413
+ const buf = [];
414
+ if (prevLineCount > 0) buf.push(`\x1b[${prevLineCount}A\x1b[J`);
415
+ let lineCount = 0;
416
+ for (const [, progress] of progressMap) {
417
+ const icon = statusIcons[progress.status] || chalk.gray("○");
418
+ const label = statusLabels[progress.status] || progress.status;
419
+ buf.push(`${icon} ${chalk.bold(progress.serviceName)}: ${label}\n`);
420
+ lineCount++;
421
+ if (progress.status === "BUILDING" || progress.status === "BUILD_FAILED") {
422
+ const nonEmptyLines = progress.logLines.filter((l) => l.trim());
423
+ if (nonEmptyLines.length > 0) {
424
+ const tail = nonEmptyLines.slice(-3);
425
+ for (const line of tail) {
426
+ buf.push(` ${chalk.dim(line)}\n`);
427
+ lineCount++;
428
+ }
429
+ } else if (progress.status === "BUILDING") {
430
+ buf.push(` ${chalk.dim("Aguardando logs do build...")}\n`);
431
+ lineCount++;
432
+ }
433
+ } else if (progress.status === "QUEUED") {
434
+ buf.push(` ${chalk.dim("Na fila para compilação...")}\n`);
435
+ lineCount++;
436
+ }
437
+ }
438
+ process.stdout.write(buf.join(""));
439
+ return lineCount;
440
+ }
441
+ buildStart(_serviceName) {}
442
+ buildEnd() {}
443
+ printSummary(successful, failed) {
444
+ console.log(chalk.dim("\n" + "─".repeat(50)));
445
+ if (successful.length > 0) {
446
+ console.log(chalk.green(`\n✓ ${successful.length} serviço(s) com deploy concluído:\n`));
447
+ for (const entry of successful) {
448
+ const idSuffix = entry.deploymentId ? chalk.dim(` (${entry.deploymentId})`) : "";
449
+ console.log(` ${chalk.green("✓")} ${chalk.bold(entry.serviceName)}${idSuffix}`);
450
+ for (const url of entry.urls) console.log(` ${chalk.cyan(url)}`);
451
+ }
452
+ }
453
+ if (failed.length > 0) {
454
+ console.log(chalk.red(`\n✗ ${failed.length} serviço(s) falhou(aram):\n`));
455
+ for (const entry of failed) {
456
+ const idSuffix = entry.deploymentId ? ` ${entry.deploymentId}` : "";
457
+ console.log(` ${chalk.red("✗")} ${chalk.bold(entry.serviceName)} ${chalk.dim(`(${entry.status}${idSuffix})`)}`);
458
+ if (entry.logLines.length > 0) {
459
+ console.log(chalk.red(` ${"─".repeat(50)}`));
460
+ console.log(chalk.red.bold(" Logs de build:"));
461
+ console.log(chalk.red(` ${"─".repeat(50)}`));
462
+ for (const line of entry.logLines) if (line.trim()) console.log(` ${chalk.dim(line)}`);
463
+ console.log(chalk.red(` ${"─".repeat(50)}`));
464
+ }
465
+ const hints = getFailureHints(entry.status);
466
+ for (const hint of hints) console.log(chalk.yellow(` → ${hint}`));
467
+ if (entry.deploymentId) {
468
+ console.log(chalk.yellow(` → Use 'veloz builds logs ${entry.deploymentId}' para ver os logs completos`));
469
+ console.log(chalk.yellow(` → Se o erro não vier do seu código, abra um chamado: veloz support create --subject "Deploy ${entry.deploymentId} falhou"`));
470
+ }
471
+ }
472
+ }
473
+ }
474
+ printFollowUp(_context) {
475
+ console.log(chalk.cyan("\nℹ Use 'veloz logs -f' para acompanhar os logs de execução."));
476
+ console.log(chalk.dim(" Use 'veloz builds list' para ver o histórico de builds."));
477
+ printAiSetupHint();
478
+ }
479
+ };
480
+
481
+ //#endregion
482
+ //#region src/lib/deploy-output-plain.ts
483
+ var PlainOutput = class {
484
+ startDeploy(serviceCount) {
485
+ process.stdout.write(`Iniciando deploy de ${serviceCount} serviço(s)\n`);
486
+ }
487
+ uploadComplete(serviceName, sizeMB) {
488
+ process.stdout.write(`✓ ${serviceName}: Upload concluído (${sizeMB} MB)\n`);
489
+ }
490
+ uploadFailed(serviceName) {
491
+ process.stdout.write(`✗ ${serviceName}: Falha ao iniciar deploy\n`);
492
+ }
493
+ allUploadsFailed() {
494
+ process.stdout.write("✗ Todos os deploys falharam ao iniciar.\n");
495
+ }
496
+ monitoringStart(activeCount) {
497
+ process.stdout.write(`Monitorando ${activeCount} deploy(s)\n`);
498
+ }
499
+ statusUpdate(serviceName, status) {
500
+ const label = statusLabels[status] || status;
501
+ process.stdout.write(`[${serviceName}] ${label}\n`);
502
+ }
503
+ logLine(serviceName, line) {
504
+ process.stdout.write(`[${serviceName}] ${line}\n`);
505
+ }
506
+ streamError(serviceName, error) {
507
+ process.stdout.write(`✗ Erro no streaming de logs para ${serviceName}: ${error}\n`);
508
+ }
509
+ initProgress(_entries) {}
510
+ renderProgress(_entries) {}
511
+ buildStart(_serviceName) {}
512
+ buildEnd() {}
513
+ printSummary(successful, failed) {
514
+ if (successful.length > 0) {
515
+ process.stdout.write(`\n${successful.length} serviço(s) com deploy concluído:\n`);
516
+ for (const entry of successful) {
517
+ process.stdout.write(` ✓ ${entry.serviceName}\n`);
518
+ for (const url of entry.urls) process.stdout.write(` ${url}\n`);
519
+ }
520
+ }
521
+ if (failed.length > 0) {
522
+ process.stdout.write(`\n${failed.length} serviço(s) falhou(aram):\n`);
523
+ for (const entry of failed) {
524
+ process.stdout.write(`\n ✗ ${entry.serviceName} (${entry.status})\n`);
525
+ const hints = getFailureHints(entry.status);
526
+ for (const hint of hints) process.stdout.write(` → ${hint}\n`);
527
+ if (entry.deploymentId) {
528
+ process.stdout.write(` → Use 'veloz builds logs ${entry.deploymentId}' para ver os logs completos\n`);
529
+ process.stdout.write(` → Se o erro não vier do seu código, abra um chamado: veloz support create --subject "Deploy ${entry.deploymentId} falhou"\n`);
530
+ }
531
+ }
532
+ }
533
+ }
534
+ printFollowUp(_context) {
535
+ process.stdout.write("Use 'veloz logs -f' para acompanhar os logs de execução.\n");
536
+ process.stdout.write("Use 'veloz builds list' para ver o histórico de builds.\n");
537
+ }
538
+ };
539
+
540
+ //#endregion
541
+ //#region src/lib/deploy-output-gha.ts
542
+ var GhaOutput = class {
543
+ startDeploy(serviceCount) {
544
+ process.stdout.write(`Iniciando deploy de ${serviceCount} serviço(s)\n`);
545
+ }
546
+ uploadComplete(serviceName, sizeMB) {
547
+ process.stdout.write(`✓ ${serviceName}: Upload concluído (${sizeMB} MB)\n`);
548
+ }
549
+ uploadFailed(serviceName) {
550
+ process.stdout.write(`::error::${serviceName}: Falha ao iniciar deploy\n`);
551
+ }
552
+ allUploadsFailed() {
553
+ process.stdout.write("::error::Todos os deploys falharam ao iniciar.\n");
554
+ }
555
+ monitoringStart(activeCount) {
556
+ process.stdout.write(`Monitorando ${activeCount} deploy(s)\n`);
557
+ }
558
+ statusUpdate(serviceName, status) {
559
+ const label = statusLabels[status] || status;
560
+ process.stdout.write(`[${serviceName}] ${label}\n`);
561
+ }
562
+ logLine(serviceName, line) {
563
+ process.stdout.write(`[${serviceName}] ${line}\n`);
564
+ }
565
+ streamError(serviceName, error) {
566
+ process.stdout.write(`::error::Erro no streaming de logs para ${serviceName}: ${error}\n`);
567
+ }
568
+ initProgress(_entries) {}
569
+ renderProgress(_entries) {}
570
+ buildStart(serviceName) {
571
+ startGroup(serviceName ? `Build: ${serviceName}` : "Build");
572
+ }
573
+ buildEnd() {
574
+ endGroup();
575
+ }
576
+ printSummary(successful, failed) {
577
+ if (successful.length > 0) {
578
+ process.stdout.write(`\n✓ ${successful.length} serviço(s) com deploy concluído\n`);
579
+ for (const entry of successful) {
580
+ process.stdout.write(` ✓ ${entry.serviceName}\n`);
581
+ for (const url of entry.urls) process.stdout.write(` ${url}\n`);
582
+ }
583
+ }
584
+ if (failed.length > 0) {
585
+ process.stdout.write(`\n✗ ${failed.length} serviço(s) falhou(aram)\n`);
586
+ for (const entry of failed) {
587
+ process.stdout.write(`::error::${entry.serviceName} falhou (${entry.status})\n`);
588
+ const hints = getFailureHints(entry.status);
589
+ for (const hint of hints) process.stdout.write(` ${hint}\n`);
590
+ if (entry.deploymentId) {
591
+ process.stdout.write(` Use 'veloz builds logs ${entry.deploymentId}' para ver os logs completos\n`);
592
+ process.stdout.write(` Se o erro não vier do seu código, abra um chamado: veloz support create --subject "Deploy ${entry.deploymentId} falhou"\n`);
593
+ }
594
+ }
595
+ }
596
+ }
597
+ printFollowUp(_context) {
598
+ process.stdout.write("Use 'veloz logs -f' para acompanhar os logs de execução.\n");
599
+ process.stdout.write("Use 'veloz builds list' para ver o histórico de builds.\n");
600
+ }
601
+ };
602
+
603
+ //#endregion
604
+ //#region src/lib/deploy-output-mcp.ts
605
+ var McpOutput = class {
606
+ startDeploy(serviceCount) {
607
+ log(`[deploy] Iniciando deploy de ${serviceCount} serviço(s)`);
608
+ }
609
+ uploadComplete(serviceName, sizeMB) {
610
+ log(`[deploy] ✓ ${serviceName}: Upload concluído (${sizeMB} MB)`);
611
+ }
612
+ uploadFailed(serviceName) {
613
+ log(`[deploy] ✗ ${serviceName}: Falha ao iniciar deploy`);
614
+ }
615
+ allUploadsFailed() {
616
+ throw new Error("Todos os deploys falharam ao iniciar.");
617
+ }
618
+ monitoringStart(activeCount) {
619
+ log(`[deploy] Monitorando ${activeCount} deploy(s)`);
620
+ }
621
+ statusUpdate(serviceName, status) {
622
+ log(`[deploy] [${serviceName}] ${statusLabels[status] || status}`);
623
+ }
624
+ logLine(serviceName, line) {
625
+ log(`[build] [${serviceName}] ${line}`);
626
+ }
627
+ streamError(serviceName, error) {
628
+ log(`[deploy] ✗ Erro no streaming de logs para ${serviceName}: ${error}`);
629
+ }
630
+ initProgress(_entries) {}
631
+ renderProgress(_entries) {}
632
+ buildStart(_serviceName) {}
633
+ buildEnd() {}
634
+ printSummary(successful, failed) {
635
+ if (successful.length > 0) {
636
+ log(`[deploy] ✓ ${successful.length} serviço(s) com deploy concluído`);
637
+ for (const entry of successful) {
638
+ log(`[deploy] ✓ ${entry.serviceName}`);
639
+ for (const url of entry.urls) log(`[deploy] ${url}`);
640
+ }
641
+ }
642
+ if (failed.length > 0) {
643
+ log(`[deploy] ✗ ${failed.length} serviço(s) falhou(aram)`);
644
+ for (const entry of failed) {
645
+ log(`[deploy] ✗ ${entry.serviceName} (${entry.status})`);
646
+ const hints = getFailureHints(entry.status);
647
+ for (const hint of hints) log(`[deploy] → ${hint}`);
648
+ if (entry.deploymentId) {
649
+ log(`[deploy] → Use 'veloz builds logs ${entry.deploymentId}' para ver os logs completos`);
650
+ log(`[deploy] → Se o erro não vier do seu código, abra um chamado: veloz support create --subject "Deploy ${entry.deploymentId} falhou"`);
651
+ }
652
+ }
653
+ }
654
+ }
655
+ printFollowUp(context) {
656
+ log("[deploy] Use 'veloz logs -f' para acompanhar os logs de execução.");
657
+ log("[deploy] Use 'veloz builds list' para ver o histórico de builds.");
658
+ if (context?.hasGithub) log("[deploy] Dica: este projeto tem deploys automaticos via GitHub configurados. Pushes para o branch configurado fazem deploy automaticamente — não é necessário rodar 'veloz deploy' manualmente.");
659
+ }
660
+ };
661
+
662
+ //#endregion
663
+ //#region src/lib/deploy-output.ts
664
+ function getFailureHints(status) {
665
+ switch (status) {
666
+ case "BUILD_FAILED": return [
667
+ "Verifique os logs de build acima para erros de compilação",
668
+ "Teste o build localmente: rode o comando de build do seu projeto",
669
+ "Use 'veloz builds list' e 'veloz builds logs <id>' para revisar o build",
670
+ "Use 'veloz config show' para verificar as configurações"
671
+ ];
672
+ case "DEPLOY_FAILED": return [
673
+ "O build passou mas o serviço falhou ao iniciar",
674
+ "Verifique se a porta configurada está correta: 'veloz config show'",
675
+ "Veja os logs de runtime: 'veloz logs -f'"
676
+ ];
677
+ case "CANCELLED": return ["Deploy cancelado. Execute 'veloz deploy' para tentar novamente."];
678
+ default: return ["Execute 'veloz logs -f' para mais detalhes."];
679
+ }
680
+ }
681
+ function createDeployOutput() {
682
+ if (isMcpMode()) return new McpOutput();
683
+ if (process.env.GITHUB_ACTIONS === "true") return new GhaOutput();
684
+ if (process.stdout.isTTY) return new TtyOutput();
685
+ return new PlainOutput();
686
+ }
687
+
320
688
  //#endregion
321
689
  //#region src/lib/deploy-stream.ts
322
690
  function shouldRenderDeployTui(input) {
@@ -352,23 +720,6 @@ async function fetchDeployUrls(client, serviceId) {
352
720
  return [];
353
721
  }
354
722
  }
355
- function getFailureHints(status) {
356
- switch (status) {
357
- case "BUILD_FAILED": return [
358
- "Verifique os logs de build acima para erros de compilação",
359
- "Teste o build localmente: rode o comando de build do seu projeto",
360
- "Use 'veloz builds list' e 'veloz builds logs <id>' para revisar o build",
361
- "Use 'veloz config show' para verificar as configurações"
362
- ];
363
- case "DEPLOY_FAILED": return [
364
- "O build passou mas o serviço falhou ao iniciar",
365
- "Verifique se a porta configurada está correta: 'veloz config show'",
366
- "Veja os logs de runtime: 'veloz logs -f'"
367
- ];
368
- case "CANCELLED": return ["Deploy cancelado. Execute 'veloz deploy' para tentar novamente."];
369
- default: return ["Execute 'veloz logs -f' para mais detalhes."];
370
- }
371
- }
372
723
  /** Raw BuildKit line: `#N content` */
373
724
  const BUILDKIT_PREFIX_RE = /^#(\d+)\s+(.*)/;
374
725
  /** Docker build step: `[stage step/total] COMMAND` */
@@ -488,7 +839,7 @@ async function streamDeploymentLogs(deploymentId, serviceId, serviceName, option
488
839
  isVerbose,
489
840
  useTui: options.useTui
490
841
  })) {
491
- const { renderDeployTUI } = await import("./deploy-tui-CNugdHl5.mjs");
842
+ const { renderDeployTUI } = await import("./deploy-tui-BDhyXrb0.mjs");
492
843
  return renderDeployTUI(deploymentId, serviceId, serviceName);
493
844
  }
494
845
  const allLogLines = [];
@@ -585,4 +936,4 @@ async function streamDeploymentLogs(deploymentId, serviceId, serviceName, option
585
936
  }
586
937
 
587
938
  //#endregion
588
- export { createClient as A, loadRawConfig as C, requireProjectName as D, requireProjectId as E, saveConfig as O, loadConfig$1 as S, requireConfig as T, getConfigPath as _, TERMINAL_STATUSES as a, isGitRepo as b, statusLabels as c, getClient as d, getClientForOrg as f, getConfigFileName as g, getActiveEnv as h, streamDeploymentLogs as i, setActiveEnv as k, buildVelozHeaders as l, findProjectRoot as m, isHiddenMessage as n, getStatusIcon as o, setClientSource as p, parseBuildLine as r, statusIcons as s, cleanDisplayLine as t, getAuthHeaders as u, getGitBranch as v, patchConfig as w, isInheritedConfig as x, getGitRemote as y };
939
+ export { requireProjectId as A, getGitRemote as C, loadRawConfig as D, loadConfig$1 as E, saveConfig as M, setActiveEnv as N, patchConfig as O, createClient as P, getGitBranch as S, isInheritedConfig as T, setClientSource as _, streamDeploymentLogs as a, getConfigFileName as b, checkAiSetup as c, getStatusIcon as d, statusLabels as f, getClientForOrg as g, getClient as h, parseBuildLine as i, requireProjectName as j, requireConfig as k, printAiSetupHint as l, getAuthHeaders as m, fetchDeployUrls as n, createDeployOutput as o, buildVelozHeaders as p, isHiddenMessage as r, getFailureHints as s, cleanDisplayLine as t, TERMINAL_STATUSES as u, findProjectRoot as v, isGitRepo as w, getConfigPath as x, getActiveEnv as y };
@@ -1,6 +1,6 @@
1
- import { a as TERMINAL_STATUSES, c as statusLabels, d as getClient, n as isHiddenMessage, r as parseBuildLine, t as cleanDisplayLine } from "./deploy-stream-RlGLmnU4.mjs";
2
- import { k as success, w as info } from "./config-DbVqGVaI.mjs";
3
- import "./veloz-config-axmseFRu.mjs";
1
+ import { f as statusLabels, h as getClient, i as parseBuildLine, n as fetchDeployUrls, r as isHiddenMessage, s as getFailureHints, t as cleanDisplayLine, u as TERMINAL_STATUSES } from "./deploy-stream-BPe1wrzQ.mjs";
2
+ import { k as success, w as info } from "./config-CPTQd4xp.mjs";
3
+ import "./veloz-config-DDaH3Lkl.mjs";
4
4
  import chalk from "chalk";
5
5
  import { useEffect, useRef, useState } from "react";
6
6
  import { Box, Static, Text, render, useApp } from "ink";
@@ -1011,30 +1011,6 @@ function DeployTUIApp({ stream, serviceName, resultRef }) {
1011
1011
  ]
1012
1012
  });
1013
1013
  }
1014
- async function fetchDeployUrls(client, serviceId) {
1015
- try {
1016
- return (await client.domains.list({ serviceId })).map((d) => `https://${d.domain}`);
1017
- } catch {
1018
- return [];
1019
- }
1020
- }
1021
- function getFailureHints(status) {
1022
- switch (status) {
1023
- case "BUILD_FAILED": return [
1024
- "Verifique os logs de build acima para erros de compilação",
1025
- "Teste o build localmente: rode o comando de build do seu projeto",
1026
- "Use 'veloz builds list' e 'veloz builds logs <id>' para revisar o build",
1027
- "Use 'veloz config show' para verificar as configurações"
1028
- ];
1029
- case "DEPLOY_FAILED": return [
1030
- "O build passou mas o serviço falhou ao iniciar",
1031
- "Verifique se a porta configurada está correta: 'veloz config show'",
1032
- "Veja os logs de runtime: 'veloz logs -f'"
1033
- ];
1034
- case "CANCELLED": return ["Deploy cancelado. Execute 'veloz deploy' para tentar novamente."];
1035
- default: return ["Execute 'veloz logs -f' para mais detalhes."];
1036
- }
1037
- }
1038
1014
  async function renderDeployTUI(deploymentId, serviceId, serviceName) {
1039
1015
  const client = await getClient();
1040
1016
  const stream = await client.logs.streamBuildLogs({ deploymentId });
@@ -1,5 +1,5 @@
1
1
  import "./Effect-bx4z8tIJ.mjs";
2
- import { n as runEdgeDev, r as startEdgeDev, t as EdgeDevError } from "./edge-dev-6aU81d_5.mjs";
3
- import "./veloz-config-axmseFRu.mjs";
2
+ import { n as runEdgeDev, r as startEdgeDev, t as EdgeDevError } from "./edge-dev-HISJWa4t.mjs";
3
+ import "./veloz-config-DDaH3Lkl.mjs";
4
4
 
5
5
  export { runEdgeDev };