veryfront 0.1.1165 → 0.1.1167

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.
Files changed (183) hide show
  1. package/esm/cli/app/views/dashboard.d.ts.map +1 -1
  2. package/esm/cli/app/views/dashboard.js +8 -35
  3. package/esm/cli/app/views/startup.d.ts +1 -8
  4. package/esm/cli/app/views/startup.d.ts.map +1 -1
  5. package/esm/cli/app/views/startup.js +16 -52
  6. package/esm/cli/auth/login.d.ts.map +1 -1
  7. package/esm/cli/auth/login.js +13 -8
  8. package/esm/cli/commands/build/config-display.d.ts.map +1 -1
  9. package/esm/cli/commands/build/config-display.js +20 -21
  10. package/esm/cli/commands/build/error-handler.d.ts.map +1 -1
  11. package/esm/cli/commands/build/error-handler.js +8 -15
  12. package/esm/cli/commands/build/handler.js +9 -12
  13. package/esm/cli/commands/build/stats-display.d.ts.map +1 -1
  14. package/esm/cli/commands/build/stats-display.js +9 -22
  15. package/esm/cli/commands/config/handler.d.ts.map +1 -1
  16. package/esm/cli/commands/config/handler.js +23 -4
  17. package/esm/cli/commands/demo/demo.d.ts +4 -0
  18. package/esm/cli/commands/demo/demo.d.ts.map +1 -1
  19. package/esm/cli/commands/demo/demo.js +30 -16
  20. package/esm/cli/commands/deploy/command-help.d.ts.map +1 -1
  21. package/esm/cli/commands/deploy/command-help.js +5 -10
  22. package/esm/cli/commands/deploy/command.d.ts +25 -3
  23. package/esm/cli/commands/deploy/command.d.ts.map +1 -1
  24. package/esm/cli/commands/deploy/command.js +202 -137
  25. package/esm/cli/commands/deploy/index.d.ts +2 -2
  26. package/esm/cli/commands/deploy/index.d.ts.map +1 -1
  27. package/esm/cli/commands/deploy/index.js +1 -1
  28. package/esm/cli/commands/dev/command.d.ts.map +1 -1
  29. package/esm/cli/commands/dev/command.js +10 -21
  30. package/esm/cli/commands/dev/handler.d.ts.map +1 -1
  31. package/esm/cli/commands/dev/handler.js +2 -0
  32. package/esm/cli/commands/doctor/index.js +2 -2
  33. package/esm/cli/commands/eval/command.d.ts +10 -0
  34. package/esm/cli/commands/eval/command.d.ts.map +1 -1
  35. package/esm/cli/commands/eval/command.js +2 -3
  36. package/esm/cli/commands/generate/integration-generator.d.ts.map +1 -1
  37. package/esm/cli/commands/generate/integration-generator.js +2 -1
  38. package/esm/cli/commands/init/config-generator.d.ts.map +1 -1
  39. package/esm/cli/commands/init/config-generator.js +2 -1
  40. package/esm/cli/commands/init/deno-config-generator.d.ts.map +1 -1
  41. package/esm/cli/commands/init/deno-config-generator.js +2 -1
  42. package/esm/cli/commands/init/init-command.d.ts +5 -1
  43. package/esm/cli/commands/init/init-command.d.ts.map +1 -1
  44. package/esm/cli/commands/init/init-command.js +89 -79
  45. package/esm/cli/commands/init/interactive-wizard.d.ts +1 -0
  46. package/esm/cli/commands/init/interactive-wizard.d.ts.map +1 -1
  47. package/esm/cli/commands/init/interactive-wizard.js +17 -31
  48. package/esm/cli/commands/init/types.d.ts +2 -0
  49. package/esm/cli/commands/init/types.d.ts.map +1 -1
  50. package/esm/cli/commands/install/install.js +1 -1
  51. package/esm/cli/commands/install/uninstall.js +1 -1
  52. package/esm/cli/commands/push/command-help.d.ts.map +1 -1
  53. package/esm/cli/commands/push/command-help.js +6 -15
  54. package/esm/cli/commands/push/command.d.ts +12 -6
  55. package/esm/cli/commands/push/command.d.ts.map +1 -1
  56. package/esm/cli/commands/push/command.js +203 -93
  57. package/esm/cli/commands/serve/handler.d.ts +3 -1
  58. package/esm/cli/commands/serve/handler.d.ts.map +1 -1
  59. package/esm/cli/commands/serve/handler.js +27 -2
  60. package/esm/cli/commands/start/command.d.ts +1 -0
  61. package/esm/cli/commands/start/command.d.ts.map +1 -1
  62. package/esm/cli/commands/start/command.js +8 -8
  63. package/esm/cli/commands/studio/command.js +2 -2
  64. package/esm/cli/commands/up/command-help.d.ts.map +1 -1
  65. package/esm/cli/commands/up/command-help.js +5 -6
  66. package/esm/cli/commands/up/command.d.ts.map +1 -1
  67. package/esm/cli/commands/up/command.js +107 -46
  68. package/esm/cli/help/formatters.d.ts +0 -1
  69. package/esm/cli/help/formatters.d.ts.map +1 -1
  70. package/esm/cli/help/formatters.js +2 -38
  71. package/esm/cli/help/index.d.ts +0 -1
  72. package/esm/cli/help/index.d.ts.map +1 -1
  73. package/esm/cli/help/index.js +0 -1
  74. package/esm/cli/help/main-help.d.ts.map +1 -1
  75. package/esm/cli/help/main-help.js +12 -2
  76. package/esm/cli/help/tips.d.ts +0 -2
  77. package/esm/cli/help/tips.d.ts.map +1 -1
  78. package/esm/cli/help/tips.js +1 -13
  79. package/esm/cli/mcp/tools/deploy-tool.d.ts.map +1 -1
  80. package/esm/cli/mcp/tools/deploy-tool.js +0 -1
  81. package/esm/cli/router.d.ts.map +1 -1
  82. package/esm/cli/router.js +7 -4
  83. package/esm/cli/shared/args.d.ts.map +1 -1
  84. package/esm/cli/shared/args.js +3 -1
  85. package/esm/cli/shared/config.d.ts +11 -0
  86. package/esm/cli/shared/config.d.ts.map +1 -1
  87. package/esm/cli/shared/config.js +33 -11
  88. package/esm/cli/shared/deployment-provenance.d.ts +1 -1
  89. package/esm/cli/shared/deployment-provenance.d.ts.map +1 -1
  90. package/esm/cli/shared/deployment-provenance.js +13 -9
  91. package/esm/cli/shared/project-link.d.ts +14 -0
  92. package/esm/cli/shared/project-link.d.ts.map +1 -0
  93. package/esm/cli/shared/project-link.js +147 -0
  94. package/esm/cli/shared/project-source-context.d.ts.map +1 -1
  95. package/esm/cli/shared/project-source-context.js +2 -3
  96. package/esm/cli/shared/runtime-auth.d.ts +3 -3
  97. package/esm/cli/shared/runtime-auth.d.ts.map +1 -1
  98. package/esm/cli/shared/runtime-auth.js +18 -7
  99. package/esm/cli/shared/server-startup.d.ts +4 -3
  100. package/esm/cli/shared/server-startup.d.ts.map +1 -1
  101. package/esm/cli/shared/server-startup.js +9 -4
  102. package/esm/cli/shared/types.d.ts +1 -0
  103. package/esm/cli/shared/types.d.ts.map +1 -1
  104. package/esm/cli/templates/manifest.d.ts +1 -0
  105. package/esm/cli/templates/manifest.js +12 -11
  106. package/esm/cli/ui/colors.d.ts.map +1 -1
  107. package/esm/cli/ui/colors.js +10 -5
  108. package/esm/cli/ui/components/multi-select.js +1 -1
  109. package/esm/cli/ui/components/table.js +3 -3
  110. package/esm/cli/ui/progress.js +5 -5
  111. package/esm/cli/ui/tui.js +1 -1
  112. package/esm/cli/utils/env-prompt.d.ts.map +1 -1
  113. package/esm/cli/utils/env-prompt.js +3 -1
  114. package/esm/cli/utils/index.d.ts.map +1 -1
  115. package/esm/cli/utils/index.js +17 -14
  116. package/esm/cli/utils/terminal-select.d.ts +7 -2
  117. package/esm/cli/utils/terminal-select.d.ts.map +1 -1
  118. package/esm/cli/utils/terminal-select.js +21 -10
  119. package/esm/deno.js +1 -1
  120. package/esm/extensions/ext-bundler-esbuild/src/index.js +1 -1
  121. package/esm/extensions/ext-eval-report-mlflow/src/index.js +1 -1
  122. package/esm/extensions/ext-llm-anthropic/src/index.js +1 -1
  123. package/esm/extensions/ext-llm-google/src/index.js +1 -1
  124. package/esm/extensions/ext-llm-openai/src/index.js +1 -1
  125. package/esm/extensions/ext-schema-zod/src/index.js +1 -1
  126. package/esm/src/agent/ag-ui/runtime-support.d.ts.map +1 -1
  127. package/esm/src/agent/ag-ui/runtime-support.js +17 -1
  128. package/esm/src/agent/hosted/chat-request.d.ts.map +1 -1
  129. package/esm/src/agent/hosted/chat-request.js +40 -1
  130. package/esm/src/agent/runtime/ag-ui-contract.d.ts +76 -0
  131. package/esm/src/agent/runtime/ag-ui-contract.d.ts.map +1 -1
  132. package/esm/src/agent/runtime/ag-ui-contract.js +23 -0
  133. package/esm/src/agent/runtime/index.d.ts.map +1 -1
  134. package/esm/src/agent/runtime/index.js +7 -6
  135. package/esm/src/agent/runtime/message-adapter.d.ts +18 -18
  136. package/esm/src/agent/runtime/message-adapter.d.ts.map +1 -1
  137. package/esm/src/agent/runtime/message-adapter.js +18 -4
  138. package/esm/src/agent/schemas/agent.schema.d.ts +40 -0
  139. package/esm/src/agent/schemas/agent.schema.d.ts.map +1 -1
  140. package/esm/src/agent/schemas/agent.schema.js +9 -0
  141. package/esm/src/cache/module-cache.js +1 -1
  142. package/esm/src/config/loader.js +1 -1
  143. package/esm/src/errors/middleware/cli-error-boundary.d.ts +5 -1
  144. package/esm/src/errors/middleware/cli-error-boundary.d.ts.map +1 -1
  145. package/esm/src/errors/middleware/cli-error-boundary.js +26 -64
  146. package/esm/src/extensions/builtin-extensions.js +1 -1
  147. package/esm/src/extensions/capabilities.js +1 -1
  148. package/esm/src/extensions/loader.js +1 -1
  149. package/esm/src/internal-agents/schema.d.ts +76 -0
  150. package/esm/src/internal-agents/schema.d.ts.map +1 -1
  151. package/esm/src/internal-agents/schema.js +28 -0
  152. package/esm/src/platform/compat/process/command.d.ts.map +1 -1
  153. package/esm/src/platform/compat/process/command.js +14 -10
  154. package/esm/src/platform/compat/stdin.d.ts +20 -0
  155. package/esm/src/platform/compat/stdin.d.ts.map +1 -1
  156. package/esm/src/platform/compat/stdin.js +78 -44
  157. package/esm/src/platform/index.d.ts +1 -1
  158. package/esm/src/platform/index.d.ts.map +1 -1
  159. package/esm/src/platform/index.js +1 -1
  160. package/esm/src/routing/api/module-loader/loader.js +2 -2
  161. package/esm/src/security/http/config.d.ts.map +1 -1
  162. package/esm/src/security/http/config.js +3 -2
  163. package/esm/src/server/handlers/preview/hmr.handler.js +2 -2
  164. package/esm/src/server/handlers/request/api/project-discovery.js +2 -2
  165. package/esm/src/server/handlers/request/static.handler.d.ts.map +1 -1
  166. package/esm/src/server/handlers/request/static.handler.js +12 -2
  167. package/esm/src/server/runtime-handler/index.d.ts.map +1 -1
  168. package/esm/src/server/runtime-handler/index.js +1 -4
  169. package/esm/src/server/runtime-handler/request-lifecycle.d.ts +1 -1
  170. package/esm/src/server/runtime-handler/request-lifecycle.d.ts.map +1 -1
  171. package/esm/src/server/runtime-handler/request-lifecycle.js +2 -2
  172. package/esm/src/server/runtime-handler/request-tracker.d.ts +3 -2
  173. package/esm/src/server/runtime-handler/request-tracker.d.ts.map +1 -1
  174. package/esm/src/server/runtime-handler/request-tracker.js +31 -7
  175. package/esm/src/tool/factory.js +1 -1
  176. package/esm/src/tool/registry.js +1 -1
  177. package/esm/src/transforms/esm/transform-cache.js +1 -1
  178. package/esm/src/utils/version-constant.d.ts +1 -1
  179. package/esm/src/utils/version-constant.js +1 -1
  180. package/package.json +5 -5
  181. package/esm/cli/help/logo.d.ts +0 -2
  182. package/esm/cli/help/logo.d.ts.map +0 -1
  183. package/esm/cli/help/logo.js +0 -4
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../../../src/cli/app/views/dashboard.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAyDvD;AAuGD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAQxD"}
1
+ {"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../../../src/cli/app/views/dashboard.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAyDvD;AA2ED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAQxD"}
@@ -3,10 +3,8 @@
3
3
  *
4
4
  * Main view showing server status, projects, and quick actions.
5
5
  */
6
- import { box } from "../../ui/box.js";
7
6
  import { brand, dim, error, muted } from "../../ui/colors.js";
8
7
  import { getTerminalWidth } from "../../ui/layout.js";
9
- import { getAgentFaceWithText } from "../../ui/dot-matrix.js";
10
8
  import { renderList } from "../components/list-select.js";
11
9
  /**
12
10
  * Render the dashboard view
@@ -15,7 +13,7 @@ export function renderDashboard(state) {
15
13
  const termWidth = Math.min(getTerminalWidth() - 4, 80);
16
14
  const maxListWidth = termWidth - 4;
17
15
  const lines = [];
18
- lines.push(renderBanner(state), "");
16
+ lines.push(renderStatus(state), "");
19
17
  const hasProjects = state.projects.items.length > 0;
20
18
  const hasRemoteProjects = !!state.remote.user && state.remote.projects.length > 0;
21
19
  if (hasProjects) {
@@ -61,22 +59,10 @@ function getShortcut(displayNum) {
61
59
  // 10='a', 11='b', etc.
62
60
  return String.fromCharCode(96 + displayNum - 9);
63
61
  }
64
- /**
65
- * Render the banner with agent face and server info inside a box
66
- */
67
- function renderBanner(state) {
68
- const termWidth = Math.min(getTerminalWidth() - 4, 80);
69
- const textLines = [];
70
- textLines.push("");
71
- textLines.push(`${brand("Veryfront")} ${dim("is now running")}`);
72
- textLines.push("");
73
- // Server URL and MCP URL, always reserve both lines to prevent jumps.
74
- textLines.push(`${dim("Url")} ${brand(state.server.url)}`);
62
+ function renderStatus(state) {
63
+ const lines = [` ✓ Server ready at ${brand(state.server.url)}`];
75
64
  if (state.mcp.enabled && state.mcp.transport === "http" && state.mcp.httpPort !== undefined) {
76
- textLines.push(`${dim("Mcp")} ${brand(`http://veryfront.me:${state.mcp.httpPort}/mcp`)}`);
77
- }
78
- else {
79
- textLines.push("");
65
+ lines.push(` ✓ MCP ready at ${brand(`http://veryfront.me:${state.mcp.httpPort}/mcp`)}`);
80
66
  }
81
67
  const { errors, warnings } = state.server;
82
68
  if (errors > 0 || warnings > 0) {
@@ -85,22 +71,9 @@ function renderBanner(state) {
85
71
  parts.push(error(`${errors} errors`));
86
72
  if (warnings > 0)
87
73
  parts.push(muted(`${warnings} warnings`));
88
- textLines.push(parts.join(" "));
89
- }
90
- // Pad to 7 text lines (matching avatar height) for consistent title position
91
- while (textLines.length < 7) {
92
- textLines.push("");
74
+ lines.push(` ${parts.join(" ")}`);
93
75
  }
94
- const content = getAgentFaceWithText(textLines, {
95
- litColor: "\x1b[38;2;252;143;93m", // Veryfront brand orange
96
- });
97
- return box(content, {
98
- style: "rounded",
99
- width: termWidth,
100
- paddingX: 2,
101
- paddingY: 1,
102
- borderColor: "\x1b[2m", // Dim to match footer
103
- });
76
+ return lines.join("\n");
104
77
  }
105
78
  /**
106
79
  * Render a section header
@@ -117,7 +90,7 @@ function renderHelpBar(state) {
117
90
  const hasItems = state.projects.items.length > 0 ||
118
91
  (!!state.remote.user && state.remote.projects.length > 0);
119
92
  if (!state.showHelp) {
120
- const userInfo = state.remote.user ? ` ${dim("-")} ${brand(state.remote.user.email)}` : "";
93
+ const userInfo = state.remote.user ? ` ${dim("-")} ${dim(state.remote.user.email)}` : "";
121
94
  if (!hasItems) {
122
95
  const authHint = state.remote.user
123
96
  ? `${dim("x")} ${dim("logout")}`
@@ -148,7 +121,7 @@ function renderHelpBar(state) {
148
121
  */
149
122
  export function renderEmptyState(state) {
150
123
  const lines = [];
151
- lines.push(renderBanner(state), "");
124
+ lines.push(renderStatus(state), "");
152
125
  lines.push(` ${dim("No projects.")} ${brand("n")} ${dim("to create")}`, "");
153
126
  lines.push(renderHelpBar(state));
154
127
  return lines.join("\n");
@@ -1,8 +1,7 @@
1
1
  /**************************
2
2
  * Startup View
3
3
  *
4
- * Shows loading progress with consistent box sizing.
5
- * Displays avatar, title, and step checklist.
4
+ * Shows compact loading progress before the main TUI is ready.
6
5
  **************************/
7
6
  export interface StartupStep {
8
7
  label: string;
@@ -16,17 +15,11 @@ export interface StartupState {
16
15
  /** Animation frame counter for shimmer effect */
17
16
  frame: number;
18
17
  }
19
- /**
20
- * Render the startup view inside a consistent-sized box
21
- */
22
18
  export declare function renderStartup(state: StartupState): string;
23
19
  /**
24
20
  * Create initial startup state with steps
25
21
  */
26
22
  export declare function createStartupState(stepLabels: string[]): StartupState;
27
- /**
28
- * Increment animation frame for shimmer effect
29
- */
30
23
  export declare function incrementFrame(state: StartupState): StartupState;
31
24
  /**
32
25
  * Set a step to active
@@ -1 +1 @@
1
- {"version":3,"file":"startup.d.ts","sourceRoot":"","sources":["../../../../src/cli/app/views/startup.ts"],"names":[],"mappings":"AAAA;;;;;4BAK4B;AAU5B,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;CACvC;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAiDzD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,YAAY,CAMrE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,GAAG,YAAY,CAEhE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,CAO9E"}
1
+ {"version":3,"file":"startup.d.ts","sourceRoot":"","sources":["../../../../src/cli/app/views/startup.ts"],"names":[],"mappings":"AAAA;;;;4BAI4B;AAK5B,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;CACvC;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAmBzD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,YAAY,CAMrE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,GAAG,YAAY,CAEhE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,CAO9E"}
@@ -1,61 +1,28 @@
1
1
  /**************************
2
2
  * Startup View
3
3
  *
4
- * Shows loading progress with consistent box sizing.
5
- * Displays avatar, title, and step checklist.
4
+ * Shows compact loading progress before the main TUI is ready.
6
5
  **************************/
7
- import { box } from "../../ui/box.js";
8
- import { brand, dim, shimmer } from "../../ui/colors.js";
9
- import { getAgentFaceWithText, getSpinningAgentFace } from "../../ui/dot-matrix.js";
10
- import { getTerminalWidth } from "../../ui/layout.js";
11
- // Dim orange for completed steps - matches the trailing dots in spinning animation
12
- const dimOrange = (text) => `\x1b[38;2;180;100;65m${text}\x1b[0m`;
13
- /**
14
- * Render the startup view inside a consistent-sized box
15
- */
6
+ import { brand, dim } from "../../ui/colors.js";
7
+ import { getSpinnerFrame } from "../../ui/ansi.js";
16
8
  export function renderStartup(state) {
17
- const termWidth = Math.min(getTerminalWidth() - 4, 80);
18
- const textLines = [""];
9
+ const lines = [];
19
10
  if (state.ready) {
20
- // Running state - always reserve space for both URL lines to prevent jumps
21
- textLines.push(`${brand("Veryfront")} ${dim("is now running")}`, "");
22
- textLines.push(state.serverUrl ? `${dim("Url")} ${brand(state.serverUrl)}` : "");
23
- textLines.push(state.mcpUrl ? `${dim("Mcp")} ${brand(state.mcpUrl)}` : "");
11
+ lines.push(state.serverUrl ? ` ✓ Server ready at ${brand(state.serverUrl)}` : " ✓ Server ready");
12
+ if (state.mcpUrl)
13
+ lines.push(` ✓ MCP ready at ${brand(state.mcpUrl)}`);
14
+ return lines.join("\n");
24
15
  }
25
- else {
26
- // Loading state - match ready state layout
27
- textLines.push(`${brand("Veryfront")} ${dim("starting...")}`, "");
28
- for (const step of state.steps) {
29
- if (step.status === "done") {
30
- // Completed: dim orange (fades into background, coherent with avatar)
31
- textLines.push(`${dimOrange("●")} ${dimOrange(step.label)}`);
32
- continue;
33
- }
34
- if (step.status === "active") {
35
- // Active: bright orange dot with shimmer text
36
- textLines.push(`${brand("●")} ${shimmer(step.label, state.frame)}`);
37
- continue;
38
- }
39
- // Pending: gray empty circle
40
- textLines.push(`${dim("○")} ${dim(step.label)}`);
16
+ for (const step of state.steps) {
17
+ if (step.status === "done")
18
+ lines.push(` ✓ ${dim(step.label)}`);
19
+ else if (step.status === "active") {
20
+ lines.push(` ${brand(getSpinnerFrame(state.frame))} ${step.label}`);
41
21
  }
22
+ else
23
+ lines.push(` ${dim("○")} ${dim(step.label)}`);
42
24
  }
43
- // Pad to 7 text lines (matching avatar height) for consistent title position
44
- while (textLines.length < 7)
45
- textLines.push("");
46
- // Use spinning avatar during loading, static when ready or all steps done
47
- const allStepsDone = state.steps.every((s) => s.status === "done");
48
- const litColor = "\x1b[38;2;252;143;93m"; // Veryfront brand orange
49
- const content = state.ready || allStepsDone
50
- ? getAgentFaceWithText(textLines, { litColor })
51
- : getSpinningAgentFace(textLines, state.frame, { litColor });
52
- return box(content, {
53
- style: "rounded",
54
- width: termWidth,
55
- paddingX: 2,
56
- paddingY: 1,
57
- borderColor: "\x1b[2m", // Dim to match footer
58
- });
25
+ return lines.join("\n");
59
26
  }
60
27
  /**
61
28
  * Create initial startup state with steps
@@ -67,9 +34,6 @@ export function createStartupState(stepLabels) {
67
34
  frame: 0,
68
35
  };
69
36
  }
70
- /**
71
- * Increment animation frame for shimmer effect
72
- */
73
37
  export function incrementFrame(state) {
74
38
  return { ...state, frame: state.frame + 1 };
75
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/cli/auth/login.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,iBAAiB,EAAwB,MAAM,2BAA2B,CAAC;AACzF,OAAO,EAAE,WAAW,EAAoB,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAQjG,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;AAErE,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,IAAI,CAAC;IACpB,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,cAAc,CAAC;AASrD,wBAAgB,gBAAgB,IAAI,MAAM,CAIzC;AAED,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,QAAQ,GAAG,QAAQ,GAAG,WAAW,EAC3C,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,GAAG,GAAE,iBAA0C,GAC9C,MAAM,CAQR;AAED,wBAAsB,aAAa,CACjC,KAAK,EAAE,MAAM,EACb,GAAG,GAAE,iBAA0C,GAC9C,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAgB1B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,YAAY,GAAG,QAAQ,IAAI,cAAc,CAEnF;AAqBD,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,MAAM,EACb,GAAG,GAAE,iBAA0C,GAC9C,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAQ9B;AAgJD,wBAAsB,KAAK,CACzB,MAAM,CAAC,EAAE,UAAU,EACnB,GAAG,GAAE,iBAA0C,GAC9C,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAkC9B;AAED,wBAAsB,mBAAmB,CACvC,GAAG,GAAE,iBAA0C,GAC9C,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CA6B9B;AAED,wBAAsB,MAAM,CAAC,GAAG,GAAE,iBAA0C,GAAG,OAAO,CAAC,IAAI,CAAC,CAI3F;AAyCD,wBAAsB,MAAM,CAC1B,GAAG,GAAE,iBAA0C,GAC9C,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAiC9B;AAED,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/cli/auth/login.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,iBAAiB,EAAwB,MAAM,2BAA2B,CAAC;AACzF,OAAO,EAAE,WAAW,EAAoB,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AASjG,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;AAErE,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,IAAI,CAAC;IACpB,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,cAAc,CAAC;AASrD,wBAAgB,gBAAgB,IAAI,MAAM,CAIzC;AAED,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,QAAQ,GAAG,QAAQ,GAAG,WAAW,EAC3C,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,GAAG,GAAE,iBAA0C,GAC9C,MAAM,CAQR;AAED,wBAAsB,aAAa,CACjC,KAAK,EAAE,MAAM,EACb,GAAG,GAAE,iBAA0C,GAC9C,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAgB1B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,YAAY,GAAG,QAAQ,IAAI,cAAc,CAEnF;AAqBD,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,MAAM,EACb,GAAG,GAAE,iBAA0C,GAC9C,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAQ9B;AAgJD,wBAAsB,KAAK,CACzB,MAAM,CAAC,EAAE,UAAU,EACnB,GAAG,GAAE,iBAA0C,GAC9C,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAuC9B;AAED,wBAAsB,mBAAmB,CACvC,GAAG,GAAE,iBAA0C,GAC9C,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CA6B9B;AAED,wBAAsB,MAAM,CAAC,GAAG,GAAE,iBAA0C,GAAG,OAAO,CAAC,IAAI,CAAC,CAI3F;AAyCD,wBAAsB,MAAM,CAC1B,GAAG,GAAE,iBAA0C,GAC9C,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAiC9B;AAED,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC"}
@@ -6,9 +6,10 @@ import { deleteToken, getTokenLocation, hasToken, readToken, saveToken } from ".
6
6
  import { getCallbackUrl, startCallbackServer } from "./callback-server.js";
7
7
  import { canOpenBrowser, openBrowser } from "./browser.js";
8
8
  import { isTTY, promptUser } from "../utils/index.js";
9
- import { brand, dim, error, muted, success, warning } from "../ui/colors.js";
9
+ import { brand, dim, error, muted, warning } from "../ui/colors.js";
10
10
  import { DEFAULT_CALLBACK_PORT, DEFAULT_LOGIN_TIMEOUT_MS, getApiUrl } from "../shared/constants.js";
11
11
  import { createSuccessEnvelope, isJsonMode, outputJson } from "../shared/json-output.js";
12
+ import { isInteractive } from "../shared/interactive.js";
12
13
  const AUTH_OPTIONS = [
13
14
  { id: "google", label: "Google" },
14
15
  { id: "github", label: "GitHub" },
@@ -193,6 +194,10 @@ async function loginWithToken() {
193
194
  return token;
194
195
  }
195
196
  export async function login(method, env = getEnvironmentConfig()) {
197
+ if (!isInteractive() && (method === undefined || method === "token")) {
198
+ cliLogger.error("Not logged in. Set VERYFRONT_API_TOKEN or run in interactive mode.");
199
+ return null;
200
+ }
196
201
  const authMethod = method ?? (isTTY() ? await promptAuthMethod() : "token");
197
202
  let token = null;
198
203
  switch (authMethod) {
@@ -217,8 +222,8 @@ export async function login(method, env = getEnvironmentConfig()) {
217
222
  await saveToken(token, env);
218
223
  console.log();
219
224
  console.log(isApiKeyIdentity(identity)
220
- ? " " + success("") + " Authenticated with an API key"
221
- : " " + success("") + " Logged in as " + brand(identity.email));
225
+ ? " ✓ Authenticated with an API key"
226
+ : " ✓ Logged in as " + brand(identity.email));
222
227
  return identity;
223
228
  }
224
229
  export async function ensureAuthenticated(env = getEnvironmentConfig()) {
@@ -243,7 +248,7 @@ export async function ensureAuthenticated(env = getEnvironmentConfig()) {
243
248
  }
244
249
  if (!humanOutput)
245
250
  return null;
246
- if (!isTTY()) {
251
+ if (!isTTY() || !isInteractive()) {
247
252
  cliLogger.error("Not logged in. Set VERYFRONT_API_TOKEN or run in interactive mode.");
248
253
  return null;
249
254
  }
@@ -252,7 +257,7 @@ export async function ensureAuthenticated(env = getEnvironmentConfig()) {
252
257
  export async function logout(env = getEnvironmentConfig()) {
253
258
  await deleteToken(env);
254
259
  console.log();
255
- console.log(" " + success("") + " Logged out");
260
+ console.log(" ✓ Logged out");
256
261
  }
257
262
  async function reportCredential(token, source, env) {
258
263
  const credential = await validateCredential(token, env);
@@ -265,7 +270,7 @@ async function reportCredential(token, source, env) {
265
270
  return userInfo;
266
271
  }
267
272
  console.log();
268
- console.log(" " + success("") + " Logged in as " + brand(userInfo.email));
273
+ console.log(" ✓ Logged in as " + brand(userInfo.email));
269
274
  }
270
275
  else {
271
276
  if (isJsonMode()) {
@@ -277,7 +282,7 @@ async function reportCredential(token, source, env) {
277
282
  return { authenticated: true, type: "apiKey" };
278
283
  }
279
284
  console.log();
280
- console.log(" " + success("") + " Authenticated with an API key");
285
+ console.log(" ✓ Authenticated with an API key");
281
286
  }
282
287
  console.log(" " + dim(source === "env" ? "(via VERYFRONT_API_TOKEN)" : `Token stored at: ${getTokenLocation(env)}`));
283
288
  return credential;
@@ -306,7 +311,7 @@ export async function whoami(env = getEnvironmentConfig()) {
306
311
  const { listProviderTokens } = await import("./provider-store.js");
307
312
  const providers = await listProviderTokens(env);
308
313
  for (const p of providers) {
309
- console.log(" " + success("") + ` ${p} API key configured`);
314
+ console.log(` ✓ ${p} API key configured`);
310
315
  }
311
316
  }
312
317
  catch {
@@ -1 +1 @@
1
- {"version":3,"file":"config-display.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/build/config-display.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAuC9D;AAED,wBAAgB,iBAAiB,IAAI,IAAI,CAExC"}
1
+ {"version":3,"file":"config-display.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/build/config-display.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAiC9D;AAED,wBAAgB,iBAAiB,IAAI,IAAI,CAExC"}
@@ -1,29 +1,28 @@
1
- import { bold, cyan, dim, green, red, yellow } from "../../ui/index.js";
2
- import { cliLogger } from "../../utils/index.js";
1
+ import { dim, warning } from "../../ui/index.js";
2
+ import { cliLogger, isVerbose } from "../../utils/index.js";
3
3
  export function displayBuildConfig(options) {
4
4
  const { projectDir, outputDir, splitting = true, compress = true, prefetch = true, ssg = true, include, exclude, dryRun = false, } = options;
5
- cliLogger.info(bold(cyan("\n🚀 Veryfront Production Build\n")));
6
- cliLogger.info("Starting production build");
7
- cliLogger.info(yellow("\nBuild Configuration:"));
8
- cliLogger.info(` ${dim("Project:")} ${projectDir}`);
9
- cliLogger.info(` ${dim("Output:")} ${outputDir ?? "dist"}`);
10
- cliLogger.info(` ${dim("Features:")}`);
11
- cliLogger.info(` ${splitting ? green("") : red("")} Code splitting`);
12
- cliLogger.info(` ${compress ? green("✓") : red("✗")} Compression`);
13
- cliLogger.info(` ${prefetch ? green("") : red("")} Prefetch hints`);
14
- cliLogger.info(` ${ssg ? green("✓") : red("✗")} Static generation`);
15
- if (include?.length) {
16
- cliLogger.info(`\n ${dim("Include:")} ${include.join(", ")}`);
17
- }
18
- if (exclude?.length) {
19
- cliLogger.info(` ${dim("Exclude:")} ${exclude.join(", ")}`);
5
+ if (isVerbose()) {
6
+ const features = [
7
+ splitting && "splitting",
8
+ compress && "compression",
9
+ prefetch && "prefetch",
10
+ ssg && "SSG",
11
+ ].filter(Boolean).join(", ") || "none";
12
+ cliLogger.info(` ${dim("Project:")} ${projectDir}`);
13
+ cliLogger.info(` ${dim("Output:")} ${outputDir ?? "dist"}`);
14
+ cliLogger.info(` ${dim("Features:")} ${features}`);
15
+ if (include?.length)
16
+ cliLogger.info(` ${dim("Include:")} ${include.join(", ")}`);
17
+ if (exclude?.length)
18
+ cliLogger.info(` ${dim("Exclude:")} ${exclude.join(", ")}`);
19
+ cliLogger.info("");
20
20
  }
21
21
  if (dryRun) {
22
- cliLogger.info(`\n ${yellow("")} ${yellow("Dry run mode - no files will be written")}`);
23
- cliLogger.info("dry-run");
22
+ cliLogger.info(` ${warning("!")} Dry run: no files will be written`);
23
+ cliLogger.info("");
24
24
  }
25
- cliLogger.info("");
26
25
  }
27
26
  export function displayBuildStart() {
28
- cliLogger.info(cyan("Building your application...\n"));
27
+ cliLogger.info("Building...");
29
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/build/error-handler.ts"],"names":[],"mappings":"AAIA,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,CAyBtD"}
1
+ {"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/build/error-handler.ts"],"names":[],"mappings":"AAIA,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,CAetD"}
@@ -1,23 +1,16 @@
1
- import { bold, cyan, dim, red } from "../../ui/index.js";
2
- import { cliLogger } from "../../utils/index.js";
1
+ import { brand, dim } from "../../ui/index.js";
2
+ import { cliLogger, isVerbose } from "../../utils/index.js";
3
3
  import { exit, getStdout } from "../../../src/platform/index.js";
4
4
  export function handleBuildError(error) {
5
5
  getStdout()?.write?.(`\r${" ".repeat(80)}\r`);
6
- cliLogger.error(`\n${red("✗")}${bold(red(" Build failed!\n"))}`);
7
- if (!(error instanceof Error)) {
8
- cliLogger.error(`${red("Error: ")}${String(error)}`);
9
- cliLogger.error(`\n${dim("For help, run: ")}${cyan("veryfront build --help")}`);
10
- if (globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).main)
11
- exit(1);
12
- throw error;
13
- }
14
- cliLogger.error(`${red("Error: ")}${error.message}`);
15
- const stack = error.stack;
16
- if (stack) {
6
+ const message = error instanceof Error ? error.message : String(error);
7
+ cliLogger.error(`\n✗ ${message}`);
8
+ if (isVerbose() && error instanceof Error && error.stack) {
17
9
  cliLogger.error(`\n${dim("Stack trace:")}`);
18
- cliLogger.error(dim(stack.split("\n").slice(1, 5).join("\n")));
10
+ cliLogger.error(dim(error.stack.split("\n").slice(1, 5).join("\n")));
19
11
  }
20
- cliLogger.error(`\n${dim("For help, run: ")}${cyan("veryfront build --help")}`);
12
+ cliLogger.error(` Run ${brand("veryfront build --help")} for usage.`);
13
+ cliLogger.error("");
21
14
  if (globalThis[Symbol.for("import-meta-ponyfill-esmodule")](import.meta).main)
22
15
  exit(1);
23
16
  throw error;
@@ -1,7 +1,7 @@
1
1
  import { defineSchema, lazySchema } from "../../../src/schemas/index.js";
2
- import { bold, cyan, dim, green, yellow } from "../../ui/index.js";
2
+ import { dim } from "../../ui/index.js";
3
3
  import { join } from "../../../src/platform/compat/path/index.js";
4
- import { cliLogger } from "../../utils/index.js";
4
+ import { cliLogger, isVerbose, logSuccess } from "../../utils/index.js";
5
5
  import { cwd } from "../../../src/platform/index.js";
6
6
  import { CommonArgs, createArgParser, parseArgsOrThrow } from "../../shared/args.js";
7
7
  import { ensureCliBundlerContracts } from "../../shared/default-contracts.js";
@@ -72,19 +72,16 @@ export async function handleBuildCommand(args) {
72
72
  async function handleEmbeddedBuild(projectDir, outputDir) {
73
73
  const { buildEmbeddedPreset } = await import("../../../src/build/index.js");
74
74
  const finalOutput = outputDir ?? join(projectDir, "dist");
75
- cliLogger.info(bold(cyan("\n🔗 Veryfront Embedded Preset Build\n")));
76
- cliLogger.info("Starting embedded preset build");
77
- cliLogger.info(yellow("\nBuild Configuration:"));
78
- cliLogger.info(` ${dim("Project:")} ${projectDir}`);
79
- cliLogger.info(` ${dim("Output:")} ${finalOutput}`);
80
- cliLogger.info(` ${dim("Preset:")} embedded`);
81
- cliLogger.info("\n");
75
+ cliLogger.info("Building embedded preset...");
76
+ if (isVerbose()) {
77
+ cliLogger.info(` ${dim("Project:")} ${projectDir}`);
78
+ cliLogger.info(` ${dim("Output:")} ${finalOutput}`);
79
+ }
82
80
  await buildEmbeddedPreset({
83
81
  projectDir,
84
82
  outDir: finalOutput,
85
83
  runtime: "deno",
86
84
  });
87
- cliLogger.info(`\n${green("✓")}${bold(green(" Embedded bundle created!\n"))}`);
88
- const { getPostBuildTips } = await import("../../help/tips.js");
89
- console.log(getPostBuildTips());
85
+ logSuccess("Built embedded preset");
86
+ cliLogger.info(` ${finalOutput}\n`);
90
87
  }
@@ -1 +1 @@
1
- {"version":3,"file":"stats-display.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/build/stats-display.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,GACd,IAAI,CA8BN"}
1
+ {"version":3,"file":"stats-display.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/build/stats-display.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAM7C,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,OAAO,GACd,IAAI,CAeN"}
@@ -1,28 +1,15 @@
1
- import { bold, cyan, dim, green, yellow } from "../../ui/index.js";
2
- import { cliLogger } from "../../utils/index.js";
1
+ import { dim } from "../../ui/index.js";
2
+ import { cliLogger, formatBytes } from "../../utils/index.js";
3
+ function formatCount(count, noun) {
4
+ return `${count} ${noun}${count === 1 ? "" : "s"}`;
5
+ }
3
6
  export function displayBuildSuccess(stats, startTime, outputDir, dryRun) {
4
7
  const duration = ((Date.now() - startTime) / 1000).toFixed(2);
5
- const separator = dim("─".repeat(40));
6
- cliLogger.info(`\n${green("")}${bold(green(" Build completed successfully!\n"))}`);
7
- cliLogger.info(cyan("📊 Build Statistics"));
8
- cliLogger.info(separator);
9
- cliLogger.info(` Pages ${bold(String(stats.pages).padStart(6))} files`);
10
- cliLogger.info(` Chunks ${bold(String(stats.chunks).padStart(6))} files`);
11
- cliLogger.info(` Assets ${bold(String(stats.assets).padStart(6))} files`);
12
- cliLogger.info(separator);
13
- cliLogger.info(` Total size ${bold((stats.totalSize / 1024 / 1024).toFixed(2).padStart(6))} MB`);
14
- cliLogger.info(` Build time ${bold(duration.padStart(6))} seconds`);
15
- cliLogger.info("");
8
+ cliLogger.info(` ✓ Built in ${duration}s`);
9
+ cliLogger.info(` ${formatCount(stats.pages, "page")}, ${formatCount(stats.chunks, "chunk")}, ${formatCount(stats.assets, "asset")}`);
10
+ cliLogger.info(` ${formatBytes(stats.totalSize)} in ${outputDir}`);
16
11
  if (dryRun && stats.ssgPaths?.length) {
17
- cliLogger.info(yellow("📝 SSG routes that would be generated:"));
18
- for (const p of stats.ssgPaths)
19
- cliLogger.info(` ${dim("•")} ${p}`);
20
- cliLogger.info("");
12
+ cliLogger.info(` ${dim("SSG routes:")} ${stats.ssgPaths.join(", ")}`);
21
13
  }
22
- cliLogger.info(green("✨") + bold(" Your site is ready for deployment!"));
23
- cliLogger.info(`\n ${dim("Output directory:")} ${cyan(outputDir)}`);
24
- cliLogger.info(`\n ${dim("Next steps:")}`);
25
- cliLogger.info(` ${dim("•")} ${cyan("veryfront serve")} to preview locally`);
26
- cliLogger.info(` ${dim("•")} Deploy the ${cyan("dist")} directory to your host`);
27
14
  cliLogger.info("");
28
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/config/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAexD,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAexB;AAED,wBAAgB,eAAe,IAAI,MAAM,EAAE,CAM1C;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,EAAE,EAAE,OAAO,CAAC;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAoBzF;AAED,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA+B1E"}
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/config/handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAkBxD,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAkBxB;AAED,wBAAgB,eAAe,IAAI,MAAM,EAAE,CAS1C;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,EAAE,EAAE,OAAO,CAAC;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAsCzF;AAED,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CA+B1E"}
@@ -1,9 +1,9 @@
1
1
  import { cliLogger } from "../../utils/index.js";
2
2
  import { getEnv } from "../../../src/platform/index.js";
3
+ import { ENVIRONMENT_PROJECT_REFERENCE_NAMES, resolveEnvironmentProjectReference, } from "../../shared/config.js";
3
4
  import { createSuccessEnvelope, isJsonMode, outputJson } from "../../shared/json-output.js";
4
5
  import { bold, dim } from "../../ui/colors.js";
5
6
  const ENV_OVERRIDES = {
6
- projectSlug: "VERYFRONT_PROJECT_SLUG",
7
7
  apiBaseUrl: "VERYFRONT_API_BASE_URL",
8
8
  apiToken: "VERYFRONT_API_TOKEN",
9
9
  nodeEnv: "NODE_ENV",
@@ -22,10 +22,17 @@ export async function detectConfigSource(projectDir) {
22
22
  if (await fs.exists(join(projectDir, name)))
23
23
  return name;
24
24
  }
25
+ if (await fs.exists(join(projectDir, ".veryfront", "project.json"))) {
26
+ return ".veryfront/project.json";
27
+ }
25
28
  return null;
26
29
  }
27
30
  export function getEnvOverrides() {
28
31
  const overrides = [];
32
+ for (const envVar of ENVIRONMENT_PROJECT_REFERENCE_NAMES) {
33
+ if (getEnv(envVar))
34
+ overrides.push(`projectSlug (${envVar})`);
35
+ }
29
36
  for (const [field, envVar] of Object.entries(ENV_OVERRIDES)) {
30
37
  if (getEnv(envVar))
31
38
  overrides.push(`${field} (${envVar})`);
@@ -36,18 +43,30 @@ export async function getConfigCommandData(projectDir) {
36
43
  const { getEnvironmentConfig } = await import("../../../src/config/index.js");
37
44
  const config = getEnvironmentConfig();
38
45
  const { readConfigFile } = await import("../../shared/config.js");
39
- const configSource = await detectConfigSource(projectDir);
46
+ const { resolveCliApiUrl } = await import("../../shared/constants.js");
47
+ const { PROJECT_LINK_RELATIVE_PATH, readProjectLinkForControlPlane, } = await import("../../shared/project-link.js");
48
+ const detectedConfigSource = await detectConfigSource(projectDir);
40
49
  const envOverrides = getEnvOverrides();
41
50
  const fileConfig = await readConfigFile(projectDir);
51
+ const environmentProjectReference = resolveEnvironmentProjectReference()?.reference;
52
+ const linkedProjectSlug = !config.projectSlug && !fileConfig?.projectSlug &&
53
+ !environmentProjectReference
54
+ ? (await readProjectLinkForControlPlane(projectDir, resolveCliApiUrl(config, fileConfig?.apiUrl)))?.projectSlug
55
+ : undefined;
42
56
  return {
43
- projectSlug: config.projectSlug ?? fileConfig?.projectSlug ?? null,
57
+ projectSlug: config.projectSlug ?? fileConfig?.projectSlug ?? environmentProjectReference ??
58
+ linkedProjectSlug ?? null,
44
59
  nodeEnv: config.nodeEnv,
45
60
  veryfrontEnv: config.veryfrontEnv || null,
46
61
  apiBaseUrl: config.apiBaseUrl,
47
62
  debug: config.debug,
48
63
  ci: config.ci,
49
64
  hasApiToken: !!(config.apiToken ?? fileConfig?.apiToken),
50
- configSource,
65
+ configSource: linkedProjectSlug
66
+ ? PROJECT_LINK_RELATIVE_PATH
67
+ : detectedConfigSource === ".veryfront/project.json"
68
+ ? null
69
+ : detectedConfigSource,
51
70
  envOverrides,
52
71
  };
53
72
  }
@@ -3,7 +3,11 @@
3
3
  *
4
4
  * @module cli/commands/demo
5
5
  */
6
+ import { type ApiClient } from "../../shared/config.js";
7
+ import { type ProjectTarget } from "../../shared/deployment-provenance.js";
8
+ import { type ReserveResult } from "../../shared/reserve-slug.js";
6
9
  type AuthMethod = "google" | "github" | "microsoft" | "token";
10
+ export declare function resolveDemoReservedProject(reserveResult: ReserveResult, token: string, client?: ApiClient): Promise<ProjectTarget>;
7
11
  export interface DemoOptions {
8
12
  /** Project name for the demo (default: demo-{random}) */
9
13
  projectName?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"demo.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/demo/demo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAqDH,KAAK,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;AA6Y9D,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,8CAA8C;IAC9C,WAAW,CAAC,EAAE,UAAU,CAAC;CAC1B;AA+DD,wBAAsB,WAAW,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmH1E"}
1
+ {"version":3,"file":"demo.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/demo/demo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAyCH,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAC7F,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAgBtF,KAAK,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;AAS9D,wBAAsB,0BAA0B,CAC9C,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE,MAAM,EACb,MAAM,GAAE,SAIN,GACD,OAAO,CAAC,aAAa,CAAC,CAMxB;AAwYD,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,8CAA8C;IAC9C,WAAW,CAAC,EAAE,UAAU,CAAC;CAC1B;AA+DD,wBAAsB,WAAW,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmH1E"}